summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/edebug.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/edebug.el')
-rw-r--r--lisp/emacs-lisp/edebug.el27
1 files changed, 15 insertions, 12 deletions
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index a070ff25d17..77523de32c5 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -2017,15 +2017,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.
@@ -2036,6 +2035,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))
@@ -3254,15 +3257,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)
@@ -3277,6 +3271,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)