[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master defa5a95714 1/2: * lisp/emacs-lisp/cl-macs.el (cl-flet): Remove `
From: |
Stefan Monnier |
Subject: |
master defa5a95714 1/2: * lisp/emacs-lisp/cl-macs.el (cl-flet): Remove `&name` for (SYM EXP) case |
Date: |
Mon, 4 Sep 2023 17:14:20 -0400 (EDT) |
branch: master
commit defa5a9571472a67cfd03736ed38feca809bf962
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* 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 :-(
---
lisp/emacs-lisp/cl-macs.el | 15 ++++++++++-----
1 file 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.
\(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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master defa5a95714 1/2: * lisp/emacs-lisp/cl-macs.el (cl-flet): Remove `&name` for (SYM EXP) case,
Stefan Monnier <=