aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Whitton2022-04-12 17:59:22 +0200
committerLars Ingebrigtsen2022-04-12 17:59:22 +0200
commit451eeb512dbfb5ccd4e75eca696a5d4143fec646 (patch)
tree70af1b22d7ab24ac507ae2329b485d61907d66f6
parenta987e66e6ba014795ba4540c5fedeb9894bdd94e (diff)
downloademacs-451eeb512dbfb5ccd4e75eca696a5d4143fec646.tar.gz
emacs-451eeb512dbfb5ccd4e75eca696a5d4143fec646.zip
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.
-rw-r--r--lisp/emacs-lisp/cl-macs.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index af8855516ca..364b5120a0a 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2473,11 +2473,11 @@ See also `macroexp-let2'."
2473 ;; We require this explicit call to `list' rather than using 2473 ;; We require this explicit call to `list' rather than using
2474 ;; (,,@(cl-loop ...)) due to a limitation of Elisp's backquote. 2474 ;; (,,@(cl-loop ...)) due to a limitation of Elisp's backquote.
2475 `(let ,(list 2475 `(let ,(list
2476 ,@(cl-loop for name in names and gensym in our-gensyms 2476 ,@(cl-loop for name in names for gensym in our-gensyms
2477 for to-eval = (or (cadr name) (car name)) 2477 for to-eval = (or (cadr name) (car name))
2478 collect ``(,,gensym ,,to-eval))) 2478 collect ``(,,gensym ,,to-eval)))
2479 ;; During macroexpansion, bind each NAME to its gensym. 2479 ;; During macroexpansion, bind each NAME to its gensym.
2480 ,(let ,(cl-loop for name in names and gensym in our-gensyms 2480 ,(let ,(cl-loop for name in names for gensym in our-gensyms
2481 collect `(,(car name) ,gensym)) 2481 collect `(,(car name) ,gensym))
2482 ,@body))))) 2482 ,@body)))))
2483 2483