Skip to content

Commit ebff24c

Browse files
committed
Eval macro arg just once
* lisp/emacs-lisp/cl-macs.el (cl--push-clause-loop-body): Use `macroexp-let2' (Bug#39428).
1 parent 0609dd4 commit ebff24c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lisp/emacs-lisp/cl-macs.el

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,9 +1037,10 @@ For more details, see Info node `(cl)Loop Facility'.
10371037

10381038
(defmacro cl--push-clause-loop-body (clause)
10391039
"Apply CLAUSE to both `cl--loop-conditions' and `cl--loop-body'."
1040-
`(progn
1041-
(push ,clause cl--loop-conditions)
1042-
(push ,clause cl--loop-body)))
1040+
(macroexp-let2 nil sym clause
1041+
`(progn
1042+
(push ,sym cl--loop-conditions)
1043+
(push ,sym cl--loop-body))))
10431044

10441045
;; Below is a complete spec for cl-loop, in several parts that correspond
10451046
;; to the syntax given in CLtL2. The specs do more than specify where

0 commit comments

Comments
 (0)