bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27016: possible bug in `defsetf'


From: Noam Postavsky
Subject: bug#27016: possible bug in `defsetf'
Date: Thu, 25 May 2017 16:42:50 -0400

On Thu, May 25, 2017 at 4:26 PM, Michael Heerdegen
<michael_heerdegen@web.de> wrote:
> npostavs@users.sourceforge.net writes:
>
>> Oh, I think `eval-when' should be equivalent:
>>
>>     (eval-when (compile load eval)
>>       (unless t
>>         (defsetf foobar setcar)))
>
> FWIW, I don't understand.  Doesn't that just expand to the same code as
> before when evaluated?  That code is just evaluated under even more
> circumstances.

Hmm, I thought it would cause the 'unless t' to happen in the
macroexpansion phase as well, but I was wrong. Apparently 'eval-when'
doesn't have this effect, only eval-when-compile or eval-and-compile
will do the trick.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]