From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: edebug specs for cl-loop Date: Fri, 10 Aug 2012 12:20:04 -0400 Message-ID: References: <87pq77ges6.fsf@gmail.com> <87txwf9tmy.fsf@gmail.com> <87pq739ona.fsf@gmail.com> <87pq7193rv.fsf@gmail.com> <87ehnhxszx.fsf@gmail.com> <87zk63hzk3.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1344615613 10697 80.91.229.3 (10 Aug 2012 16:20:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Aug 2012 16:20:13 +0000 (UTC) Cc: emacs-devel@gnu.org To: Thierry Volpiatto Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 10 18:20:13 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Szrwa-0006zh-Gt for ged-emacs-devel@m.gmane.org; Fri, 10 Aug 2012 18:20:12 +0200 Original-Received: from localhost ([::1]:36764 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzrwZ-00080D-MI for ged-emacs-devel@m.gmane.org; Fri, 10 Aug 2012 12:20:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzrwX-0007yH-0u for emacs-devel@gnu.org; Fri, 10 Aug 2012 12:20:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzrwT-000574-PU for emacs-devel@gnu.org; Fri, 10 Aug 2012 12:20:08 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:59277) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzrwT-000569-Kp for emacs-devel@gnu.org; Fri, 10 Aug 2012 12:20:05 -0400 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q7AGK4Mx005038; Fri, 10 Aug 2012 12:20:04 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 26258B4177; Fri, 10 Aug 2012 12:20:04 -0400 (EDT) In-Reply-To: <87zk63hzk3.fsf@gmail.com> (Thierry Volpiatto's message of "Fri, 10 Aug 2012 11:22:04 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4306=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4306> : streams <797229> : uri <1188988> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:152416 Archived-At: >>> 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)