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: npostavs
Subject: bug#27016: possible bug in `defsetf'
Date: Thu, 25 May 2017 19:03:11 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Noam Postavsky <npostavs@users.sourceforge.net> writes:
>
>> 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.
>
> That also doesn't work.

Oh, hmm, I only checked by evaluating, I didn't actually try compiling
to a separate file.

> #+begin_src emacs-lisp
> (macroexpand '(defsetf foo bar))
> ==>
> '(lambda
>    (do &rest args)
>    (gv--defsetter 'foo
>                   (lambda
>                     (val &rest args)
>                     `(,'bar ,@args ,val))
>                   do args))
> #+end_src

I don't understand where that quote comes from.  I guess I don't really
understand what's going on here as well as I thought.

> When you compile a file with this content:
>
> #+begin_src emacs-lisp
> (eval-and-compile
>   (unless nil
>     (defsetf foo bar)))
> #+end_src
>
> you get an empty .elc.
>
> Isn't that strange?

Yeah, even stranger...






reply via email to

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