GNU bug report logs -
#27747
26.0.50; cl-defgeneric does not have an Edebug spec
Previous Next
Reported by: Gemini Lasswell <gazally <at> runbox.com>
Date: Tue, 18 Jul 2017 05:08:01 UTC
Severity: normal
Found in version 26.0.50
Done: Gemini Lasswell <gazally <at> runbox.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27747 in the body.
You can then email your comments to 27747 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27747
; Package
emacs
.
(Tue, 18 Jul 2017 05:08:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gemini Lasswell <gazally <at> runbox.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 18 Jul 2017 05:08:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
There is no Edebug spec for cl-defgeneric, which means that default
method implementations and methods defined using its :method keyword
can't be Edebugged.
To reproduce the problem, start with this bit of code in a buffer:
(cl-defgeneric my-say (obj)
"Say something about OBJ."
(message "See the %s!" obj))
(cl-defmethod my-say ((obj number))
(message "See the number %s!" obj))
Then:
M-x edebug-all-defs RET
M-x eval-buffer RET
M-: (my-say "cat") RET
Result: the command completes without Edebug starting.
This works correctly:
M-: (my-say 3) RET
Reply sent
to
Gemini Lasswell <gazally <at> runbox.com>
:
You have taken responsibility.
(Fri, 06 Oct 2017 18:40:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Gemini Lasswell <gazally <at> runbox.com>
:
bug acknowledged by developer.
(Fri, 06 Oct 2017 18:40:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 27747-done <at> debbugs.gnu.org (full text, mbox):
This is fixed by the patch for bug#24773, just pushed to emacs-26.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27747
; Package
emacs
.
(Mon, 23 Oct 2017 17:53:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 27747 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Here's a revision to the cl-defgeneric Edebug spec, because I missed
this case:
(cl-defgeneric (setf foo) (v args))
which isn't documented but lets you create a generalized variable.
Also, the Edebug spec for cl-lambda-list isn't necessarily loaded and
isn't correct for cl-defgeneric anyway. Since there isn't any code for
Edebug to instrument inside the argument list, it can just be matched
with listp.
To reproduce these problems, start with emacs -Q and load
test/lisp/emacs-lisp/cl-generic-tests.el, then use edebug-all-defs and
eval-buffer.
[0001-Handle-generic-variables-in-cl-defgeneric-Edebug-spe.patch (text/plain, inline)]
From 912942457d93850b2d444cf25cf7e71e79259357 Mon Sep 17 00:00:00 2001
From: Gemini Lasswell <gazally <at> runbox.com>
Date: Mon, 23 Oct 2017 10:13:00 -0700
Subject: [PATCH] Handle generic variables in cl-defgeneric Edebug spec
*lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Match (setf name)
and replace incorrect cl-lambda-args with listp in Edebug spec.
---
lisp/emacs-lisp/cl-generic.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
index 62befd4742..0027899679 100644
--- a/lisp/emacs-lisp/cl-generic.el
+++ b/lisp/emacs-lisp/cl-generic.el
@@ -206,7 +206,8 @@ cl-defgeneric
\(fn NAME ARGS [DOC-STRING] [OPTIONS-AND-METHODS...] &rest DEFAULT-BODY)"
(declare (indent 2) (doc-string 3)
(debug
- (&define name cl-lambda-list lambda-doc
+ (&define [&or name ("setf" name :name setf)] listp
+ lambda-doc
[&rest [&or
("declare" &rest sexp)
(":argument-precedence-order" &rest sexp)
--
2.14.2
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 21 Nov 2017 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 157 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.