GNU bug report logs - #76132
Clojure-style auto-gensyms for macros

Previous Next

Package: emacs;

Reported by: Tassilo Horn <tsdh <at> gnu.org>

Date: Fri, 7 Feb 2025 21:13:02 UTC

Severity: wishlist

Tags: patch

Done: Tassilo Horn <tsdh <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: 76132 <at> debbugs.gnu.org, Richard Stallman <rms <at> gnu.org>
Subject: bug#76132: Clojure-style auto-gensyms for macros
Date: Wed, 12 Feb 2025 09:02:14 -0500
> does not return any uninterned symbols.  It returns the code which *when
> executed* will generate a new uninterned symbol.  Try
>
>     (equal (eval (macroexpand '(cl-with-gensyms (x)
>                                  `(+ ,x ,x))))
>            (eval (macroexpand '(cl-with-gensyms (x)
>                                  `(+ ,x ,x)))))

Actually a more precise test would be:

    (let ((codegen (macroexpand-all '(cl-with-gensyms (x)
                                       `(+ ,x ,x)))))
      (equal (eval codegen t) (eval codegen t)))


- Stefan





This bug report was last modified 147 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.