GNU bug report logs - #15587
[PATCH] Edebug `destructuring-bind' dotted spec

Previous Next

Package: emacs;

Reported by: Oleh <oleh.krehel <at> gmail.com>

Date: Fri, 11 Oct 2013 10:41:01 UTC

Severity: normal

Tags: confirmed, patch

Merged with 6415, 6566, 24885

Found in versions 23.1.50, 23.2, 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 15587 in the body.
You can then email your comments to 15587 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15587; Package emacs. (Fri, 11 Oct 2013 10:41:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Oleh <oleh.krehel <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 11 Oct 2013 10:41:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Oleh <oleh.krehel <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Edebug `destructuring-bind' dotted spec
Date: Fri, 11 Oct 2013 12:39:37 +0200
[Message part 1 (text/plain, inline)]
Hi,

Currently it's not possible to edebug

(defun foo (z)
  (destructuring-bind (x . y) z (+ x y)))

I attach a small patch to fix this.

[0001-emacs-lisp-cl-macs.el-cl-destructuring-bind-added-do.patch (text/x-diff, inline)]
From 51a191c06f210eecf594be384e9b835afb9a818f Mon Sep 17 00:00:00 2001
From: Oleh Krehel <ohwoeowho <at> gmail.com>
Date: Fri, 11 Oct 2013 12:34:03 +0200
Subject: [PATCH] * emacs-lisp/cl-macs.el: (cl-destructuring-bind): added
 dotted form as an option for edebug.

Edebug will now work for:

(defun foo (z)
  (destructuring-bind (x . y) z (+ x y)))
---
 emacs-lisp/cl-macs.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/emacs-lisp/cl-macs.el b/emacs-lisp/cl-macs.el
index 60fdc09..a84e677 100644
--- a/emacs-lisp/cl-macs.el
+++ b/emacs-lisp/cl-macs.el
@@ -565,7 +565,7 @@ its argument list allows full Common Lisp conventions."
 (defmacro cl-destructuring-bind (args expr &rest body)
   "Bind the variables in ARGS to the result of EXPR and execute BODY."
   (declare (indent 2)
-           (debug (&define cl-macro-list def-form cl-declarations def-body)))
+           (debug (&define [&or cl-macro-list (sexp . sexp)] def-form cl-declarations def-body)))
   (let* ((cl--bind-lets nil) (cl--bind-forms nil) (cl--bind-inits nil)
 	 (cl--bind-defs nil) (cl--bind-block 'cl-none) (cl--bind-enquote nil))
     (cl--do-arglist (or args '(&aux)) expr)
-- 
1.8.4

[Message part 3 (text/plain, inline)]
regards,
Oleh

Merged 6415 6566 15587. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 11 Oct 2013 21:39:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15587; Package emacs. (Sat, 12 Oct 2013 23:29:02 GMT) Full text and rfc822 format available.

Message #10 received at 15587 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Oleh <oleh.krehel <at> gmail.com>
Cc: 15587 <at> debbugs.gnu.org
Subject: Re: bug#15587: [PATCH] Edebug `destructuring-bind' dotted spec
Date: Sat, 12 Oct 2013 19:28:33 -0400
There's a different patch at
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6415#15




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15587; Package emacs. (Tue, 15 Oct 2013 12:35:02 GMT) Full text and rfc822 format available.

Message #13 received at 15587 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Oleh <oleh.krehel <at> gmail.com>
Cc: 15587 <at> debbugs.gnu.org
Subject: Re: bug#15587: [PATCH] Edebug `destructuring-bind' dotted spec
Date: Sat, 12 Oct 2013 15:12:27 -0400
> Currently it's not possible to edebug
> (defun foo (z)
>   (destructuring-bind (x . y) z (+ x y)))

Hmm... indeed.

> I attach a small patch to fix this.

Thanks.

> -           (debug (&define cl-macro-list def-form cl-declarations def-body)))
> +           (debug (&define [&or cl-macro-list (sexp . sexp)] def-form cl-declarations def-body)))

But the same problem applies to cl-defmacro.  I.e. the fix should be in
`cl-macro-list', I think.


        Stefan




Merged 6415 6566 15587 24885. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Wed, 19 Apr 2017 02:57:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 25 Dec 2017 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 181 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.