GNU bug report logs -
#39428
28.0.50; cl--push-clause-loop-body: eval macro arg just once
Previous Next
Reported by: Tino Calancha <tino.calancha <at> gmail.com>
Date: Tue, 4 Feb 2020 21:06:01 UTC
Severity: normal
Found in version 28.0.50
Done: Tino Calancha <tino.calancha <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#39428: 28.0.50; cl--push-clause-loop-body: eval macro arg just once
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 39428 <at> debbugs.gnu.org.
--
39428: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=39428
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
dick.r.chiang <at> gmail.com writes:
> LGTM, thanks.
Pushed at master branch as commit 'Eval macro arg just once'
(ebff24c0b8fa54854fe8445f2eba1d99fb76ecf2)
[Message part 3 (message/rfc822, inline)]
X-Debbugs-Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>,dick.r.chiang <at> gmail.com
I think this little tweak has sense. WDYT?
--8<-----------------------------cut here---------------start------------->8---
commit eb88afb89a8cfb760d89569e74c8ece1d1c446cb
Author: Tino Calancha <tino.calancha <at> gmail.com>
Date: Tue Feb 4 21:52:06 2020 +0100
Eval macro arg just once
* lisp/emacs-lisp/cl-macs.el (cl--push-clause-loop-body):
Use `macroexp-let2'.
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 9d0fd15bc3..4c2f58907d 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -1037,9 +1037,10 @@ cl-loop
(defmacro cl--push-clause-loop-body (clause)
"Apply CLAUSE to both `cl--loop-conditions' and `cl--loop-body'."
- `(progn
- (push ,clause cl--loop-conditions)
- (push ,clause cl--loop-body)))
+ (macroexp-let2 nil sym clause
+ `(progn
+ (push ,sym cl--loop-conditions)
+ (push ,sym cl--loop-body))))
;; Below is a complete spec for cl-loop, in several parts that correspond
;; to the syntax given in CLtL2. The specs do more than specify where
--8<-----------------------------cut here---------------end--------------->8---
In GNU Emacs 28.0.50 (build 21, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0)
of 2020-02-04 built on calancha-pc.dy.bbexcite.jp
Repository revision: e287da5a8154d83a97107b64915ccc17e3a086b8
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)
This bug report was last modified 5 years and 200 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.