diff options
author | K. Handa <handa@gnu.org> | 2017-10-08 11:56:06 +0900 |
---|---|---|
committer | K. Handa <handa@gnu.org> | 2017-10-08 11:56:06 +0900 |
commit | a9b72976deec9b266950865581a626ec8f7b74f4 (patch) | |
tree | 7b5fb778bad612133b54ea3a39aa8356b6bdbaf7 /lisp/emacs-lisp/edebug.el | |
parent | 64baaff8c5f70b7d637ac37304c4377e955b3f09 (diff) | |
parent | c194fb61c638490e3510864fe2750814af8c3719 (diff) | |
download | emacs-a9b72976deec9b266950865581a626ec8f7b74f4.tar.gz emacs-a9b72976deec9b266950865581a626ec8f7b74f4.tar.bz2 emacs-a9b72976deec9b266950865581a626ec8f7b74f4.zip |
Merge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs into emacs-26
Diffstat (limited to 'lisp/emacs-lisp/edebug.el')
-rw-r--r-- | lisp/emacs-lisp/edebug.el | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index dbc56e272fd..d00b14e803e 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -1986,15 +1986,14 @@ expressions; a `progn' form will be returned enclosing these forms." (def-edebug-spec defvar (symbolp &optional form stringp)) (def-edebug-spec defun - (&define name lambda-list - [&optional stringp] + (&define name lambda-list lambda-doc [&optional ("declare" &rest sexp)] [&optional ("interactive" interactive)] def-body)) (def-edebug-spec defmacro ;; FIXME: Improve `declare' so we can Edebug gv-expander and ;; gv-setter declarations. - (&define name lambda-list [&optional stringp] + (&define name lambda-list lambda-doc [&optional ("declare" &rest sexp)] def-body)) (def-edebug-spec arglist lambda-list) ;; deprecated - use lambda-list. @@ -2005,6 +2004,10 @@ expressions; a `progn' form will be returned enclosing these forms." &optional ["&rest" arg] ))) +(def-edebug-spec lambda-doc + (&optional [&or stringp + (&define ":documentation" def-form)])) + (def-edebug-spec interactive (&optional &or stringp def-form)) @@ -3204,15 +3207,6 @@ generated symbols for methods. If a function or method to instrument cannot be found, signal an error." (let ((func-marker (get func 'edebug))) (cond - ((and (markerp func-marker) (marker-buffer func-marker)) - ;; It is uninstrumented, so instrument it. - (with-current-buffer (marker-buffer func-marker) - (goto-char func-marker) - (edebug-eval-top-level-form) - (list func))) - ((consp func-marker) - (message "%s is already instrumented." func) - (list func)) ((cl-generic-p func) (let ((method-defs (cl--generic-method-files func)) symbols) @@ -3227,6 +3221,15 @@ instrument cannot be found, signal an error." (edebug-eval-top-level-form) (push (edebug-form-data-symbol) symbols)))) symbols)) + ((and (markerp func-marker) (marker-buffer func-marker)) + ;; It is uninstrumented, so instrument it. + (with-current-buffer (marker-buffer func-marker) + (goto-char func-marker) + (edebug-eval-top-level-form) + (list func))) + ((consp func-marker) + (message "%s is already instrumented." func) + (list func)) (t (let ((loc (find-function-noselect func t))) (unless (cdr loc) |