emacs-devel
[Top][All Lists]
Advanced

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

Re: false warnings when compiling with lexical-binding and cl-lib.


From: Stefan Monnier
Subject: Re: false warnings when compiling with lexical-binding and cl-lib.
Date: Thu, 21 Nov 2013 20:19:43 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> 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').


        Stefan



reply via email to

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