diff options
author | John Wiegley <johnw@newartisans.com> | 2015-12-29 21:39:08 -0800 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2015-12-29 21:39:08 -0800 |
commit | ec0a80cc283badc7f7fd5ef78512dde6d34b1355 (patch) | |
tree | 7190e0fb3d4aa06018d8cf997f06b806fb09a9c8 /lisp/emacs-lisp/nadvice.el | |
parent | d259328fb87db8cc67d52771efcfa653e52c5b71 (diff) | |
parent | e823c34072bf045800d91e12c7ddb61fa23c6e30 (diff) | |
download | emacs-25-merge.tar.gz |
Merge emacs-25 into master (using imerge)emacs-25-merge
Diffstat (limited to 'lisp/emacs-lisp/nadvice.el')
-rw-r--r-- | lisp/emacs-lisp/nadvice.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el index 2cd34e12810..a1bc38ce2bf 100644 --- a/lisp/emacs-lisp/nadvice.el +++ b/lisp/emacs-lisp/nadvice.el @@ -279,7 +279,7 @@ a special meaning: whereas a depth of -100 means that the advice should be outermost. If PLACE is a symbol, its `default-value' will be affected. -Use (local 'SYMBOL) if you want to apply FUNCTION to SYMBOL buffer-locally. +Use (local \\='SYMBOL) if you want to apply FUNCTION to SYMBOL buffer-locally. Use (var VAR) if you want to apply FUNCTION to the (lexical) VAR. If one of FUNCTION or OLDFUN is interactive, then the resulting function @@ -289,7 +289,10 @@ is also interactive. There are 3 cases: argument (the interactive spec of OLDFUN, which it can pass to `advice-eval-interactive-spec') and return the list of arguments to use. - Else, use the interactive spec of FUNCTION and ignore the one of OLDFUN." - (declare (debug t)) ;;(indent 2) + (declare + ;;(indent 2) + (debug (form [&or symbolp ("local" form) ("var" sexp) gv-place] + form &optional form))) `(advice--add-function ,where (gv-ref ,(advice--normalize-place place)) ,function ,props)) @@ -311,7 +314,8 @@ is also interactive. There are 3 cases: If FUNCTION was not added to PLACE, do nothing. Instead of FUNCTION being the actual function, it can also be the `name' of the piece of advice." - (declare (debug t)) + (declare (debug ([&or symbolp ("local" form) ("var" sexp) gv-place] + form))) (gv-letplace (getter setter) (advice--normalize-place place) (macroexp-let2 nil new `(advice--remove-function ,getter ,function) `(unless (eq ,new ,getter) ,(funcall setter new))))) |