diff options
| author | Jan D <jan.h.d@swipnet.se> | 2015-04-26 13:55:01 +0200 |
|---|---|---|
| committer | Jan D <jan.h.d@swipnet.se> | 2015-04-26 13:55:01 +0200 |
| commit | f92ac2e82ed199d6f25d2a59508e08addb1150ac (patch) | |
| tree | d7d7756e3dbce10d8f73c27815d815499f78c2bd /lisp/emacs-lisp/edebug.el | |
| parent | 5a094119ce79723108abd90a1fcc33721e964823 (diff) | |
| parent | a40869789fc5502e3d4e393b7c31d78cb7f29aa1 (diff) | |
| download | emacs-f92ac2e82ed199d6f25d2a59508e08addb1150ac.tar.gz | |
Merge branch 'master' into cairo
Diffstat (limited to 'lisp/emacs-lisp/edebug.el')
| -rw-r--r-- | lisp/emacs-lisp/edebug.el | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index aa7cdf96337..98fb7e9888c 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -1725,6 +1725,17 @@ expressions; a `progn' form will be returned enclosing these forms." (t (error "Bad spec: %s" specs))))) + ((eq 'vector spec) + (if (vectorp form) + ;; Special case: match a vector with the specs. + (let ((result (edebug-match-sublist + (edebug-new-cursor + form (cdr (edebug-top-offset cursor))) + (cdr specs)))) + (edebug-move-cursor cursor) + (list (apply 'vector result))) + (edebug-no-match cursor "Expected" specs))) + ((listp form) (prog1 (list (edebug-match-sublist @@ -1734,15 +1745,6 @@ expressions; a `progn' form will be returned enclosing these forms." specs)) (edebug-move-cursor cursor))) - ((and (eq 'vector spec) (vectorp form)) - ;; Special case: match a vector with the specs. - (let ((result (edebug-match-sublist - (edebug-new-cursor - form (cdr (edebug-top-offset cursor))) - (cdr specs)))) - (edebug-move-cursor cursor) - (list (apply 'vector result)))) - (t (edebug-no-match cursor "Expected" specs))) ))) @@ -1869,8 +1871,13 @@ expressions; a `progn' form will be returned enclosing these forms." ;; Like body but body is wrapped in edebug-enter form. ;; The body is assumed to be executing inside of the function context. ;; Not to be used otherwise. - (let ((edebug-inside-func t)) - (list (edebug-wrap-def-body (edebug-forms cursor))))) + (let* ((edebug-inside-func t) + (forms (edebug-forms cursor))) + ;; If there's no form, there's nothing to wrap! + ;; This happens to handle bug#20281, tho maybe a better fix would be to + ;; improve the `defun' spec. + (when forms + (list (edebug-wrap-def-body forms))))) ;;;; Edebug Form Specs |
