From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#69108: false-positive warning "variable =?UTF-8?Q?=E2=80=98=5F=E2=80=99?= not left unused" in if-let* and if-let Date: Wed, 14 Feb 2024 00:21:01 +0300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3773"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.50.3 To: 69108@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 13 22:22:12 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ra0EF-0000oW-LW for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Feb 2024 22:22:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ra0Dq-0002m8-U0; Tue, 13 Feb 2024 16:21:46 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ra0Dp-0002m0-42 for bug-gnu-emacs@gnu.org; Tue, 13 Feb 2024 16:21:45 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ra0Do-0007kA-Pn for bug-gnu-emacs@gnu.org; Tue, 13 Feb 2024 16:21:44 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ra0E6-0000bf-7u for bug-gnu-emacs@gnu.org; Tue, 13 Feb 2024 16:22:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Feb 2024 21:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69108 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17078592952242 (code B ref -1); Tue, 13 Feb 2024 21:22:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Feb 2024 21:21:35 +0000 Original-Received: from localhost ([127.0.0.1]:48084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ra0De-0000a4-J8 for submit@debbugs.gnu.org; Tue, 13 Feb 2024 16:21:35 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:35922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ra0Dc-0000Zr-7Q for submit@debbugs.gnu.org; Tue, 13 Feb 2024 16:21:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ra0DK-0002fS-3a for bug-gnu-emacs@gnu.org; Tue, 13 Feb 2024 16:21:14 -0500 Original-Received: from forward102a.mail.yandex.net ([178.154.239.85]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ra0DF-0007ic-Ok for bug-gnu-emacs@gnu.org; Tue, 13 Feb 2024 16:21:13 -0500 Original-Received: from mail-nwsmtp-smtp-production-main-74.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-74.vla.yp-c.yandex.net [IPv6:2a02:6b8:c1d:47bd:0:640:2492:0]) by forward102a.mail.yandex.net (Yandex) with ESMTPS id 061CE60AA1 for ; Wed, 14 Feb 2024 00:21:02 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-74.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 1LvaDB0kCKo0-yff0kHbR; Wed, 14 Feb 2024 00:21:01 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1707859261; bh=pdCBFxC36Lfmrndc0u0O1Rty67nNz3Hai0mJS9CEUzM=; h=Date:To:From:Subject:Message-ID; b=syBy+Ehl+MMvZ7KoDeV+TLvWIf2IrMXDE9A8KYAG6BYJnsISTZl6PgHhIdqRKLkqw WPIFkdQU+clT0ZzPBj4dDtXJhX+ugLDQxv0RGtgAyB4o0KerO7kUgVsnDZJRrH9imo 1JC6tr2bNUGfFGHvM5ibi7rjxZ17Z2T1L197jK5U= Authentication-Results: mail-nwsmtp-smtp-production-main-74.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received-SPF: pass client-ip=178.154.239.85; envelope-from=Hi-Angel@yandex.ru; helo=forward102a.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279983 Archived-At: I've been writing an answer for a question on emacs.stackexchange=C2=B9 and= to avoid nested `if` and `let` clauses I used a `if-let*`, and result of one of the = checks I assigned to a `_` variable, because the variable would be left unused, it's= only the check being non-nil that mattered. But when byte-compiled that triggered a: test.el:6:9: Warning: variable =E2=80=98_=E2=80=99 not left unused =E2=80=A6which is untrue, because it is unused. The problem is present in both `if-let` and `if-let*` # Steps to reproduce 1. Create test.el with the following code: ;;; -*- lexical-binding: t -*- (if-let* ((_ nil)) (print "then clause") (print "else clause")) 2. M-x byte-compile test.el ## Expected It byte-compiles with no warnings ## Actual It compiles with a warning: test.el:3:7: Warning: variable =E2=80=98_=E2=80=99 not left unused # Additional information Emacs version: commit d4d5830f8a0 built two weeks ago from master. 1: https://emacs.stackexchange.com/questions/80351/delete-prettify-symbol