GNU bug report logs - #17348
24.3.50; Cannot advice-add the same function :before and :after

Previous Next

Package: emacs;

Reported by: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>

Date: Sat, 26 Apr 2014 11:17:02 UTC

Severity: minor

Found in version 24.3.50

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

Bug is archived. No further changes may be made.

Full log


Message #19 received at 17348-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
Cc: 17348-done <at> debbugs.gnu.org
Subject: Re: bug#17348: 24.3.50;
 Cannot advice-add the same function :before and :after
Date: Sat, 10 May 2014 16:09:21 -0400
I installed a patch in `emacs-24' which will let you add the same
function multiple times, as long as you specify different `name'
properties for each one.

>> In the actual situation that lead me to adding the same function twice,
>> it was a tracing function, like (message "time: %s ; value of
>> foovariable: %s" (current-time) foovariable) and I assumed that I would
>> be able to remove them both with one (advice-remove ...) -- I guess that
>> isn't too complicated.
> Removing them both would not be desirable in general.

With the new code, you can remove each one individually by specifying
its `name', or you can remove them all by specifying the function itself.


        Stefan




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

Previous Next


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