Subject: Re: bug#76132: Clojure-style auto-gensyms for macros

From: Stefan Monnier <[email-masked]>
Date: Wed, 12 Feb 2025 08:55:51 -0500

>   (equal (macroexpand '(cl-with-gensyms (x)
>                          `(+ ,x ,x)))
>          (macroexpand '(cl-with-gensyms (x)
>                          `(+ ,x ,x))))
>   ;;=> t

That doesn't test what you think it does because

    (macroexpand '(cl-with-gensyms (x) `(+ ,x ,x)))

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)))))

- Stefan