emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: edebug specs for cl-loop


From: Thierry Volpiatto
Subject: Re: edebug specs for cl-loop
Date: Wed, 08 Aug 2012 10:39:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Stefan Monnier <address@hidden> 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 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]