From: Gemini Lasswell <gazally@runbox.com>
To: 24753@debbugs.gnu.org
Subject: bug#24753: Patch (was: bug#24753: 26.0.50; Error using Edebug on code that uses cl-defmethod)
Date: Thu, 02 Mar 2017 18:49:34 -0800 [thread overview]
Message-ID: <m2bmtj6pmp.fsf_-_@runbox.com> (raw)
In-Reply-To: <m2eg37u3jj.fsf@rainbow.local> (Gemini Lasswell's message of "Sat, 22 Oct 2016 20:50:40 -0700")
[-- Attachment #1: Type: text/plain, Size: 328 bytes --]
Gemini Lasswell <gazally@runbox.com> writes:
Here is a patch which fixes all the problems that I know of with the
Edebug specs for cl-defmethod and defmethod, which are:
- The args out of range error.
- The incorrect usage of list instead of listp.
- Failure to handle the :extra keyword for cl-defmethod (see bug#23995).
[-- Attachment #2: 0001-Fix-Edebug-specs-for-cl-defmethod-and-defmethod.patch --]
[-- Type: text/plain, Size: 2536 bytes --]
From 53001116d607622fb4cf118b6389f46719a9ba43 Mon Sep 17 00:00:00 2001
From: Gemini Lasswell <gazally@runbox.com>
Date: Thu, 2 Mar 2017 18:43:46 -0800
Subject: [PATCH] Fix Edebug specs for cl-defmethod and defmethod
* lisp/emacs-lisp/cl-generic.el (cl-defmethod): Change Edebug spec
to make Edebug generate a new symbol for each method (Bug#24753) and
to support a string following :extra (Bug#23995).
* lisp/emacs-lisp/eieio-compat.el (defmethod): Change Edebug spec to
make Edebug generate a new symbol for each method (Bug#24753).
---
lisp/emacs-lisp/cl-generic.el | 7 ++++---
lisp/emacs-lisp/eieio-compat.el | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
index 8517e1e..adb1ca6 100644
--- a/lisp/emacs-lisp/cl-generic.el
+++ b/lisp/emacs-lisp/cl-generic.el
@@ -413,10 +413,11 @@ cl-defmethod
(declare (doc-string 3) (indent 2)
(debug
(&define ; this means we are defining something
- [&or name ("setf" :name setf name)]
+ [&or symbolp ("setf" symbolp)]
;; ^^ This is the methods symbol
- [ &optional keywordp ] ; this is key :before etc
- list ; arguments
+ [ &optional keywordp ; this is key :before etc
+ &optional stringp ] ; :extra can be followed by a string
+ listp ; arguments
[ &optional stringp ] ; documentation string
def-body))) ; part to be debugged
(let ((qualifiers nil))
diff --git a/lisp/emacs-lisp/eieio-compat.el b/lisp/emacs-lisp/eieio-compat.el
index 888d85f..a44b0a7 100644
--- a/lisp/emacs-lisp/eieio-compat.el
+++ b/lisp/emacs-lisp/eieio-compat.el
@@ -105,10 +105,10 @@ defmethod
(declare (doc-string 3) (obsolete cl-defmethod "25.1")
(debug
(&define ; this means we are defining something
- [&or name ("setf" :name setf name)]
+ [&or symbolp ("setf" symbolp)]
;; ^^ This is the methods symbol
[ &optional symbolp ] ; this is key :before etc
- list ; arguments
+ listp ; arguments
[ &optional stringp ] ; documentation string
def-body ; part to be debugged
)))
--
2.10.1
next prev parent reply other threads:[~2017-03-03 2:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-21 15:15 bug#24753: 26.0.50; Error using Edebug on code that uses cl-defmethod Gemini Lasswell
2016-10-23 3:50 ` Gemini Lasswell
2017-03-03 2:49 ` Gemini Lasswell [this message]
2017-04-11 12:16 ` Dmitry Gutov
2017-04-26 21:39 ` Gemini Lasswell
2017-05-02 1:11 ` Dmitry Gutov
2017-05-02 7:24 ` Eli Zaretskii
2017-05-02 8:41 ` Dmitry Gutov
2017-05-07 2:11 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2bmtj6pmp.fsf_-_@runbox.com \
--to=gazally@runbox.com \
--cc=24753@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).