emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master ebff24c: Eval macro arg just once


From: Tino Calancha
Subject: master ebff24c: Eval macro arg just once
Date: Wed, 5 Feb 2020 13:06:26 -0500 (EST)

branch: master
commit ebff24c0b8fa54854fe8445f2eba1d99fb76ecf2
Author: Tino Calancha <address@hidden>
Commit: Tino Calancha <address@hidden>

    Eval macro arg just once
    
    * lisp/emacs-lisp/cl-macs.el (cl--push-clause-loop-body):
    Use `macroexp-let2' (Bug#39428).
---
 lisp/emacs-lisp/cl-macs.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 9d0fd15..4c2f589 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -1037,9 +1037,10 @@ For more details, see Info node `(cl)Loop Facility'.
 
 (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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]