1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 02:51:31 -08:00

Fix debug spec of cl-flet (bug#65344)

* lisp/emacs-lisp/cl-macs.el (cl-flet): Fix debug spec.
(cl-defun): Allow only symbols as function names in debug spec.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-flet/edebug): New test
case.
This commit is contained in:
Gerd Möllmann 2023-08-21 09:16:17 +02:00
parent c74a99dcd1
commit 18c85306ac
2 changed files with 23 additions and 4 deletions

View file

@ -708,6 +708,23 @@ collection clause."
(f lex-var)))))
(should (equal (f nil) 'a)))))
(ert-deftest cl-flet/edebug ()
"Check that we can instrument `cl-flet' forms (bug#65344)."
(with-temp-buffer
(print '(cl-flet (;; "Obscure" form of binding supported by cl-flet
(x (progn (list 1 2) (lambda ())))
;; Destructuring lambda-list
(y ((min max)) (list min max))
;; Regular binding plus shadowing.
(z (a) a)
(z (a) a))
(y '(1 2)))
(current-buffer))
(let ((edebug-all-forms t)
(edebug-initial-mode 'Go-nonstop))
;; Just make sure the forms can be instrumented.
(eval-buffer))))
(ert-deftest cl-macs--progv ()
(defvar cl-macs--test)
(defvar cl-macs--test1)