all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gemini Lasswell <gazally@runbox.com>
To: 27747@debbugs.gnu.org
Subject: bug#27747: 26.0.50; cl-defgeneric does not have an Edebug spec
Date: Mon, 23 Oct 2017 10:52:41 -0700	[thread overview]
Message-ID: <87mv4hsqdy.fsf@runbox.com> (raw)
In-Reply-To: <87iniqjpun.fsf@chinook> (Gemini Lasswell's message of "Mon, 17 Jul 2017 22:06:40 -0700")

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]

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.


[-- Attachment #2: 0001-Handle-generic-variables-in-cl-defgeneric-Edebug-spe.patch --]
[-- Type: text/plain, Size: 1116 bytes --]

From 912942457d93850b2d444cf25cf7e71e79259357 Mon Sep 17 00:00:00 2001
From: Gemini Lasswell <gazally@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


      parent reply	other threads:[~2017-10-23 17:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18  5:06 bug#27747: 26.0.50; cl-defgeneric does not have an Edebug spec Gemini Lasswell
2017-10-06 18:39 ` Gemini Lasswell
2017-10-23 17:52 ` Gemini Lasswell [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mv4hsqdy.fsf@runbox.com \
    --to=gazally@runbox.com \
    --cc=27747@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.