diff options
author | Gemini Lasswell <gazally@runbox.com> | 2018-07-20 21:54:00 -0700 |
---|---|---|
committer | Gemini Lasswell <gazally@runbox.com> | 2018-08-01 13:59:49 -0700 |
commit | df7371b84e9cfbb6e62c3196c2bc588eb934b835 (patch) | |
tree | 9321571f27ac46fc4a45856fa4564c6bccc36bac /lisp/emacs-lisp/cl-macs.el | |
parent | 22d463ed5ca262e1d8893b115c3f1237485fc7e0 (diff) | |
download | emacs-df7371b84e9cfbb6e62c3196c2bc588eb934b835.tar.gz emacs-df7371b84e9cfbb6e62c3196c2bc588eb934b835.tar.bz2 emacs-df7371b84e9cfbb6e62c3196c2bc588eb934b835.zip |
Fix Edebug spec for cl-macrolet (bug#29919)
Add an Edebug matching function for cl-macrolet which keeps track of
its bindings and treats them as macros without Edebug specs when found
in the body of the expression.
* lisp/emacs-lisp/edebug.el (edebug--cl-macrolet-defs): New variable.
(edebug-list-form-args): Use it.
(edebug--current-cl-macrolet-defs): New variable.
(edebug-match-cl-macrolet-expr, edebug-match-cl-macrolet-name)
(edebug-match-cl-macrolet-body): New functions.
* lisp/emacs-lisp/cl-macs.el (cl-macrolet): Use cl-macrolet-expr
for Edebug spec.
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-cl-macrolet):
New test.
* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
(edebug-test-code-use-cl-macrolet): New function.
Diffstat (limited to 'lisp/emacs-lisp/cl-macs.el')
-rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 011965acb54..d0d1c3b156a 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2083,10 +2083,7 @@ This is like `cl-flet', but for macros instead of functions. \(fn ((NAME ARGLIST BODY...) ...) FORM...)" (declare (indent 1) - (debug - ((&rest (&define name (&rest arg) cl-declarations-or-string - def-body)) - cl-declarations body))) + (debug (cl-macrolet-expr))) (if (cdr bindings) `(cl-macrolet (,(car bindings)) (cl-macrolet ,(cdr bindings) ,@body)) (if (null bindings) (macroexp-progn body) |