Subject: Re: bug#27016: possible bug in `defsetf'

From: Noam Postavsky <[email-masked]>
Date: Thu, 25 May 2017 16:42:50 -0400

On Thu, May 25, 2017 at 4:26 PM, Michael Heerdegen
<[email-masked]> wrote:
> [email-masked] 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.