edebug.el: Disambiguate vector specifications
* lisp/emacs-lisp/edebug.el (edebug-match-list): Always treat `(vector ...)' as a vector specification, not as a sublist.
This commit is contained in:
parent
f4dbec453d
commit
b62d7956be
1 changed files with 11 additions and 9 deletions
|
@ -1725,6 +1725,17 @@ expressions; a `progn' form will be returned enclosing these forms."
|
||||||
(t
|
(t
|
||||||
(error "Bad spec: %s" specs)))))
|
(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)
|
((listp form)
|
||||||
(prog1
|
(prog1
|
||||||
(list (edebug-match-sublist
|
(list (edebug-match-sublist
|
||||||
|
@ -1734,15 +1745,6 @@ expressions; a `progn' form will be returned enclosing these forms."
|
||||||
specs))
|
specs))
|
||||||
(edebug-move-cursor cursor)))
|
(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)))
|
(t (edebug-no-match cursor "Expected" specs)))
|
||||||
)))
|
)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue