[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: |
Fri, 26 May 2017 18:51:21 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) |
reopen 27016
tag 27016 - wontfix
quit
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>> (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.
Is the difference in Emacs-23 not just eager macroexpansion?
Both the Emacs-23 and the current code seem to expand to (put 'foobar
...).
- bug#27016: possible bug in `defsetf', (continued)
- bug#27016: possible bug in `defsetf', Rafael D Sorkin, 2017/05/25
- bug#27016: possible bug in `defsetf', Rafael D Sorkin, 2017/05/25
- bug#27016: possible bug in `defsetf', npostavs, 2017/05/25
- bug#27016: possible bug in `defsetf', Michael Heerdegen, 2017/05/25
- bug#27016: possible bug in `defsetf', Noam Postavsky, 2017/05/25
- bug#27016: possible bug in `defsetf', Michael Heerdegen, 2017/05/25
- bug#27016: possible bug in `defsetf', npostavs, 2017/05/25
- bug#27016: possible bug in `defsetf', Michael Heerdegen, 2017/05/25
bug#27016: possible bug in `defsetf', Stefan Monnier, 2017/05/25
- bug#27016: possible bug in `defsetf',
npostavs <=
bug#27016: possible bug in `defsetf', Rafael D Sorkin, 2017/05/26