1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

* lisp/emacs-lisp/nadvice.el: Support adding a given function multiple times.

(advice--member-p): If name is given, only compare the name.
(advice--remove-function): Don't stop at the first match.
(advice--normalize-place): New function.
(add-function, remove-function): Use it.
(advice--add-function): Pass the name, if any, to
advice--remove-function.
This commit is contained in:
Stefan Monnier 2014-05-10 16:07:01 -04:00
parent 4a5c71d7c2
commit 5d03fb436f
6 changed files with 71 additions and 22 deletions

View file

@ -1240,7 +1240,8 @@ buffer: if @var{place} is just a symbol, then @var{function} is added to the
global value of @var{place}. Whereas if @var{place} is of the form
@code{(local @var{symbol})}, where @var{symbol} is an expression which returns
the variable name, then @var{function} will only be added in the
current buffer.
current buffer. Finally, if you want to modify a lexical variable, you will
have to use @code{(var @var{VARIABLE})}.
Every function added with @code{add-function} can be accompanied by an
association list of properties @var{props}. Currently only two of those