[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: on using cl-do-symbols
From: |
Mark Oteiza |
Subject: |
Re: on using cl-do-symbols |
Date: |
Wed, 02 Nov 2016 13:56:12 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> The warning is that there is an unused binding for `sym'.
>> cl-do-symbols does create an outer (let (sym) …) and then inside
>> mapatoms, another (lambda (sym) …). Does the outer let-binding in
>> cl-do-symbols need to be there?
>
> I guess it is there so as to obey the CL definition which says:
>
> When result-form is evaluated, var is bound and has the value nil.
>
> If that's the case, then the let-binding can be moved so it only
> covers the `,(nth 2 spec)` part of the code. Personally, I'd be happy
> to disobey the CL specification in this regard since I find it
> completely silly.
I agree--I can't think of a reason why var should be part of
result-form. Interestingly, in the dynamic binding part of dolist, var
is indeed set to nil.