[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: |
Fri, 22 Nov 2013 08:48:50 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> here a sample file containing a function using loop:
>
>> --8<---------------cut here---------------start------------->8---
>> ;;; test.el --- test loop -*- lexical-binding: t -*-
>
>> (require 'cl-lib)
>
>> (defun test-with (l)
>> (cl-loop with lst
>> for i in l
>> unless (member i lst)
>> collect i into lst
>> finally return lst))
>> --8<---------------cut here---------------end--------------->8---
>
>> When compiling this file I have a warning about unused arg `lst'.
>> Is this wanted ?
>
> No, it's not wanted. But noone so far as been able to come up with
> a patch to fix it (the code to fix is the cl-loop macro: look at the
> macro-expanded code to see the unused `lst').
Ok I see:
,----
| (let* ((lst nil) (--cl-var-- l) (i nil) (lst nil))
`----
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997