bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11495: 24.1.50; Edebug spec for `pcase'


From: Johan Bockgård
Subject: bug#11495: 24.1.50; Edebug spec for `pcase'
Date: Thu, 17 May 2012 01:07:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

There's a FIXME note for the debug spec of the `pcase' macro.

I think this should do the job:

    (def-edebug-spec
      pcase
      (form &rest (pcase-UPAT body)))

    (def-edebug-spec
      pcase-UPAT
      (&or symbolp
           ("or" &rest pcase-UPAT)
           ("and" &rest pcase-UPAT)
           ("`" pcase-QPAT)
           ("pred"
            &or lambda-expr
                ;; Punt on macros/special forms.
                ([&not functionp] fboundp &rest sexp)
                ([&or lambda-expr sexp] &rest form)
                sexp)
           ("guard" form)
           ("let" pcase-UPAT form)))

    (def-edebug-spec
      pcase-QPAT
      (&or ("," pcase-UPAT)
           (pcase-QPAT . [&or nil pcase-QPAT])
           sexp))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]