diff options
author | Philipp Stephani <phst@google.com> | 2022-03-03 19:56:09 +0100 |
---|---|---|
committer | Philipp Stephani <phst@google.com> | 2022-03-03 19:57:00 +0100 |
commit | aeb25f9d3d12a18ef3881e23b32a34615355d4d0 (patch) | |
tree | fb5dd277fb3bd36e5d807557962910ab3aacdca0 /test/lisp/emacs-lisp | |
parent | dc8a692f97fdafaa31001ab0620394525103ddb7 (diff) | |
download | emacs-aeb25f9d3d12a18ef3881e23b32a34615355d4d0.tar.gz emacs-aeb25f9d3d12a18ef3881e23b32a34615355d4d0.tar.bz2 emacs-aeb25f9d3d12a18ef3881e23b32a34615355d4d0.zip |
Teach Edebug about the special '&whole' syntax for compiler macros.
* lisp/emacs-lisp/cl-macs.el (cl-define-compiler-macro-list): New
Edebug element specification.
(cl-define-compiler-macro): Use it.
* test/lisp/emacs-lisp/cl-macs-tests.el
(cl-define-compiler-macro/edebug): New unit test.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r-- | test/lisp/emacs-lisp/cl-macs-tests.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/cl-macs-tests.el b/test/lisp/emacs-lisp/cl-macs-tests.el index 008ec0de4a6..036ee30966b 100644 --- a/test/lisp/emacs-lisp/cl-macs-tests.el +++ b/test/lisp/emacs-lisp/cl-macs-tests.el @@ -23,6 +23,7 @@ (require 'cl-lib) (require 'cl-macs) +(require 'edebug) (require 'ert) @@ -694,4 +695,18 @@ collection clause." (list cl-macs--test1 cl-macs--test2)) '(1 2)))) +(ert-deftest cl-define-compiler-macro/edebug () + "Check that we can instrument compiler macros." + (with-temp-buffer + (dolist (form '((defun cl-define-compiler-macro/edebug (a b) nil) + (cl-define-compiler-macro + cl-define-compiler-macro/edebug + (&whole w a b) + w))) + (print form (current-buffer))) + (let ((edebug-all-defs t) + (edebug-initial-mode 'Go-nonstop)) + ;; Just make sure the forms can be instrumented. + (eval-buffer)))) + ;;; cl-macs-tests.el ends here |