From: Stefan Monnier Date: Mon, 4 Sep 2023 21:13:45 +0000 (-0400) Subject: * lisp/emacs-lisp/cl-macs.el (cl-flet): Remove `&name` for (SYM EXP) case X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=defa5a9571472a67cfd03736ed38feca809bf962;p=emacs.git * 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 :-( --- 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. \(fn ((FUNC ARGLIST BODY...) ...) FORM...)" (declare (indent 1) - (debug ((&rest [&or (&define [&name symbolp "@cl-flet@"] + ;; The first (symbolp form) case doesn't use `&name' because + ;; it's hard to associate this name with the body of the function + ;; that `form' will return (bug#65344). + ;; We could try and use a `&name' for those cases where the + ;; body of the function can be found, (e.g. the form wraps + ;; some `prog1/progn/let' around the final `lambda'), but it's + ;; not clear it's worth the trouble. + (debug ((&rest [&or (symbolp form) + (&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)]) + def-body)]) cl-declarations body))) (let ((binds ()) (newenv macroexpand-all-environment)) (dolist (binding bindings)