diff options
| -rw-r--r-- | lisp/emacs-lisp/edebug.el | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index d0668bbe54b..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." | |||
| 1725 | (t | 1725 | (t |
| 1726 | (error "Bad spec: %s" specs))))) | 1726 | (error "Bad spec: %s" specs))))) |
| 1727 | 1727 | ||
| 1728 | ((eq 'vector spec) | ||
| 1729 | (if (vectorp form) | ||
| 1730 | ;; Special case: match a vector with the specs. | ||
| 1731 | (let ((result (edebug-match-sublist | ||
| 1732 | (edebug-new-cursor | ||
| 1733 | form (cdr (edebug-top-offset cursor))) | ||
| 1734 | (cdr specs)))) | ||
| 1735 | (edebug-move-cursor cursor) | ||
| 1736 | (list (apply 'vector result))) | ||
| 1737 | (edebug-no-match cursor "Expected" specs))) | ||
| 1738 | |||
| 1728 | ((listp form) | 1739 | ((listp form) |
| 1729 | (prog1 | 1740 | (prog1 |
| 1730 | (list (edebug-match-sublist | 1741 | (list (edebug-match-sublist |
| @@ -1734,15 +1745,6 @@ expressions; a `progn' form will be returned enclosing these forms." | |||
| 1734 | specs)) | 1745 | specs)) |
| 1735 | (edebug-move-cursor cursor))) | 1746 | (edebug-move-cursor cursor))) |
| 1736 | 1747 | ||
| 1737 | ((and (eq 'vector spec) (vectorp form)) | ||
| 1738 | ;; Special case: match a vector with the specs. | ||
| 1739 | (let ((result (edebug-match-sublist | ||
| 1740 | (edebug-new-cursor | ||
| 1741 | form (cdr (edebug-top-offset cursor))) | ||
| 1742 | (cdr specs)))) | ||
| 1743 | (edebug-move-cursor cursor) | ||
| 1744 | (list (apply 'vector result)))) | ||
| 1745 | |||
| 1746 | (t (edebug-no-match cursor "Expected" specs))) | 1748 | (t (edebug-no-match cursor "Expected" specs))) |
| 1747 | ))) | 1749 | ))) |
| 1748 | 1750 | ||