GNU bug report logs - #12812
defsetf with third argument = t

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Tue, 6 Nov 2012 07:46:01 UTC

Severity: normal

Found in version 24.2.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12812 in the body.
You can then email your comments to 12812 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#12812; Package emacs. (Tue, 06 Nov 2012 07:46:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: submit <at> debbugs.gnu.org
Subject: defsetf with third argument = t
Date: Tue, 06 Nov 2012 02:41:55 -0500
Package: emacs
Version: 24.2.50

In Emacs 24.2 and earlier, defsetf was documented [1] to accept a third
argument = t, with the same meaning as gv-define-simple-setter's
optional FIX-RETURN argument. This behaviour no longer works.

Here is an artificial example in `emacs -Q -l cl':

(defun foo (x)
  (car x))

(defun foo-set (x y)
  (setcar x y)
  nil)

(defsetf foo foo-set t)

(setq bar '(0 2 3))

(setf (foo bar) 1)   ; -> nil
bar                  ; -> (1 2 3)


The setf call correctly returns 1 in 24.2.


[1] (info "(cl)Customizing Setf")
   [...]
   As a special (non-Common-Lisp) extension, a third argument of `t'
   to `defsetf' says...




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12812; Package emacs. (Wed, 07 Nov 2012 03:17:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 12812 <at> debbugs.gnu.org
Subject: Re: bug#12812: defsetf with third argument = t
Date: Tue, 06 Nov 2012 22:16:33 -0500
> In Emacs 24.2 and earlier, defsetf was documented [1] to accept a third
> argument = t, with the same meaning as gv-define-simple-setter's
> optional FIX-RETURN argument. This behaviour no longer works.

Indeed, thanks, fixed.


        Stefan




bug closed, send any further explanations to 12812 <at> debbugs.gnu.org and Glenn Morris <rgm <at> gnu.org> Request was from Stefan Monnier <monnier <at> iro.umontreal.ca> to control <at> debbugs.gnu.org. (Wed, 07 Nov 2012 03:18:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12812; Package emacs. (Wed, 07 Nov 2012 04:52:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 12812 <at> debbugs.gnu.org
Subject: Re: bug#12812: defsetf with third argument = t
Date: Tue, 06 Nov 2012 23:51:42 -0500
Stefan Monnier wrote:

>> In Emacs 24.2 and earlier, defsetf was documented [1] to accept a third
>> argument = t, with the same meaning as gv-define-simple-setter's
>> optional FIX-RETURN argument. This behaviour no longer works.
>
> Indeed, thanks, fixed.

Still fails for me as originally described.
I think it's gv-define-simple-setter that's broken now, by #12813.
The FIX-RETURN case... doesn't.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12812; Package emacs. (Wed, 07 Nov 2012 05:03:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 12812 <at> debbugs.gnu.org
Subject: Re: bug#12812: defsetf with third argument = t
Date: Wed, 07 Nov 2012 00:02:33 -0500
PS gv, cl-lib etc all looks like very nice stuff. Just reporting these
issues while trying to figure out how to document some of it.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12812; Package emacs. (Thu, 08 Nov 2012 01:33:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 12812 <at> debbugs.gnu.org
Subject: Re: bug#12812: defsetf with third argument = t
Date: Wed, 07 Nov 2012 20:32:47 -0500
>>> In Emacs 24.2 and earlier, defsetf was documented [1] to accept a third
>>> argument = t, with the same meaning as gv-define-simple-setter's
>>> optional FIX-RETURN argument. This behaviour no longer works.
>> Indeed, thanks, fixed.
> Still fails for me as originally described.
> I think it's gv-define-simple-setter that's broken now, by #12813.
> The FIX-RETURN case... doesn't.

Indeed, I fix it and broke it right away.  Should be fixed for good
this time.

> PS gv, cl-lib etc all looks like very nice stuff.

Thanks.  I'm particularly proud of gv.el ;-)

> Just reporting these issues while trying to figure out how to document
> some of it.

Tank you for doing that.  FWIW, I think the third arg of defsetf should
be undocumented.  I hesitated whether to fix it or not since AFAIK the
only users of that feature were in cl-macs.el and now use
gv-define-simple-setter instead.  The only reason why I installed the
fix is that it was such a trivial change to make.


        Stefan




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 06 Dec 2012 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 152 days ago.

Previous Next


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