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

From: Stefan Monnier <[email-masked]>
Date: Thu, 25 May 2017 23:50:54 -0400

> (unless t
>   (defalias 'foobar 'cons)
>   (defsetf foobar setcar))		; nil 
> (foobar pair)				; same as above
> (setf (foobar pair) 0)			; 0       !

I can confirm that it's a bug.  It's perfectly correct for the defsetf
to be macroexpanded, but not to be evaluated.
Not sure how best to get that behavior.  The naive/straightforward way
might be to introduce some sort of eval-and-compile-when-at-toplevel,
but there's probably a better way.  The first thing to do is to look at
how it was done in Emacs-23.

        Stefan