From 0e1b03bbb87d0b09ba841c0318fce77533914208 Mon Sep 17 00:00:00 2001 From: Mattias EngdegÄrd Date: Tue, 3 Jan 2023 15:58:14 +0100 Subject: Styled quotes in compiler warnings * lisp/emacs-lisp/byte-run.el (byte-run--parse-body) (byte-run--unescaped-character-literals-warning): * lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment) (byte-compile-form, bytecomp--warn-dodgy-eq-arg): * lisp/emacs-lisp/cconv.el (cconv--warn-unused-msg): * lisp/emacs-lisp/cl-macs.el (cl-defstruct): * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): * lisp/emacs-lisp/eieio.el (defclass): * lisp/emacs-lisp/macroexp.el (macroexp--unfold-lambda) (macroexp--expand-all): * lisp/emacs-lisp/pcase.el (pcase--u1): * lisp/subr.el (when, unless, ignore-error, lsh, sit-for) (with-demoted-errors): Use format-message to ensure properly styled quotes in compiler warning messages. --- lisp/emacs-lisp/bytecomp.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lisp/emacs-lisp/bytecomp.el') diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index df0229094b7..23d02ba92cf 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -554,7 +554,7 @@ Return the compile-time value of FORM." ,(macroexpand-all `(progn ,@body) macroexpand-all-environment))) (macroexp-warn-and-return - "`with-suppressed-warnings' with empty body" + (format-message "`with-suppressed-warnings' with empty body") nil '(empty-body with-suppressed-warnings) t warnings))))) "The default macro-environment passed to macroexpand by the compiler. Placing a macro here will cause a macro to have different semantics when @@ -3445,7 +3445,7 @@ lambda-expression." (t ".")))) (if (eq (car-safe (symbol-function (car form))) 'macro) (byte-compile-report-error - (format "`%s' defined after use in %S (missing `require' of a library file?)" + (format-message "`%s' defined after use in %S (missing `require' of a library file?)" (car form) form))) (if (and handler ;; Make sure that function exists. @@ -5524,8 +5524,8 @@ and corresponding effects." (defun bytecomp--warn-dodgy-eq-arg (form type parenthesis) (macroexp-warn-and-return - (format "`%s' called with literal %s that may never match (%s)" - (car form) type parenthesis) + (format-message "`%s' called with literal %s that may never match (%s)" + (car form) type parenthesis) form (list 'suspicious (car form)) t)) (defun bytecomp--check-eq-args (form &optional a b &rest _ignore) -- cgit v1.2.3