mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Make 'byte-compile-info*' functions more logical
* lisp/emacs-lisp/byte-run.el (byte-compile-info): New function that's more flexible that replaces 'byte-compile-info-string' and 'byte-compile-info-message'. (byte-compile-info-string): Make obsolete. (byte-compile-info-message): Ditto. * lisp/international/ja-dic-cnv.el (skkdic-convert-okuri-ari) (skkdic-convert-postfix, skkdic-convert-prefix) (skkdic-collect-okuri-nasi, skkdic-set-okuri-nasi): * lisp/finder.el (finder-compile-keywords): * lisp/cus-dep.el (custom-make-dependencies): Adjust callers to use the new function.
This commit is contained in:
parent
155b2c8a8d
commit
7384f194be
4 changed files with 27 additions and 15 deletions
|
|
@ -70,7 +70,7 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
|
|||
(directory-files subdir nil
|
||||
"\\`[^=.].*\\.el\\'"))))
|
||||
(progress (make-progress-reporter
|
||||
(byte-compile-info-string "Scanning files for custom")
|
||||
(byte-compile-info "Scanning files for custom")
|
||||
0 (length files) nil 10)))
|
||||
(with-temp-buffer
|
||||
(dolist (elem files)
|
||||
|
|
@ -127,8 +127,8 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
|
|||
type)))))))))))
|
||||
(error nil)))))))
|
||||
(progress-reporter-done progress))
|
||||
(byte-compile-info-message "Generating %s..."
|
||||
generated-custom-dependencies-file)
|
||||
(byte-compile-info
|
||||
(format "Generating %s..." generated-custom-dependencies-file) t)
|
||||
(set-buffer (find-file-noselect generated-custom-dependencies-file))
|
||||
(setq buffer-undo-list t)
|
||||
(erase-buffer)
|
||||
|
|
@ -217,8 +217,8 @@ elements the files that have variables or faces that contain that
|
|||
version. These files should be loaded before showing the customization
|
||||
buffer that `customize-changed-options' generates.\")\n\n"))
|
||||
(save-buffer)
|
||||
(byte-compile-info-message "Generating %s...done"
|
||||
generated-custom-dependencies-file))
|
||||
(byte-compile-info
|
||||
(format "Generating %s...done" generated-custom-dependencies-file) t))
|
||||
|
||||
|
||||
(provide 'cus-dep)
|
||||
|
|
|
|||
|
|
@ -576,13 +576,26 @@ Otherwise, return nil. For internal use only."
|
|||
(mapconcat (lambda (char) (format "`?\\%c'" char))
|
||||
sorted ", ")))))
|
||||
|
||||
(defun byte-compile-info (string &optional message type)
|
||||
"Format STRING in a way that looks pleasing in the compilation output.
|
||||
If MESSAGE, output the message, too.
|
||||
|
||||
If TYPE, it should be a string that says what the information
|
||||
type is. This defaults to \"INFO\"."
|
||||
(let ((string (format " %-9s%s" (or type "INFO") string)))
|
||||
(when message
|
||||
(message "%s" string))
|
||||
string))
|
||||
|
||||
(defun byte-compile-info-string (&rest args)
|
||||
"Format ARGS in a way that looks pleasing in the compilation output."
|
||||
(format " %-9s%s" "INFO" (apply #'format args)))
|
||||
(declare (obsolete byte-compile-info "28.1"))
|
||||
(byte-compile-info (apply #'format args)))
|
||||
|
||||
(defun byte-compile-info-message (&rest args)
|
||||
"Message format ARGS in a way that looks pleasing in the compilation output."
|
||||
(message "%s" (apply #'byte-compile-info-string args)))
|
||||
(declare (obsolete byte-compile-info "28.1"))
|
||||
(byte-compile-info (apply #'format args) t))
|
||||
|
||||
|
||||
;; I nuked this because it's not a good idea for users to think of using it.
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ from; the default is `load-path'."
|
|||
(cons d f))
|
||||
(directory-files d nil el-file-regexp))))
|
||||
(progress (make-progress-reporter
|
||||
(byte-compile-info-string "Scanning files for finder")
|
||||
(byte-compile-info "Scanning files for finder")
|
||||
0 (length files)))
|
||||
package-override base-name ; processed
|
||||
summary keywords package version entry desc)
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
(defvar ja-dic-filename "ja-dic.el")
|
||||
|
||||
(defun skkdic-convert-okuri-ari (skkbuf buf)
|
||||
(byte-compile-info-message "Processing OKURI-ARI entries")
|
||||
(byte-compile-info "Processing OKURI-ARI entries" t)
|
||||
(goto-char (point-min))
|
||||
(with-current-buffer buf
|
||||
(insert ";; Setting okuri-ari entries.\n"
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
("ゆき" "行")))
|
||||
|
||||
(defun skkdic-convert-postfix (skkbuf buf)
|
||||
(byte-compile-info-message "Processing POSTFIX entries")
|
||||
(byte-compile-info "Processing POSTFIX entries" t)
|
||||
(goto-char (point-min))
|
||||
(with-current-buffer buf
|
||||
(insert ";; Setting postfix entries.\n"
|
||||
|
|
@ -151,7 +151,7 @@
|
|||
(defconst skkdic-prefix-list '(skkdic-prefix-list))
|
||||
|
||||
(defun skkdic-convert-prefix (skkbuf buf)
|
||||
(byte-compile-info-message "Processing PREFIX entries")
|
||||
(byte-compile-info "Processing PREFIX entries" t)
|
||||
(goto-char (point-min))
|
||||
(with-current-buffer buf
|
||||
(insert ";; Setting prefix entries.\n"
|
||||
|
|
@ -273,7 +273,7 @@
|
|||
(defun skkdic-collect-okuri-nasi ()
|
||||
(save-excursion
|
||||
(let ((progress (make-progress-reporter
|
||||
(byte-compile-info-message "Collecting OKURI-NASI entries")
|
||||
(byte-compile-info "Collecting OKURI-NASI entries" t)
|
||||
(point) (point-max)
|
||||
nil 10)))
|
||||
(while (re-search-forward "^\\(\\cH+\\) \\(/\\cj.*\\)/$"
|
||||
|
|
@ -301,7 +301,7 @@
|
|||
"(skkdic-set-okuri-nasi\n")
|
||||
(let ((l (nreverse skkdic-okuri-nasi-entries))
|
||||
(progress (make-progress-reporter
|
||||
(byte-compile-info-message "Processing OKURI-NASI entries")
|
||||
(byte-compile-info "Processing OKURI-NASI entries" t)
|
||||
0 skkdic-okuri-nasi-entries-count
|
||||
nil 10))
|
||||
(count 0))
|
||||
|
|
@ -531,8 +531,7 @@ To get complete usage, invoke:
|
|||
',(let ((l entries)
|
||||
(map '(skdic-okuri-nasi))
|
||||
(progress (make-progress-reporter
|
||||
(byte-compile-info-message
|
||||
"Extracting OKURI-NASI entries")
|
||||
(byte-compile-info "Extracting OKURI-NASI entries")
|
||||
0 (length entries)))
|
||||
(count 0)
|
||||
entry)
|
||||
|
|
|
|||
Loading…
Reference in a new issue