Subject: Re: bug#55149: bug#55161: 29.0.50; [PATCH] oclosure transcription error redux

From: Rudolf Schlatte <[email-masked]>
Date: Thu, 28 Apr 2022 15:50:14 +0200

Lars Ingebrigtsen <[email-masked]> writes:

> dick <[email-masked]> writes:
>
>> -   (:after (apply cdr r) (apply car r))
>> +   (:after (prog1 (apply cdr r) (apply car r)))
>
> I guess this is the same as bug#55149, so I've merged the reports.
>
> Apparently, returning the value of the :after function is what's
> documented to happen (and is what the trunk does now), but it didn't
> use to do that, so it's breaking advice that relies on the old
> behaviour, if I understand 55149 correctly.

This behavior is a bit surprising, since Common Lisp specifies that the
return values of :after methods are ignored (“All the after methods are
called in most-specific-last order. Their values are ignored.”
http://www.lispworks.com/documentation/HyperSpec/Body/07_ffb.htm).  To
override the return value of a method, :around methods are used.

I don't want to argue that CL method combinations and elisp advice are
the same thing, or that Emacs Lisp has to necessarily follow CL
semantics, but it would be good to have the possibility of inserting a
bit of code that should "just run" after a function, without overriding
its return value.