[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 29d23b7fa0 1/2: Consistent empty-body warning messages for let an
From: |
Mattias Engdegård |
Subject: |
master 29d23b7fa0 1/2: Consistent empty-body warning messages for let and let* |
Date: |
Thu, 29 Dec 2022 12:00:34 -0500 (EST) |
branch: master
commit 29d23b7fa00ed8263baa060d487b526d51fa6986
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
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.
---
lisp/emacs-lisp/macroexp.el | 2 +-
test/lisp/emacs-lisp/bytecomp-tests.el | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index 8aa9cb860c..d8c0cd5c7b 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -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))
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el
b/test/lisp/emacs-lisp/bytecomp-tests.el
index eec66c9585..5c61ca10b9 100644
--- a/test/lisp/emacs-lisp/bytecomp-tests.el
+++ b/test/lisp/emacs-lisp/bytecomp-tests.el
@@ -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)