aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorStefan Monnier2014-05-10 16:07:01 -0400
committerStefan Monnier2014-05-10 16:07:01 -0400
commit5d03fb436fcfb1fe704cc7a66dec7bd2d21d49f1 (patch)
tree7884824b46c957bc5bfce46066e756d4ae4992db /doc
parent4a5c71d7c275b93238c629601526a87eca08e6fd (diff)
downloademacs-5d03fb436fcfb1fe704cc7a66dec7bd2d21d49f1.tar.gz
emacs-5d03fb436fcfb1fe704cc7a66dec7bd2d21d49f1.zip
* 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.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/functions.texi3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 46073677881..9888411667f 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -1240,7 +1240,8 @@ buffer: if @var{place} is just a symbol, then @var{function} is added to the
1240global value of @var{place}. Whereas if @var{place} is of the form 1240global value of @var{place}. Whereas if @var{place} is of the form
1241@code{(local @var{symbol})}, where @var{symbol} is an expression which returns 1241@code{(local @var{symbol})}, where @var{symbol} is an expression which returns
1242the variable name, then @var{function} will only be added in the 1242the variable name, then @var{function} will only be added in the
1243current buffer. 1243current buffer. Finally, if you want to modify a lexical variable, you will
1244have to use @code{(var @var{VARIABLE})}.
1244 1245
1245Every function added with @code{add-function} can be accompanied by an 1246Every function added with @code{add-function} can be accompanied by an
1246association list of properties @var{props}. Currently only two of those 1247association list of properties @var{props}. Currently only two of those