]> git.eshelyaron.com Git - emacs.git/commitdiff
Consistent empty-body warning messages for let and let*
authorMattias Engdegård <mattiase@acm.org>
Thu, 29 Dec 2022 16:00:01 +0000 (17:00 +0100)
committerMattias Engdegård <mattiase@acm.org>
Thu, 29 Dec 2022 16:00:01 +0000 (17:00 +0100)
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all):
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test--with-suppressed-warnings):
Make warning messages for let and let* consistent with other
empty-body warnings.

lisp/emacs-lisp/macroexp.el
test/lisp/emacs-lisp/bytecomp-tests.el

index 8aa9cb860c49a7571cc4f44b426bb6f1790a3a43..d8c0cd5c7bddfa5883c2b5bd5fffb583dbaa98a4 100644 (file)
@@ -367,7 +367,7 @@ Assumes the caller has bound `macroexpand-all-environment'."
                  (if (null body)
                      (macroexp-unprogn
                       (macroexp-warn-and-return
-                       (format "Empty %s body" fun)
+                       (format "`%s' with empty body" fun)
                        nil (list 'empty-body fun) 'compile-only fun))
                    (macroexp--all-forms body))
                  (cdr form))
index eec66c9585a4c5c6f0e3d85012486603ac75a96a..5c61ca10b9c719c2d097abc7af07d46bae86dc39 100644 (file)
@@ -1440,14 +1440,14 @@ literals (Bug#20852)."
       (let ((_ 1))
         ))
    '((empty-body let))
-   "Warning: Empty let body")
+   "Warning: `let' with empty body")
 
   (test-suppression
    '(defun zot ()
       (let* ((_ 1))
         ))
    '((empty-body let*))
-   "Warning: Empty let\\* body")
+   "Warning: `let\\*' with empty body")
 
   (test-suppression
    '(defun zot (x)