aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2023-09-04 17:13:45 -0400
committerStefan Monnier2023-09-04 17:13:45 -0400
commitdefa5a9571472a67cfd03736ed38feca809bf962 (patch)
treeb71650ba1d0c49d159876a41e693d670f885895a
parent9e05453a8c23f882d2849b21a27e752607cfcf3b (diff)
downloademacs-defa5a9571472a67cfd03736ed38feca809bf962.tar.gz
emacs-defa5a9571472a67cfd03736ed38feca809bf962.zip
* lisp/emacs-lisp/cl-macs.el (cl-flet): Remove `&name` for (SYM EXP) case
The new/current Edebug spec gives the name `SYM@cl-flet@NN` to the expression building that function rather than to the body of that function as would be expected, leading to misleading code coverage. This basically reverts 999de2a5ea36, cc0f546825e0, and 18c85306ac21 :-(
-rw-r--r--lisp/emacs-lisp/cl-macs.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 850fbc69180..32a266aa26a 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2075,15 +2075,20 @@ info node `(cl) Function Bindings' for details.
2075 2075
2076\(fn ((FUNC ARGLIST BODY...) ...) FORM...)" 2076\(fn ((FUNC ARGLIST BODY...) ...) FORM...)"
2077 (declare (indent 1) 2077 (declare (indent 1)
2078 (debug ((&rest [&or (&define [&name symbolp "@cl-flet@"] 2078 ;; The first (symbolp form) case doesn't use `&name' because
2079 ;; it's hard to associate this name with the body of the function
2080 ;; that `form' will return (bug#65344).
2081 ;; We could try and use a `&name' for those cases where the
2082 ;; body of the function can be found, (e.g. the form wraps
2083 ;; some `prog1/progn/let' around the final `lambda'), but it's
2084 ;; not clear it's worth the trouble.
2085 (debug ((&rest [&or (symbolp form)
2086 (&define [&name symbolp "@cl-flet@"]
2079 [&name [] gensym] ;Make it unique! 2087 [&name [] gensym] ;Make it unique!
2080 cl-lambda-list 2088 cl-lambda-list
2081 cl-declarations-or-string 2089 cl-declarations-or-string
2082 [&optional ("interactive" interactive)] 2090 [&optional ("interactive" interactive)]
2083 def-body) 2091 def-body)])
2084 (&define [&name symbolp "@cl-flet@"]
2085 [&name [] gensym] ;Make it unique!
2086 def-form)])
2087 cl-declarations body))) 2092 cl-declarations body)))
2088 (let ((binds ()) (newenv macroexpand-all-environment)) 2093 (let ((binds ()) (newenv macroexpand-all-environment))
2089 (dolist (binding bindings) 2094 (dolist (binding bindings)