From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: Re: edebug specs for cl-loop Date: Wed, 08 Aug 2012 10:39:00 +0200 Message-ID: <87pq7193rv.fsf@gmail.com> References: <87pq77ges6.fsf@gmail.com> <87txwf9tmy.fsf@gmail.com> <87pq739ona.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1344415168 24959 80.91.229.3 (8 Aug 2012 08:39:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Aug 2012 08:39:28 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 08 10:39:29 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 1Sz1na-0007vl-Aj for ged-emacs-devel@m.gmane.org; Wed, 08 Aug 2012 10:39:26 +0200 Original-Received: from localhost ([::1]:48094 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sz1nZ-0003RR-3F for ged-emacs-devel@m.gmane.org; Wed, 08 Aug 2012 04:39:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sz1nP-0003RI-2f for emacs-devel@gnu.org; Wed, 08 Aug 2012 04:39:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sz1nK-0007bs-Rw for emacs-devel@gnu.org; Wed, 08 Aug 2012 04:39:14 -0400 Original-Received: from mail-wi0-f177.google.com ([209.85.212.177]:54631) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sz1nK-0007bk-Kv for emacs-devel@gnu.org; Wed, 08 Aug 2012 04:39:10 -0400 Original-Received: by wibhm11 with SMTP id hm11so333022wib.12 for ; Wed, 08 Aug 2012 01:39:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=/ftGH68x27yWiC3zjYhZlDDBkr2e6hzw1bdSYqpFAMA=; b=H/AJXggwKtJdIGmf9ipq5CnsBfBzuVLbZRxW/O/igQ2a9SEfTOtDsy56mJ3QRaoq3L q/JqmI1Ya2N8RrIZ/l9sG4US9zd+fxoKco92defwxcPFqBHMOiZ666RwQvotmPEqfrUz dSKAXk11RIPpsP7WwcL+hW88xpmdeL+vtCyTfFghRNw47SWRKOMfLjnTD12Ol9IgGEgk JfJmaUNonC6wJkA+/x0j/e5cdqIKHKN0yL3N7XZGskvVCaqaNSy5rk/tIHG9Pmwzb84O vG6giEwgfl4R6lnRa0UlVl+5a53f9/yqzgKmoaptyBACKhpEGqu+VICEEgDu2K859Hqt aG7w== Original-Received: by 10.180.92.9 with SMTP id ci9mr640276wib.22.1344415149775; Wed, 08 Aug 2012 01:39:09 -0700 (PDT) Original-Received: from thierry-MM061 (lbe83-2-78-243-104-167.fbx.proxad.net. [78.243.104.167]) by mx.google.com with ESMTPS id j6sm5984373wiy.4.2012.08.08.01.39.07 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 08 Aug 2012 01:39:08 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Tue, 07 Aug 2012 11:11:18 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.212.177 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:152327 Archived-At: Stefan Monnier writes: >> loop understand this but not edebug: (Note where the for rand2 line is now) > >> for alphaindex = (random* (length alph)) >> collect rand1 into ls >> for rand2 = (aref alph alphaindex) >> collect rand2 into ls > > By "edebug" which edebug-spec do you mean: the simple default (&rest &or > symbolp form) or the complex one? AFAICT, the simple default should > handle the above just fine, right? I don't understand what you call simple default and complex one. Assume the edebug specs in cl-macs (the ones commented) are loaded, otherwise all this is irrelevant because edebug doesn't work at all in loop. I mean that on the above form, if I do C-M-x on it the function is evaluated with no errors, and if I do C-u C-M-x I have an error: --8<---------------cut here---------------start------------->8--- edebug-syntax-error: Invalid read syntax: "Failed matching", ([&optional ["named" symbolp]] [&rest &or ["repeat" form] loop-for-as loop-with loop-initial-final] [&rest loop-clause]) --8<---------------cut here---------------end--------------->8--- >> loop understand this but not edebug: (note where the while line is now) > >> with len = (length (window-list)) >> for count from 1 >> while (< count len) >> for w1 = (iter-next wlist) >> for b1 = (window-buffer w1) >> for s1 = (window-start w1) >> for w2 = (iter-next wlist) >> for b2 = (window-buffer w2) >> for s2 = (window-start w2) > >> Both give same result. > > Here as well, the simple default spec should handle this just fine. Here both C-M-x and C-u C-M-x works. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997