summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp
diff options
context:
space:
mode:
authorGerd Möllmann <gerd@gnu.org>2023-08-21 09:16:17 +0200
committerGerd Möllmann <gerd@gnu.org>2023-08-21 09:27:49 +0200
commit18c85306ac211402e4772bdb94b63d300a2ac119 (patch)
tree571c33ce5df8d2115701b30f3e845c4487f90ee3 /test/lisp/emacs-lisp
parentc74a99dcd15338d62f114636344753028410a309 (diff)
downloademacs-18c85306ac211402e4772bdb94b63d300a2ac119.tar.gz
emacs-18c85306ac211402e4772bdb94b63d300a2ac119.tar.bz2
emacs-18c85306ac211402e4772bdb94b63d300a2ac119.zip
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.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r--test/lisp/emacs-lisp/cl-macs-tests.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/cl-macs-tests.el b/test/lisp/emacs-lisp/cl-macs-tests.el
index 983cbfc8bc7..56a49fd865a 100644
--- a/test/lisp/emacs-lisp/cl-macs-tests.el
+++ b/test/lisp/emacs-lisp/cl-macs-tests.el
@@ -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)