GNU bug report logs - #27016
possible bug in `defsetf'

Previous Next

Package: emacs;

Reported by: Rafael D Sorkin <rsorkin <at> perimeterinstitute.ca>

Date: Mon, 22 May 2017 06:40:01 UTC

Severity: minor

Tags: fixed, patch

Found in versions 24.4, 25.2

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


Message #89 received at 27016 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 27016 <at> debbugs.gnu.org, Rafael D Sorkin <rsorkin <at> perimeterinstitute.ca>
Subject: Re: bug#27016: possible bug in `defsetf'
Date: Fri, 26 May 2017 18:51:21 -0400
reopen 27016
tag 27016 - wontfix
quit

Stefan Monnier <monnier <at> 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
...).




This bug report was last modified 7 years and 290 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.