mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-29 07:58:28 +00:00
Make Edebug specification for 'cl-defstruct' more lenient.
For example, 'xref-item' uses the list form of ':noinline'. * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Accept ':noinline' and ':named' with an argument. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-defstruct/edebug): New unit test.
This commit is contained in:
parent
637dde4aba
commit
f3df7916b2
@ -2911,7 +2911,8 @@ To see the documentation for a defined struct type, use
|
||||
[":include" symbolp &rest sexp] ;; Not finished.
|
||||
[":print-function" sexp]
|
||||
[":type" symbolp]
|
||||
[":named"]
|
||||
[":noinline" &optional sexp]
|
||||
[":named" &optional sexp]
|
||||
[":initial-offset" natnump])])]
|
||||
[&optional stringp]
|
||||
;; All the above is for the following def-form.
|
||||
|
@ -709,4 +709,22 @@ collection clause."
|
||||
;; Just make sure the forms can be instrumented.
|
||||
(eval-buffer))))
|
||||
|
||||
(ert-deftest cl-defstruct/edebug ()
|
||||
"Check that we can instrument `cl-defstruct' forms."
|
||||
(with-temp-buffer
|
||||
(dolist (form '((cl-defstruct cl-defstruct/edebug/1)
|
||||
(cl-defstruct (cl-defstruct/edebug/2
|
||||
:noinline))
|
||||
(cl-defstruct (cl-defstruct/edebug/3
|
||||
(:noinline t)))
|
||||
(cl-defstruct (cl-defstruct/edebug/4
|
||||
:named))
|
||||
(cl-defstruct (cl-defstruct/edebug/5
|
||||
(:named t)))))
|
||||
(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
|
||||
|
Loading…
Reference in New Issue
Block a user