[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: false warnings when compiling with lexical-binding and cl-lib.
From: |
Thierry Volpiatto |
Subject: |
Re: false warnings when compiling with lexical-binding and cl-lib. |
Date: |
Sat, 23 Nov 2013 16:53:23 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> This patch avoid adding a new binding by the 'into' clause when the
>> binding have been already added by a 'with' clause.
>> I wonder if this is correct, real common-lisp return an error in such
>> case, WDYT?
>
> Oh, wait, then the warning is OK. It indicates that the `with lst' is
> extraneous and unused. IOW, there's no bug to fix. We could change
> cl-loop to signal an error, but it doesn't seem to be worth the trouble.
Yes, maybe the error message can be a little more explicit, common-lisp send a
message like this:
,----
| Variable LST in INTO clause is a duplicate
| current LOOP context: COLLECT I INTO LST FINALLY.
| [Condition of type SB-INT:COMPILED-PROGRAM-ERROR]
`----
Also the warning is only at compile time, should we return an error on
evaluation ?
This can be detected and handled from the same function
i.e (cl--loop-handle-accum)
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997