]> git.eshelyaron.com Git - emacs.git/commitdiff
; Reverse debug spec of cl-flet (bug#65344)
authorGerd Möllmann <gerd@gnu.org>
Tue, 22 Aug 2023 08:16:40 +0000 (10:16 +0200)
committerGerd Möllmann <gerd@gnu.org>
Tue, 22 Aug 2023 08:16:40 +0000 (10:16 +0200)
lisp/emacs-lisp/cl-macs.el

index 4cc43995c1256a253cd123f56e3028e824a22dd4..254a10781fe02b0f67cd962ffcb893159134b0b8 100644 (file)
@@ -2075,15 +2075,22 @@ info node `(cl) Function Bindings' for details.
 
 \(fn ((FUNC ARGLIST BODY...) ...) FORM...)"
   (declare (indent 1)
-           (debug ((&rest [&or (&define [&name symbolp "@cl-flet@"]
-                                        [&name [] gensym] ;Make it unique!
-                                        cl-lambda-list
-                                        cl-declarations-or-string
-                                        [&optional ("interactive" interactive)]
-                                        def-body)
-                               (&define [&name symbolp "@cl-flet@"]
-                                        [&name [] gensym] ;Make it unique!
-                                        def-form)])
+           (debug ((&rest [&or
+                           ;; This spec must come first so that a
+                           ;; binding of the form (FN FORM) is always
+                           ;; interpreted as FORM being a form
+                           ;; returning a function, instead of FORM
+                           ;; being a cl-lambda-list and FN returning
+                           ;; nil.
+                           (&define [&name symbolp "@cl-flet@"]
+                                    [&name [] gensym] ;Make it unique!
+                                    def-form)
+                           (&define [&name symbolp "@cl-flet@"]
+                                    [&name [] gensym] ;Make it unique!
+                                    cl-lambda-list
+                                    cl-declarations-or-string
+                                    [&optional ("interactive" interactive)]
+                                    def-body)])
                    cl-declarations body)))
   (let ((binds ()) (newenv macroexpand-all-environment))
     (dolist (binding bindings)