From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: false warnings when compiling with lexical-binding and cl-lib.
Date: Fri, 22 Nov 2013 08:48:50 +0100 [thread overview]
Message-ID: <87siuo6fml.fsf@gmail.com> (raw)
In-Reply-To: <jwv7gc1dyju.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 21 Nov 2013 20:19:43 -0500")
Stefan Monnier <monnier@iro.umontreal.ca> 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
next prev parent reply other threads:[~2013-11-22 7:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-21 15:29 false warnings when compiling with lexical-binding and cl-lib Thierry Volpiatto
2013-11-22 1:19 ` Stefan Monnier
2013-11-22 5:33 ` Thierry Volpiatto
2013-11-22 7:48 ` Thierry Volpiatto [this message]
2013-11-23 6:13 ` Thierry Volpiatto
2013-11-23 13:51 ` Stefan Monnier
2013-11-23 15:53 ` Thierry Volpiatto
2013-11-23 16:24 ` Thierry Volpiatto
2013-11-24 18:08 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87siuo6fml.fsf@gmail.com \
--to=thierry.volpiatto@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.