1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Fix eager macroexpansion cycle in cl-once-only

* lisp/emacs-lisp/cl-macs.el (cl-once-only): Use different cl-loop
syntax, with no functional change, but such that the loop does not
expand into cl-psetq.
This commit is contained in:
Sean Whitton 2022-04-12 17:59:22 +02:00 committed by Lars Ingebrigtsen
parent a987e66e6b
commit 451eeb512d

View file

@ -2473,11 +2473,11 @@ See also `macroexp-let2'."
;; We require this explicit call to `list' rather than using
;; (,,@(cl-loop ...)) due to a limitation of Elisp's backquote.
`(let ,(list
,@(cl-loop for name in names and gensym in our-gensyms
,@(cl-loop for name in names for gensym in our-gensyms
for to-eval = (or (cadr name) (car name))
collect ``(,,gensym ,,to-eval)))
;; During macroexpansion, bind each NAME to its gensym.
,(let ,(cl-loop for name in names and gensym in our-gensyms
,(let ,(cl-loop for name in names for gensym in our-gensyms
collect `(,(car name) ,gensym))
,@body)))))