GNU bug report logs - #55149
29.0.50; Commit f30625943e broke magit/with-editor

Previous Next

Package: emacs;

Reported by: Tassilo Horn <thorn <at> fastmail.fm>

Date: Wed, 27 Apr 2022 12:59:01 UTC

Severity: normal

Tags: patch

Merged with 55160, 55161

Found in version 29.0.50

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

Bug is archived. No further changes may be made.

Full log


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

From: Juri Linkov <juri <at> linkov.net>
To: Tassilo Horn <thorn <at> fastmail.fm>
Cc: "Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs <at> gnu.org>,
 No Wayman <iarchivedmywholelife <at> gmail.com>, 55149 <at> debbugs.gnu.org,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#55149: 29.0.50; Commit f30625943e broke magit/with-editor
Date: Thu, 28 Apr 2022 10:22:24 +0300
>> The regression is that the return value of :after now overrides
>> the return value of the original function.
>
> Oh, indeed.  But isn't that exactly as documented for add-function?
>
>  :after (lambda (&rest r) (apply OLDFUN r) (apply FUNCTION r))

Indeed, it seems documentation differed from the actual implementation.

> Of course, we'd rather want
>
>  :after (lambda (&rest r) (prog1 (apply OLDFUN r) (apply FUNCTION r)))

Yep, this looks like what it's natural to expect from such advice type.
Or maybe a new type could be added to modify the return value?




This bug report was last modified 3 years and 24 days ago.

Previous Next


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