From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Gemini Lasswell Newsgroups: gmane.emacs.bugs 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 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1488509421 27604 195.159.176.226 (3 Mar 2017 02:50:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 3 Mar 2017 02:50:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (darwin) To: 24753@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 03 03:50:17 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cjdII-0005vF-PZ for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Mar 2017 03:50:10 +0100 Original-Received: from localhost ([::1]:55774 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjdIN-0002Gs-8d for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Mar 2017 21:50:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjdIE-0002EL-Tx for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2017 21:50:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cjdIB-0004qp-0a for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2017 21:50:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39021) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cjdIA-0004qP-Ts for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2017 21:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cjdIA-0003Qu-Jt for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2017 21:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gemini Lasswell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Mar 2017 02:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24753 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24753-submit@debbugs.gnu.org id=B24753.148850939213176 (code B ref 24753); Fri, 03 Mar 2017 02:50:02 +0000 Original-Received: (at 24753) by debbugs.gnu.org; 3 Mar 2017 02:49:52 +0000 Original-Received: from localhost ([127.0.0.1]:37220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cjdI0-0003QR-7X for submit@debbugs.gnu.org; Thu, 02 Mar 2017 21:49:52 -0500 Original-Received: from aibo.runbox.com ([91.220.196.211]:49896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cjdHy-0003QI-SB for 24753@debbugs.gnu.org; Thu, 02 Mar 2017 21:49:51 -0500 Original-Received: from [10.9.9.212] (helo=mailfront12.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1cjdHw-0005jf-Fv for 24753@debbugs.gnu.org; Fri, 03 Mar 2017 03:49:48 +0100 Original-Received: from c-24-22-244-161.hsd1.wa.comcast.net ([24.22.244.161] helo=rainbow.local) by mailfront12.runbox.com with esmtpsa (uid:179284 ) (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1cjdHq-0001IJ-OI for 24753@debbugs.gnu.org; Fri, 03 Mar 2017 03:49:43 +0100 In-Reply-To: (Gemini Lasswell's message of "Sat, 22 Oct 2016 20:50:40 -0700") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:130079 Archived-At: --=-=-= Content-Type: text/plain Gemini Lasswell 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). --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=0001-Fix-Edebug-specs-for-cl-defmethod-and-defmethod.patch >From 53001116d607622fb4cf118b6389f46719a9ba43 Mon Sep 17 00:00:00 2001 From: Gemini Lasswell 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 --=-=-=--