emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get advised function name form inside of the advice


From: Vitalie Spinu
Subject: Re: How to get advised function name form inside of the advice
Date: Fri, 04 Mar 2016 17:56:21 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (gnu/linux)

>> On Fri, Mar 04 2016 15:16, Marcin Borkowski wrote:

> On 2016-03-04, at 14:36, Vitalie Spinu <address@hidden> wrote:

>> Hi,
>>
>> How to retrieve the name of the original function from the inside of "new"
>> advice? I need to condition-case a function and show a meaningful error 
>> message
>> with function name instead of an error.

> It seems that you can't do that (and for good reasons).  See here:
> https://lists.gnu.org/archive/html/help-gnu-emacs/2016-02/msg00218.html


Hm, I thought so. Thanks.

What are those good reasons though? I don't see any reasons given in that
thread.

I think my use case is a good reason to have such a feature. Otherwise one would
need a macro to define separate advice function per advice or pass a closure as
an advice. Both ways are overkill for such a basic requirement.

 Vitalie



reply via email to

[Prev in Thread] Current Thread [Next in Thread]