From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: false warnings when compiling with lexical-binding and cl-lib. Date: Thu, 21 Nov 2013 20:19:43 -0500 Message-ID: References: <8761rl6ael.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1385083201 11147 80.91.229.3 (22 Nov 2013 01:20:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Nov 2013 01:20:01 +0000 (UTC) Cc: emacs-devel@gnu.org To: Thierry Volpiatto Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 22 02:20:02 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VjfPd-00080C-Ui for ged-emacs-devel@m.gmane.org; Fri, 22 Nov 2013 02:20:02 +0100 Original-Received: from localhost ([::1]:36092 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjfPd-0004Fe-8K for ged-emacs-devel@m.gmane.org; Thu, 21 Nov 2013 20:20:01 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjfPT-0004Ee-Hf for emacs-devel@gnu.org; Thu, 21 Nov 2013 20:19:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjfPM-0005WK-7o for emacs-devel@gnu.org; Thu, 21 Nov 2013 20:19:51 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:24618) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjfPM-0005WG-4T for emacs-devel@gnu.org; Thu, 21 Nov 2013 20:19:44 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KWN/2dsb2JhbABEvw4Xc4IeAQEEAScvIwULCzQSFBgNJIgeBsEtkQoDiGGcGYFegxU X-IPAS-Result: Av4EABK/CFHO+KWN/2dsb2JhbABEvw4Xc4IeAQEEAScvIwULCzQSFBgNJIgeBsEtkQoDiGGcGYFegxU X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="39295075" Original-Received: from 206-248-165-141.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([206.248.165.141]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 21 Nov 2013 20:19:43 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 878B5AE494; Thu, 21 Nov 2013 20:19:43 -0500 (EST) In-Reply-To: <8761rl6ael.fsf@gmail.com> (Thierry Volpiatto's message of "Thu, 21 Nov 2013 16:29:22 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:165518 Archived-At: > 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