diff options
author | Johan Bockgård <bojohan@gnu.org> | 2015-04-12 16:26:51 +0200 |
---|---|---|
committer | Johan Bockgård <bojohan@gnu.org> | 2015-04-12 16:26:51 +0200 |
commit | 66a53da5f0c15a1e69675e8157fbbc00a364bb80 (patch) | |
tree | d43f2ed1b7df3d9e3992e48036a06e0908a5a29c /lisp/emacs-lisp | |
parent | b62d7956bea87eba82a86bfeba2d637c7ef4016c (diff) | |
download | emacs-66a53da5f0c15a1e69675e8157fbbc00a364bb80.tar.gz emacs-66a53da5f0c15a1e69675e8157fbbc00a364bb80.tar.bz2 emacs-66a53da5f0c15a1e69675e8157fbbc00a364bb80.zip |
pcase.el: Edebug support for `app' and vector patterns
* lisp/emacs-lisp/pcase.el (pcase-FUN): New edebug spec.
(pcase-UPAT): Use it. Support `app' patterns.
(pcase-QPAT): Support vector patterns.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/pcase.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index 3a2fa4fdc81..bbb278c863e 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -78,17 +78,22 @@ ("`" 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 |