From unknown Sun Jun 22 03:50:41 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#15103 <15103@debbugs.gnu.org> To: bug#15103 <15103@debbugs.gnu.org> Subject: Status: Spurious "unused lexical argument" warning from condition-case Reply-To: bug#15103 <15103@debbugs.gnu.org> Date: Sun, 22 Jun 2025 10:50:41 +0000 retitle 15103 Spurious "unused lexical argument" warning from condition-case reassign 15103 emacs submitter 15103 Michael Albinus severity 15103 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 15 07:50:15 2013 Received: (at submit) by debbugs.gnu.org; 15 Aug 2013 11:50:15 +0000 Received: from localhost ([127.0.0.1]:59966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V9w4E-0007sl-S5 for submit@debbugs.gnu.org; Thu, 15 Aug 2013 07:50:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43349) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V9w4C-0007sW-Ue for submit@debbugs.gnu.org; Thu, 15 Aug 2013 07:50:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V9w3y-0006vK-Gq for submit@debbugs.gnu.org; Thu, 15 Aug 2013 07:50:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-100.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9w3y-0006vE-EC for submit@debbugs.gnu.org; Thu, 15 Aug 2013 07:49:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9w3r-0004Qy-3K for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2013 07:49:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V9w3j-0006ru-LC for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2013 07:49:51 -0400 Received: from mout.gmx.net ([212.227.17.21]:54787) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9w3j-0006re-9t for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2013 07:49:43 -0400 Received: from detlef.gmx.de ([91.41.134.176]) by mail.gmx.com (mrgmx002) with ESMTPS (Nemesis) id 0M3RZI-1W0Wg93Kts-00r3vG for ; Thu, 15 Aug 2013 13:49:42 +0200 From: Michael Albinus To: bug-gnu-emacs@gnu.org Subject: 24.3.50; Wrong byte compiler warning Date: Thu, 15 Aug 2013 13:49:38 +0200 Message-ID: <87haeri371.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:CfOHgR1HMkglia7VYisxUK3nc6JfRJBtleNkFNuOQ+732R8Ewzp 9tQVWq+RbgbKAMVhAviGQM/kJlrQmysR4c+1Rq7aNoGU+J8EOaQROUWET6ehUilYVUM0AF1 qloae/WJ4b5k42fj0jMqvhLx/+2o48qrcpy2w/rCHsaMohSEUzTH7nBw6BPyhP+iLqKoD7y ZkLBPMbMm8zjgoUoJ5fUA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) I have a file test.el: (condition-case err (ignore) (file-error (ignore)) (error (message "%s" (error-message-string err)))) When I compile it with --eval '(setq byte-compile-force-lexical-warnings t)' I get the byte compiler warning In toplevel form: test.el:1:1:Warning: Unused lexical argument `err' Wrote /home/albinus/tmp/test.elc Note, that this warning does not appear when the first condition-case handler does not exist. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 15 10:50:33 2013 Received: (at 15103) by debbugs.gnu.org; 15 Aug 2013 14:50:33 +0000 Received: from localhost ([127.0.0.1]:60508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V9ysi-000565-Si for submit@debbugs.gnu.org; Thu, 15 Aug 2013 10:50:33 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:4762) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V9ysh-00055n-Dp for 15103@debbugs.gnu.org; Thu, 15 Aug 2013 10:50:31 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFLd/Nq/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IPAS-Result: Av8EABK/CFFLd/Nq/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="21940522" Received: from 75-119-243-106.dsl.teksavvy.com (HELO pastel.home) ([75.119.243.106]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 15 Aug 2013 10:50:18 -0400 Received: by pastel.home (Postfix, from userid 20848) id 6FEAC66215; Thu, 15 Aug 2013 10:50:25 -0400 (EDT) From: Stefan Monnier To: Michael Albinus Subject: Re: bug#15103: 24.3.50; Wrong byte compiler warning Message-ID: References: <87haeri371.fsf@gmx.de> Date: Thu, 15 Aug 2013 10:50:25 -0400 In-Reply-To: <87haeri371.fsf@gmx.de> (Michael Albinus's message of "Thu, 15 Aug 2013 13:49:38 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15103 Cc: 15103@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > I have a file test.el: > (condition-case err > (ignore) > (file-error (ignore)) > (error (message "%s" (error-message-string err)))) > When I compile it with --eval '(setq byte-compile-force-lexical-warnings t)' > I get the byte compiler warning > In toplevel form: > test.el:1:1:Warning: Unused lexical argument `err' > Wrote /home/albinus/tmp/test.elc > Note, that this warning does not appear when the first condition-case > handler does not exist. Yup, same kind of problem as discussed in the "Cleaning up code" thread. When compiling for lexical scoping, the condition case above gets turned internally into something akin to: (condition-case :use-lexical-calling-convention (ignore) (file-error (lambda (err) (ignore))) (error (lambda (err) (message "%s" (error-message-string err))))) so as you can see, we now have two separate declarations of `err' one of which is unused. There's a secondary bug as well in that the warning says "argument" rather than "variable", but that's minor. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 19 20:12:36 2013 Received: (at control) by debbugs.gnu.org; 20 Aug 2013 00:12:36 +0000 Received: from localhost ([127.0.0.1]:41321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VBZYq-0006mF-7l for submit@debbugs.gnu.org; Mon, 19 Aug 2013 20:12:36 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:50878) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VBZYn-0006m6-I7 for control@debbugs.gnu.org; Mon, 19 Aug 2013 20:12:34 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VBZYn-0003pD-2C for control@debbugs.gnu.org; Mon, 19 Aug 2013 20:12:33 -0400 Date: Mon, 19 Aug 2013 20:12:33 -0400 Message-Id: Subject: control message for bug 15103 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -7.8 (-------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.8 (-------) retitle 15103 Spurious "unused lexical argument" warning from condition-case From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 03 23:41:57 2013 Received: (at 15103) by debbugs.gnu.org; 4 Oct 2013 03:41:57 +0000 Received: from localhost ([127.0.0.1]:52893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRwH7-000114-AT for submit@debbugs.gnu.org; Thu, 03 Oct 2013 23:41:57 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:39918) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRwH5-00010v-EP for 15103@debbugs.gnu.org; Thu, 03 Oct 2013 23:41:55 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFLd/fx/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IPAS-Result: Av8EABK/CFFLd/fx/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="34724595" Received: from 75-119-247-241.dsl.teksavvy.com (HELO ceviche.home) ([75.119.247.241]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 03 Oct 2013 23:38:28 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 8ADC1660C4; Thu, 3 Oct 2013 23:41:50 -0400 (EDT) From: Stefan Monnier To: Michael Albinus Subject: Re: bug#15103: 24.3.50; Wrong byte compiler warning Message-ID: References: <87haeri371.fsf@gmx.de> Date: Thu, 03 Oct 2013 23:41:50 -0400 In-Reply-To: <87haeri371.fsf@gmx.de> (Michael Albinus's message of "Thu, 15 Aug 2013 13:49:38 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15103 Cc: 15103@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > I have a file test.el: > (condition-case err > (ignore) > (file-error (ignore)) > (error (message "%s" (error-message-string err)))) [...] > In toplevel form: > test.el:1:1:Warning: Unused lexical argument `err' > Wrote /home/albinus/tmp/test.elc If you set byte-compile--use-old-handlers to nil, the above spurious warning should now be fixed. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 08 05:35:11 2013 Received: (at 15103) by debbugs.gnu.org; 8 Oct 2013 09:35:11 +0000 Received: from localhost ([127.0.0.1]:33991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTTh8-0006oI-FU for submit@debbugs.gnu.org; Tue, 08 Oct 2013 05:35:10 -0400 Received: from mout.gmx.net ([212.227.15.18]:59673) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTTh5-0006o6-Ev for 15103@debbugs.gnu.org; Tue, 08 Oct 2013 05:35:08 -0400 Received: from detlef.gmx.de ([87.146.60.246]) by mail.gmx.com (mrgmx003) with ESMTPS (Nemesis) id 0LjZhg-1W4kJl0KLY-00bZbM for <15103@debbugs.gnu.org>; Tue, 08 Oct 2013 11:35:05 +0200 From: Michael Albinus To: Stefan Monnier Subject: Re: bug#15103: 24.3.50; Wrong byte compiler warning References: <87haeri371.fsf@gmx.de> Date: Tue, 08 Oct 2013 11:35:03 +0200 In-Reply-To: (Stefan Monnier's message of "Thu, 03 Oct 2013 23:41:50 -0400") Message-ID: <87txgsyuk8.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:Uy57Z2JhzV5SFE4cesqnG01bNmxGGVen/MlB6QAnxpKiS8M3ZMk Xwhk4tSzW+cMjF79sftoNs11VTka0hTig1PNF0MYJL+SvcZ1Unq6ZyGe9sHv8krnPmaN7HR 967JJf07AiGjR7Ov+AMJMHWaw+mPDQwX61GHbDowHuNwCldWQ1vFIJnkhDVvZ8P/0dt4Uyv wAJApPJgAYW/g4XdTIwbQ== X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Stefan Monnier writes: > If you set byte-compile--use-old-handlers to nil, the above spurious > warning should now be fixed. That works, thanks. Shouldn't this be documented somewhere? [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (michael.albinus[at]gmx.de) 1.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net [Blocked - see ] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.15.18 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 15103 Cc: 15103@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Stefan Monnier writes: > If you set byte-compile--use-old-handlers to nil, the above spurious > warning should now be fixed. That works, thanks. Shouldn't this be documented somewhere? [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.15.18 listed in list.dnswl.org] 1.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net [Blocked - see ] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (michael.albinus[at]gmx.de) -0.0 SPF_PASS SPF: sender matches SPF record Stefan Monnier writes: > If you set byte-compile--use-old-handlers to nil, the above spurious > warning should now be fixed. That works, thanks. Shouldn't this be documented somewhere? > Stefan Best regrads, Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 16 14:57:57 2015 Received: (at control) by debbugs.gnu.org; 16 Mar 2015 18:57:57 +0000 Received: from localhost ([127.0.0.1]:48871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXaD6-0004tz-Ry for submit@debbugs.gnu.org; Mon, 16 Mar 2015 14:57:57 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:59614) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXaD5-0004tr-Ce for control@debbugs.gnu.org; Mon, 16 Mar 2015 14:57:55 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1YXaD5-0000c6-5A for control@debbugs.gnu.org; Mon, 16 Mar 2015 14:57:55 -0400 Date: Mon, 16 Mar 2015 14:57:55 -0400 Message-Id: Subject: control message for bug 20123 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) forcemerge 15103 20123 From unknown Sun Jun 22 03:50:41 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 14 Apr 2015 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator