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.
This commit is contained in:
parent
22d463ed5c
commit
df7371b84e
4 changed files with 66 additions and 4 deletions
|
@ -130,5 +130,12 @@
|
|||
(let ((two 2) (three 3))
|
||||
(cl-destructuring-bind (x . y) (cons two three) (+ x!x! y!y!))))
|
||||
|
||||
(defun edebug-test-code-use-cl-macrolet (x)
|
||||
(cl-macrolet ((wrap (func &rest args)
|
||||
`(format "The result of applying %s to %s is %S"
|
||||
',func!func! ',args
|
||||
,(cons func args))))
|
||||
(wrap + 1 x)))
|
||||
|
||||
(provide 'edebug-test-code)
|
||||
;;; edebug-test-code.el ends here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue