(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))
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))
(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.
(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)))
(`(',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))
(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