summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-08-06 08:12:31 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-08-06 08:12:31 +0200
commit7384f194bebb161b8f4ef7617f8c328721cd433f (patch)
tree7421d9fee46d370b7649bc3e5afbb48381efa9a6 /lisp/emacs-lisp
parent155b2c8a8d51a492a8c350b92bd3e83187d72b78 (diff)
downloademacs-7384f194bebb161b8f4ef7617f8c328721cd433f.tar.gz
emacs-7384f194bebb161b8f4ef7617f8c328721cd433f.tar.bz2
emacs-7384f194bebb161b8f4ef7617f8c328721cd433f.zip
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.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/byte-run.el17
1 files changed, 15 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 88e21b73fed..5279a57cd0c 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -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.