* 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 999de2a5ea, cc0f546825, and 18c85306ac :-(
This commit is contained in:
Stefan Monnier 2023-09-04 17:13:45 -04:00
parent 9e05453a8c
commit defa5a9571

View file

@ -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)