diff options
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 0ae7824de1e..2ac926f1879 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -973,7 +973,7 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." (print-level 4) (print-length 4)) (byte-compile-log-1 - (format + (format-message ,format-string ,@(mapcar (lambda (x) (if (symbolp x) (list 'prin1-to-string x) x)) @@ -1120,7 +1120,8 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." pt) (when dir (unless was-same - (insert (format "Leaving directory ‘%s’\n" default-directory)))) + (insert (format-message "Leaving directory ‘%s’\n" + default-directory)))) (unless (bolp) (insert "\n")) (setq pt (point-marker)) @@ -1135,8 +1136,8 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." (when dir (setq default-directory dir) (unless was-same - (insert (format "Entering directory ‘%s’\n" - default-directory)))) + (insert (format-message "Entering directory ‘%s’\n" + default-directory)))) (setq byte-compile-last-logged-file byte-compile-current-file byte-compile-last-warned-form nil) ;; Do this after setting default-directory. @@ -1154,7 +1155,7 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." (defun byte-compile-warn (format &rest args) "Issue a byte compiler warning; use (format FORMAT ARGS...) for message." - (setq format (apply 'format format args)) + (setq format (apply #'format-message format args)) (if byte-compile-error-on-warn (error "%s" format) ; byte-compile-file catches and logs it (byte-compile-log-warning format t :warning))) @@ -2979,7 +2980,7 @@ for symbols generated by the byte compiler itself." (`(',var . ,_) (when (assq var byte-compile-lexical-variables) (byte-compile-log-warning - (format "%s cannot use lexical var ‘%s’" fn var) + (format-message "%s cannot use lexical var ‘%s’" fn var) nil :error))))) (when (macroexp--const-symbol-p fn) (byte-compile-warn "‘%s’ called as a function" fn)) @@ -2991,8 +2992,8 @@ for symbols generated by the byte compiler itself." (format "; %s" interactive-only)) ((and (symbolp 'interactive-only) (not (eq interactive-only t))) - (format "; use ‘%s’ instead." - interactive-only)) + (format-message "; use ‘%s’ instead." + interactive-only)) (t ".")))) (if (eq (car-safe (symbol-function (car form))) 'macro) (byte-compile-log-warning |