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

From: Michael Heerdegen <[email-masked]>
Date: Thu, 25 May 2017 22:26:40 +0200

[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.

I would rather try something like

#+begin_src emacs-lisp
(unless t
  (eval '(progn (defalias 'foobar 'cons)
                (defsetf foobar setcar))))
#+end_src

to avoid the eager macro expansion unless the code is actually run.

Michael.