unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: edebug specs for cl-loop
Date: Fri, 10 Aug 2012 12:20:04 -0400	[thread overview]
Message-ID: <jwvboiien4e.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87zk63hzk3.fsf@gmail.com> (Thierry Volpiatto's message of "Fri,  10 Aug 2012 11:22:04 +0200")

>>> Indeed, yes it is working in both cases WITHOUT your commented edebug
>>> specs too.  So I am a little bit lost because it was not working some
>>> days ago without them.
>> At some point, there was a bug where the debug spec set on `cl-loop' did
>> not apply to the `loop' alias.  Maybe that's what you bumped into.
> This one is not working without the commented stuff of cl-macs:

> (loop for (k . v) in '((a . 1) (b . 2) (c . 3))
>       collect (cons k (1+ v)))

> ==> edebug-syntax-error: Invalid read syntax: "Dotted spec required."

Good point.  The patch below should address this issue,


        Stefan


=== modified file 'lisp/emacs-lisp/cl-macs.el'
--- lisp/emacs-lisp/cl-macs.el	2012-08-06 19:53:45 +0000
+++ lisp/emacs-lisp/cl-macs.el	2012-08-10 15:49:23 +0000
@@ -731,7 +731,12 @@
   finally return EXPR, named NAME.
 
 \(fn CLAUSE...)"
-  (declare (debug (&rest &or symbolp form)))
+  (declare (debug (&rest &or
+                         ;; These are usually followed by a symbol, but it can
+                         ;; actually be any destructuring-bind pattern.
+                         [[&or "for" "as" "with" "and"] sexp]
+                         ;; Simple default, which covers 99% of the cases.
+                         symbolp form)))
   (if (not (memq t (mapcar 'symbolp (delq nil (delq t (cl-copy-list loop-args))))))
       `(cl-block nil (while t ,@loop-args))
     (let ((cl--loop-args loop-args) (cl--loop-name nil) (cl--loop-bindings nil)




  reply	other threads:[~2012-08-10 16:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-04  9:58 edebug specs for cl-loop Thierry Volpiatto
2012-08-06 21:57 ` Stefan Monnier
2012-08-07  5:08   ` Thierry Volpiatto
2012-08-07  6:55     ` Thierry Volpiatto
2012-08-07  7:17       ` Thierry Volpiatto
2012-08-07 15:12         ` Stefan Monnier
2012-08-08  8:40           ` Thierry Volpiatto
2012-08-07 15:11       ` Stefan Monnier
2012-08-08  8:39         ` Thierry Volpiatto
2012-08-08 13:42           ` Stefan Monnier
2012-08-08 16:12             ` Thierry Volpiatto
2012-08-08 18:10               ` Stefan Monnier
2012-08-10  9:22                 ` Thierry Volpiatto
2012-08-10 16:20                   ` Stefan Monnier [this message]
2012-08-08 12:00       ` Lars Brinkhoff

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=jwvboiien4e.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=thierry.volpiatto@gmail.com \
    /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).