diff options
| author | Johan Bockgård | 2015-11-23 20:11:10 +0100 |
|---|---|---|
| committer | Johan Bockgård | 2015-11-23 21:01:02 +0100 |
| commit | e395cafbc1b3833d5738f7556e1ac33e8363aece (patch) | |
| tree | 41e2327582f670942b70bbd9df994b4805fc6001 /lisp | |
| parent | f146ea73a9ca6a5f628824bd9f287916573d7fe3 (diff) | |
| download | emacs-e395cafbc1b3833d5738f7556e1ac33e8363aece.tar.gz emacs-e395cafbc1b3833d5738f7556e1ac33e8363aece.zip | |
* lisp/emacs-lisp/nadvice.el (add-function): Fix debug spec.
(remove-function): Ditto. (Bug#20376)
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/emacs-lisp/nadvice.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el index 1882eb194f6..a1bc38ce2bf 100644 --- a/lisp/emacs-lisp/nadvice.el +++ b/lisp/emacs-lisp/nadvice.el | |||
| @@ -289,7 +289,10 @@ is also interactive. There are 3 cases: | |||
| 289 | argument (the interactive spec of OLDFUN, which it can pass to | 289 | argument (the interactive spec of OLDFUN, which it can pass to |
| 290 | `advice-eval-interactive-spec') and return the list of arguments to use. | 290 | `advice-eval-interactive-spec') and return the list of arguments to use. |
| 291 | - Else, use the interactive spec of FUNCTION and ignore the one of OLDFUN." | 291 | - Else, use the interactive spec of FUNCTION and ignore the one of OLDFUN." |
| 292 | (declare (debug t)) ;;(indent 2) | 292 | (declare |
| 293 | ;;(indent 2) | ||
| 294 | (debug (form [&or symbolp ("local" form) ("var" sexp) gv-place] | ||
| 295 | form &optional form))) | ||
| 293 | `(advice--add-function ,where (gv-ref ,(advice--normalize-place place)) | 296 | `(advice--add-function ,where (gv-ref ,(advice--normalize-place place)) |
| 294 | ,function ,props)) | 297 | ,function ,props)) |
| 295 | 298 | ||
| @@ -311,7 +314,8 @@ is also interactive. There are 3 cases: | |||
| 311 | If FUNCTION was not added to PLACE, do nothing. | 314 | If FUNCTION was not added to PLACE, do nothing. |
| 312 | Instead of FUNCTION being the actual function, it can also be the `name' | 315 | Instead of FUNCTION being the actual function, it can also be the `name' |
| 313 | of the piece of advice." | 316 | of the piece of advice." |
| 314 | (declare (debug t)) | 317 | (declare (debug ([&or symbolp ("local" form) ("var" sexp) gv-place] |
| 318 | form))) | ||
| 315 | (gv-letplace (getter setter) (advice--normalize-place place) | 319 | (gv-letplace (getter setter) (advice--normalize-place place) |
| 316 | (macroexp-let2 nil new `(advice--remove-function ,getter ,function) | 320 | (macroexp-let2 nil new `(advice--remove-function ,getter ,function) |
| 317 | `(unless (eq ,new ,getter) ,(funcall setter new))))) | 321 | `(unless (eq ,new ,getter) ,(funcall setter new))))) |