[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#55149: bug#55161: 29.0.50; [PATCH] oclosure transcription error redu
From: |
Rudolf Schlatte |
Subject: |
bug#55149: bug#55161: 29.0.50; [PATCH] oclosure transcription error redux |
Date: |
Thu, 28 Apr 2022 15:50:14 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.1 (darwin) |
Lars Ingebrigtsen <larsi@gnus.org> writes:
> dick <dick.r.chiang@gmail.com> 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.
- bug#55149: 29.0.50; Commit f30625943e broke magit/with-editor, (continued)
bug#55149: (No Subject), M. Ian Graham, 2022/04/28
bug#55149: 29.0.50; Commit f30625943e broke magit/with-editor, M. Ian Graham, 2022/04/28
bug#55149: bug#55161: 29.0.50; [PATCH] oclosure transcription error redux,
Rudolf Schlatte <=