[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d41a4ad: * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Wa
From: |
Stefan Monnier |
Subject: |
master d41a4ad: * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Warn on empty let bodies |
Date: |
Mon, 15 Feb 2021 12:07:58 -0500 (EST) |
branch: master
commit d41a4ad4ae6f25c3cbc90aaaa33781821bb655c5
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Warn on empty let
bodies
---
lisp/emacs-lisp/macroexp.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index 13ff5ef..0934e43 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -299,7 +299,12 @@ Assumes the caller has bound
`macroexpand-all-environment'."
(`(,(and fun (or 'let 'let*)) . ,(or `(,bindings . ,body) dontcare))
(macroexp--cons fun
(macroexp--cons (macroexp--all-clauses bindings 1)
- (macroexp--all-forms body)
+ (if (null body)
+ (macroexp-unprogn
+ (macroexp--warn-and-return
+ (format "Empty %s body" fun)
+ nil t))
+ (macroexp--all-forms body))
(cdr form))
form))
(`(,(and fun `(lambda . ,_)) . ,args)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master d41a4ad: * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Warn on empty let bodies,
Stefan Monnier <=