1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Consistent empty-body warning messages for let and let*

* 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.
This commit is contained in:
Mattias Engdegård 2022-12-29 17:00:01 +01:00
parent 314cbef849
commit 29d23b7fa0
2 changed files with 3 additions and 3 deletions

View 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))

View 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)