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


Message #70 received at 76132 <at> debbugs.gnu.org (full text, mbox):

From: Tassilo Horn <tsdh <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 76132 <at> debbugs.gnu.org, Richard Stallman <rms <at> gnu.org>
Subject: Re: bug#76132: Clojure-style auto-gensyms for macros
Date: Wed, 12 Feb 2025 15:19:27 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

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

Argh, indeed.

Thanks,
Tassilo




This bug report was last modified 146 days ago.

Previous Next


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