]> git.eshelyaron.com Git - emacs.git/commitdiff
pcase.el: Edebug support for `app' and vector patterns
authorJohan Bockgård <bojohan@gnu.org>
Sun, 12 Apr 2015 14:26:51 +0000 (16:26 +0200)
committerJohan Bockgård <bojohan@gnu.org>
Sun, 12 Apr 2015 14:26:51 +0000 (16:26 +0200)
* lisp/emacs-lisp/pcase.el (pcase-FUN): New edebug spec.
(pcase-UPAT): Use it. Support `app' patterns.
(pcase-QPAT): Support vector patterns.

lisp/emacs-lisp/pcase.el

index 3a2fa4fdc81bdcf59242a2220fe3a2f9bc66a66c..bbb278c863e136f25aa3fb0015428e1680408c8f 100644 (file)
        ("`" pcase-QPAT)
        ("guard" form)
        ("let" pcase-UPAT form)
-       ("pred"
-        &or lambda-expr
-        ;; Punt on macros/special forms.
-        (functionp &rest form)
-        sexp)
+       ("pred" pcase-FUN)
+       ("app" pcase-FUN pcase-UPAT)
        sexp))
 
 (def-edebug-spec
   pcase-QPAT
   (&or ("," pcase-UPAT)
        (pcase-QPAT . pcase-QPAT)
+       (vector &rest pcase-QPAT)
+       sexp))
+
+(def-edebug-spec
+  pcase-FUN
+  (&or lambda-expr
+       ;; Punt on macros/special forms.
+       (functionp &rest form)
        sexp))
 
 ;;;###autoload