From unknown Sat Jun 14 14:26:54 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#26960 <26960@debbugs.gnu.org>
To: bug#26960 <26960@debbugs.gnu.org>
Subject: Status: 26.0.50; Complaints about unused variable in
cl-destructuring-bind
Reply-To: bug#26960 <26960@debbugs.gnu.org>
Date: Sat, 14 Jun 2025 21:26:54 +0000
retitle 26960 26.0.50; Complaints about unused variable in cl-destructuring=
-bind
reassign 26960 emacs
submitter 26960 Philipp Stephani
severity 26960 minor
thanks
From debbugs-submit-bounces@debbugs.gnu.org Wed May 17 05:23:41 2017
Received: (at submit) by debbugs.gnu.org; 17 May 2017 09:23:41 +0000
Received: from localhost ([127.0.0.1]:49549 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1dAvBF-0004He-01
for submit@debbugs.gnu.org; Wed, 17 May 2017 05:23:41 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47810)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1dAvBD-0004HQ-Oa
for submit@debbugs.gnu.org; Wed, 17 May 2017 05:23:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1dAvB7-0000Ln-6O
for submit@debbugs.gnu.org; Wed, 17 May 2017 05:23:34 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50,
FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled
version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:43822)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.71) (envelope-from )
id 1dAvB7-0000LY-2h
for submit@debbugs.gnu.org; Wed, 17 May 2017 05:23:33 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:38773)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1dAvB5-0004dj-Mo
for bug-gnu-emacs@gnu.org; Wed, 17 May 2017 05:23:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1dAvB4-0000Kp-Cm
for bug-gnu-emacs@gnu.org; Wed, 17 May 2017 05:23:31 -0400
Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]:38105)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
(Exim 4.71) (envelope-from )
id 1dAvB4-0000KW-4Z
for bug-gnu-emacs@gnu.org; Wed, 17 May 2017 05:23:30 -0400
Received: by mail-wm0-x229.google.com with SMTP id v15so8981376wmv.1
for ; Wed, 17 May 2017 02:23:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=from:to:subject:date:message-id:mime-version
:content-transfer-encoding;
bh=7RMVrl7wLRQBnCUHF/KAqbgb+nszAbayIT7b2GD/dK0=;
b=jkZ/Cn2/VUGSv5Al9SKtG1+NsMvsuX8Yiq0xehk6GZvTbaD77q4oTE+XPe88afLGOQ
1DX0CpH9RiSLUpnRT8zfG4EGC3PNLkc90mOKYz50isUL1nJiXgM/zhAtdyO2/Yl7BRRX
tL9VCyTTEgd1GQgkgy9g1RKv8lM6Fkb3GzGfRkPtQCUaICtxjR8L9zdNozSyNmXakVo/
77GPPSpTK+yh3wjKOBxxJx2ewdpeW3KKOiyAodfU1I5IUxQc331TCVmaEHumMxE1kRdt
9s18TvwU3VcBuVyzXhDt2D9GmYUPnMGCPFTJnbAcCJsZe00dmm3R/Y6hxvasIfRTnsfO
/6gw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:from:to:subject:date:message-id:mime-version
:content-transfer-encoding;
bh=7RMVrl7wLRQBnCUHF/KAqbgb+nszAbayIT7b2GD/dK0=;
b=h17rX96Z8Hff+Ofmf+B3X4Cr01hAR5WQog/EtMQGZPLtHPWXoiDOWfv8mA7U6JH5SA
GSC0zOS+Ee7QjQJeLh6L4suxOk/CUeZMYgSeE8iIv2SoF/Pf0lDaOOt7lOw/8TKZYVyZ
169wjD9fa2xApbu+wEtFJMBM2HUT4IP5t5rxIyqOEobXHsWsLAgiZQWVMyxVd2WgMP3i
NsBiShmVzQmB0hps9VXhS/hia3WIG9MSIfFuLjbF0fZ/UsRxgVtlHbS1fIcBRdBEx13j
8p3mGPAQyQhZm3YrJJQ4th4Re67avklnGYawFvRndbn/3SlA1NdFcgpayctjLUviCL1i
gAeg==
X-Gm-Message-State: AODbwcDr+cDyOuDVF2eUUrxFvnMoPzh3JdBo2cVRuuBKOPSFv25C3/MG
r+keeYPZs4rWYu+Pj8E=
X-Received: by 10.28.236.89 with SMTP id k86mr10342373wmh.69.1495013008669;
Wed, 17 May 2017 02:23:28 -0700 (PDT)
Received: from a.muc.corp.google.com ([2a00:79e0:15:2:384d:f071:332f:d0e5])
by smtp.gmail.com with ESMTPSA id v7sm1637599wrv.59.2017.05.17.02.23.27
for
(version=TLS1_2 cipher=AES128-SHA bits=128/128);
Wed, 17 May 2017 02:23:27 -0700 (PDT)
From: Philipp Stephani
To: bug-gnu-emacs@gnu.org
Subject: 26.0.50; Complaints about unused variable in cl-destructuring-bind
Date: Wed, 17 May 2017 11:23:27 +0200
Message-ID:
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -3.8 (---)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
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: -3.8 (---)
Create a file with the following contents (here /tmp/destr.el):
;;; -*- lexical-binding: t; -*-
(require 'cl-lib)
(cl-destructuring-bind (&whole a b &rest _) '(1 2)
(print (list a b)))
Then run
emacs -Q -batch -f batch-byte-compile /tmp/destr.el
The byte compiler will complain:
In toplevel form:
/tmp/destr.el:3:1:Warning: variable =E2=80=98_=E2=80=99 not left unused
even though the variable is clearly unused.
In GNU Emacs 26.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.10.8)
of 2017-05-17 built on localhost
Repository revision: f7c07930b581b1bcfdfb1874b6883233516bdf11
Windowing system distributor 'The X.Org Foundation', version 11.0.11803000
System Description: Ubuntu 14.04 LTS
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Configured using:
'configure --without-pop --with-mailutils --enable-checking
--enable-check-lisp-object-type --with-modules 'CFLAGS=3D-O0 -ggdb3''
Configured features:
XPM JPEG TIFF GIF PNG SOUND GSETTINGS NOTIFY GNUTLS FREETYPE XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message subr-x puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)
Memory information:
((conses 16 94336 9026)
(symbols 48 20116 1)
(miscs 40 39 145)
(strings 32 17446 3603)
(string-bytes 1 571028)
(vectors 16 13884)
(vector-slots 8 481230 5848)
(floats 8 48 108)
(intervals 56 216 0)
(buffers 976 12)
(heap 1024 34121 952))
--=20
Google Germany GmbH
Erika-Mann-Stra=C3=9Fe 33
80636 M=C3=BCnchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Gesch=C3=A4ftsf=C3=BChrer: Matthew Scott Sucherman, Paul Terence Manicle
Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind,
leiten Sie diese bitte nicht weiter, informieren Sie den Absender und l=C3=
=B6schen
Sie die E-Mail und alle Anh=C3=A4nge. Vielen Dank.
This e-mail is confidential. If you are not the right addressee please do =
not
forward it, please inform the sender, and please erase this e-mail including
any attachments. Thanks.
From debbugs-submit-bounces@debbugs.gnu.org Wed May 17 07:58:03 2017
Received: (at control) by debbugs.gnu.org; 17 May 2017 11:58:03 +0000
Received: from localhost ([127.0.0.1]:49647 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1dAxad-0001AR-KS
for submit@debbugs.gnu.org; Wed, 17 May 2017 07:58:03 -0400
Received: from mail-it0-f41.google.com ([209.85.214.41]:38543)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1dAxab-00019w-CE
for control@debbugs.gnu.org; Wed, 17 May 2017 07:58:01 -0400
Received: by mail-it0-f41.google.com with SMTP id e65so7335839ita.1
for ; Wed, 17 May 2017 04:58:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=sender:from:to:subject:date:message-id:mime-version;
bh=CJIW9tOMkwNy0vmnMuMcFEvGDAUHYniz8QjPKyYz8PE=;
b=V1kjvJnGjWc/XoyMy8vY59P6smBcFCTRMiVeX7AjkCZ5zNXuFB8EG5X+owr/XQ30e8
w1htMRO6XgPheDH29JCuVPiItg1uVXPbYCrN0YEEOH9kg9QsHCNIaT2vUE1pcFsvC8gv
mYd/sMYsXIYuVzvndFrtl0xiYNMG4tvGtSoADsYH3SAcJn6ARCFaXwbM90eQmUYeVhqc
1UiAE3LoFutyYZOA2CrvX50cd0JBDyAnt5cCLO4Sv6hxA43BcI/WWtz2KRLCLZeGWHOf
A75kZ0laq7NewsX8RqGrmGT17nNYTDSvUI4Rn9N7HhQC5D3W8/h4DH60qCO0AwU7lA+c
HRqg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:sender:from:to:subject:date:message-id
:mime-version;
bh=CJIW9tOMkwNy0vmnMuMcFEvGDAUHYniz8QjPKyYz8PE=;
b=Z8/vmV9oH5pajufPg/6qhmrozBzvmbE6MtMHOjFSUNXJQ2aSlNFZuTmEVFoT0rQOu0
mquLZE4sS0Qt2s+WiVhiyXT2jVBHHqj4o1ONWks2jUc3KRbrU3dVJmcrOqY0YUnkAxzG
dqSialiRdBThwjMmlrjqegOrVEGymjxN7VThltnDJRNLhQZ5ceUiLjyARoqheD7gL80a
ZOkDExMwhXAsuH1AP8YLEENXOZ/PLVazbFRYM/tPFx9QtO+vrQTSZVJl+/vY66/pG/9i
E1Dzsp8iOr/mRSMseHVNM4igksR+ZfgKUVYylI0XFKhjH2ULRotOEAlSwgr5nJgCPy1n
WZIg==
X-Gm-Message-State: AODbwcBkm6j/zqemeR1TcTcAkqUVZd2FP8tq4nxBUr8179WZdqHSV8u9
JirNUZl1ZWLq6GZd
X-Received: by 10.36.137.213 with SMTP id s204mr3494501itd.64.1495022275435;
Wed, 17 May 2017 04:57:55 -0700 (PDT)
Received: from zony ([45.2.7.65])
by smtp.googlemail.com with ESMTPSA id b69sm1036988itb.23.2017.05.17.04.57.53
for
(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
Wed, 17 May 2017 04:57:54 -0700 (PDT)
From: npostavs@users.sourceforge.net
To: control@debbugs.gnu.org
Subject: control message for bug #8711 - unused vars in cl-destructuring-bind
Date: Wed, 17 May 2017 07:59:30 -0400
Message-ID: <87k25fiti5.fsf@users.sourceforge.net>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
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.7 (/)
forcemerge 8711 26960
quit
From debbugs-submit-bounces@debbugs.gnu.org Sun May 08 08:34:02 2022
Received: (at 26960) by debbugs.gnu.org; 8 May 2022 12:34:02 +0000
Received: from localhost ([127.0.0.1]:53625 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1nng6s-0002FO-8e
for submit@debbugs.gnu.org; Sun, 08 May 2022 08:34:02 -0400
Received: from quimby.gnus.org ([95.216.78.240]:58714)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1nng6q-0002Ep-FI; Sun, 08 May 2022 08:34:01 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=zwJWhz3b7cjiE72Val0Z80xctSspr5cXCYgN3zUaIN8=; b=PsHpgYw736VzwCvHIXgY1WN8i9
S4u5/Ug4zmtt9qXH6wpY2aSWk/zHY/9L3SWrTTF7r0W/vzcf3PrDngFdQaflCQg0jxH2IYEMmk4d1
AVpEzKQw8uRKBwB1cdNCdgUxtajrZuntyNztZbcCMrUZ8dXaFLTM/ZfK1/gfVCK6dPsU=;
Received: from [84.212.220.105] (helo=xo)
by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92) (envelope-from )
id 1nng6g-0008QD-6s; Sun, 08 May 2022 14:33:52 +0200
From: Lars Ingebrigtsen
To: Helmut Eller
Subject: Re: bug#26960: 26.0.50; Complaints about unused variable in
cl-destructuring-bind
References:
X-Now-Playing: Adult.'s _Becoming Undone_: "Undoing-Undone"
Date: Sun, 08 May 2022 14:33:49 +0200
In-Reply-To: (Helmut Eller's message of "Sat, 21
May 2011 20:44:18 +0200")
Message-ID: <871qx4i4pe.fsf@gnus.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
@@CONTACT_ADDRESS@@ for details.
Content preview: Helmut Eller writes: > There seems
be no way to avoid a warning in code like this: > > ;; -*- lexical-binding:
t -*- > (eval-when-compile (require 'cl)) > (defun foo (x) (destructuring-bind
(_) x)) > (defun bar (x) (destr [...]
Content analysis details: (-2.9 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 26960
Cc: 26960@debbugs.gnu.org, 8711@debbugs.gnu.org,
Stefan Monnier
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
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: -3.3 (---)
Helmut Eller writes:
> There seems be no way to avoid a warning in code like this:
>
> ;; -*- lexical-binding: t -*-
> (eval-when-compile (require 'cl))
> (defun foo (x) (destructuring-bind (_) x))
> (defun bar (x) (destructuring-bind (_) x (ignore _)))
>
> In foo the compiler complains because _ is never used and
> it bar it complains because it is used.
(I'm going through old bug reports that unfortunately weren't resolved
at the time.)
I can reproduce this in Emacs 25.1, but not in Emacs 29. That is,
there's no warning for `foo'. There's still a warning for `bar', but
that's correct, isn't it? `ignore' is just a normal function, so _ is
used there.
However, this example from a merged bug report is giving a warning:
> ;;; -*- lexical-binding: t; -*-
> (require 'cl-lib)
> (cl-destructuring-bind (&whole a b &rest _) '(1 2)
> (print (list a b)))
And that seems like a bug?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
From debbugs-submit-bounces@debbugs.gnu.org Sun May 08 09:32:13 2022
Received: (at 26960) by debbugs.gnu.org; 8 May 2022 13:32:13 +0000
Received: from localhost ([127.0.0.1]:53716 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1nnh1B-000888-27
for submit@debbugs.gnu.org; Sun, 08 May 2022 09:32:13 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:64218)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1nnh18-00087o-5k; Sun, 08 May 2022 09:32:11 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 7DD0910029F;
Sun, 8 May 2022 09:32:04 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 6EC12100118;
Sun, 8 May 2022 09:32:02 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
s=mail; t=1652016722;
bh=bwEaiuLPK3lfPJ7EMHW9+8gUMfFgpddY1m+lLaIo3nk=;
h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
b=ZLqO3HDStwGn35NYJEbil16JU1q3gC7aQwXGfjaVAr7UTvwtQVz7aws0S0pqQIvbA
TJESaTJ8WHUzVvwnPAC6fJ6pV0LLbO1Fd9dUM61mbt4iIIDvF05vSHpruvswL4IXds
oiKFpXHO6Zz6h9HFVfNjE8isK1xtyRTCOkrfGCzm4LHKDlkgH9riuSWP+EYNqiEU1N
cnI421FyFDXM2/zdSPgrL1Y9v+lulkgA9kkhFEbxYS6EF5CSPPxeaQl0/kqRqCsQCF
iX+zNzg3XlcrtdaUkPFfjekSk+I9iEEFSW/ukeoyDlmTHJWMI9Rt7+Z6fHGG0UK+cy
roA94U/Icz2HQ==
Received: from pastel (unknown [45.72.221.51])
by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 399BF120263;
Sun, 8 May 2022 09:32:02 -0400 (EDT)
From: Stefan Monnier
To: Lars Ingebrigtsen
Subject: Re: bug#26960: 26.0.50; Complaints about unused variable in
cl-destructuring-bind
Message-ID:
References: <871qx4i4pe.fsf@gnus.org>
Date: Sun, 08 May 2022 09:32:01 -0400
In-Reply-To: <871qx4i4pe.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun,
08 May 2022 14:33:49 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results: 0
ALL_TRUSTED -1 Passed through trusted hosts only via SMTP
AWL -0.044 Adjusted score from AWL reputation of From: address
BAYES_00 -1.9 Bayes spam probability is 0 to 1%
DKIM_SIGNED 0.1 Message has a DKIM or DK signature,
not necessarily valid
DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
domain T_SCC_BODY_TEXT_LINE -0.01 -
X-SPAM-LEVEL:
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 26960
Cc: 26960@debbugs.gnu.org, 8711@debbugs.gnu.org,
Helmut Eller
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
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: -3.3 (---)
> I can reproduce this in Emacs 25.1, but not in Emacs 29. That is,
> there's no warning for `foo'. There's still a warning for `bar', but
> that's correct, isn't it?
Yes.
> `ignore' is just a normal function, so _ is used there.
It's not 100% normal, but yes.
> However, this example from a merged bug report is giving a warning:
>
>> ;;; -*- lexical-binding: t; -*-
>> (require 'cl-lib)
>> (cl-destructuring-bind (&whole a b &rest _) '(1 2)
>> (print (list a b)))
>
> And that seems like a bug?
Indeed. If you look at the macroexpanded code, you see that
`cl-destructuring-bind` uses:
(let* ((_ '(1 2))
(a _)
(b (if _ (pop _)
(signal 'wrong-number-of-arguments
(list '(&whole a b &rest _) (length _))))))
(print (list a b)))
so, you can see that the problem is that `cl-destructuring-bind` tries
to avoid using gensym and "abuses" the &rest var as the "iterator"
variable while parsing the list.
It might have been useful back in the dynbinding days because `setq`
might have been a bit cheaper than `let`, but with lexical scoping
`let` byte-compiles to virtually nothing.
Stefan
From debbugs-submit-bounces@debbugs.gnu.org Mon May 09 05:25:50 2022
Received: (at 26960) by debbugs.gnu.org; 9 May 2022 09:25:51 +0000
Received: from localhost ([127.0.0.1]:56062 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1nnzeI-0008Nr-M0
for submit@debbugs.gnu.org; Mon, 09 May 2022 05:25:50 -0400
Received: from quimby.gnus.org ([95.216.78.240]:39618)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1nnzeH-0008NW-Ir; Mon, 09 May 2022 05:25:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID
:In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
List-Post:List-Owner:List-Archive;
bh=mZKvtBIvk6H/f9vVa1qQLTrd3tsHAwO9bgLUg4Xy9Aw=; b=MBCfrFz7TwJZYUxVO9ViY6C7Rj
shFnhW7FW8/RUEjCAmb5T9xyqGsozlzKJDt2h6+fbiq4FeWlle+Fw8uwkkZtvdVup4eMibklUJfR4
KWGs4RCjFQtkyxpWx1NCSR350M5IQ27VZ6bLL7rS3HwMlN10myBcRz/gQljVYbSQeUGM=;
Received: from [84.212.220.105] (helo=xo)
by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92) (envelope-from )
id 1nnze7-0003uA-Eu; Mon, 09 May 2022 11:25:41 +0200
From: Lars Ingebrigtsen
To: Stefan Monnier
Subject: Re: bug#26960: 26.0.50; Complaints about unused variable in
cl-destructuring-bind
References: <871qx4i4pe.fsf@gnus.org>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEXZcnO+sKni39L2
9etsd4H////mjpy1AAAAAWJLR0QF+G/pxwAAAAd0SU1FB+YFCQkSKPuxcWMAAAG0SURBVDjLlVTr
mdwgDCQdBOEGJNEA0jaAc/3XlBFgw92XP5HX2IsYafRySv8tv/OQ9XjlV1JVdzd3HSse8W6exIZm
Ksc+dtUlCTYEu/Fv7ONFzSSp+BbolmmDD/MfEgY06Tr5TcJ5E1EWiOEOZvOQpQrSXzn3D+7rtkXO
PcVpB+cAySRt4SYxEyuzs+TMpI9DTWaHc30SoD5ZBY1xhaEZWPIXccAsTL08vokl8X3aTsU/I/fI
7hQb63ajI0AIk+Ci08eJkJ8Ijh+ywg8HtTSOcu1sdiBQqDZM1BtE6FVEoaZz7sIWWV5kgeCFsABs
hG+EHqbMtymlQVd95XnFUTuWhQg/oo/itgz39Jp6fAwEMLskCPDrlV3yKNShOCIfpkj804t5zju7
GINK3Ap8cMm0GzyS2Mjpc9ufpsHqGZYkrNr40/Nt5ZJVdgmFFapeu3qz8rbMyK42LQiwtGKku4IN
GvKG7HZq9KQw0l6ICl+3V21FxjjNUUN/AHPdVY0LH3RhioQ5anfNJGKWo9tZHRbMLAwdPQpWTCgE
X9yNeIzBkGREu+EKjvL8mKQop8YHAeOqUD+Kv6HCuLBZHCH4AAAAJXRFWHRkYXRlOmNyZWF0ZQAy
MDIyLTA1LTA5VDA5OjE4OjQwKzAwOjAwELu3MAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wNS0w
OVQwOToxODo0MCswMDowMGHmD4wAAAAASUVORK5CYII=
X-Now-Playing: Blaine L. Reininger & Alain Goutier's _Paris en Autumne_:
"Raise Your Hands"
Date: Mon, 09 May 2022 11:25:38 +0200
In-Reply-To: (Stefan Monnier's message
of "Sun, 08 May 2022 09:32:01 -0400")
Message-ID: <8735hjdpm5.fsf@gnus.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
@@CONTACT_ADDRESS@@ for details.
Content preview: Stefan Monnier writes: > Indeed.
If you look at the macroexpanded code, you see that > `cl-destructuring-bind`
uses: > > (let* ((_ '(1 2)) > (a _) > (b (if _ (pop _) > (signal
'wrong-number-of-arguments > (list '(&whole a b [...]
Content analysis details: (-2.9 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 26960
Cc: 26960@debbugs.gnu.org, 8711@debbugs.gnu.org,
Helmut Eller
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
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: -3.3 (---)
Stefan Monnier writes:
> Indeed. If you look at the macroexpanded code, you see that
> `cl-destructuring-bind` uses:
>
> (let* ((_ '(1 2))
> (a _)
> (b (if _ (pop _)
> (signal 'wrong-number-of-arguments
> (list '(&whole a b &rest _) (length _))))))
> (print (list a b)))
>
> so, you can see that the problem is that `cl-destructuring-bind` tries
> to avoid using gensym and "abuses" the &rest var as the "iterator"
> variable while parsing the list.
Hm, right.
I had a quick peek at `cl--do-arglist' (which I guess is what's creating
this form), and... I think I'll leave this for somebody else to fix. =F0=
=9F=AB=A0
In any case, I'm unmerging these two bug reports, and closing the one
that's fixed.
--=20
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
From debbugs-submit-bounces@debbugs.gnu.org Mon May 09 05:26:30 2022
Received: (at control) by debbugs.gnu.org; 9 May 2022 09:26:30 +0000
Received: from localhost ([127.0.0.1]:56069 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1nnzeq-0008PF-5V
for submit@debbugs.gnu.org; Mon, 09 May 2022 05:26:29 -0400
Received: from quimby.gnus.org ([95.216.78.240]:39636)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1nnzeo-0008P3-JD
for control@debbugs.gnu.org; Mon, 09 May 2022 05:26:22 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc:
MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=9SdV9JnKn2PInxVbm8eeIkpfvUSOwWSTigc6GkYT5qw=; b=Hp+VmODtrn/q2s+dF3l5m29Oia
Le6T1kCZlWRdpEJnD4CbYY/N+S3Y9c0O8meKKJX0pPNyTfLE7WBICXERvjowE+47Gqn/SNx1xbIfz
qm80k0pZbgZs6/QL6A3ieL5aL+DDJ0kGv04mpNRPLX6oDwzBeYSybP05YsGKMI5dztwY=;
Received: from [84.212.220.105] (helo=xo)
by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92) (envelope-from ) id 1nnzeg-0003uW-NL
for control@debbugs.gnu.org; Mon, 09 May 2022 11:26:16 +0200
Date: Mon, 09 May 2022 11:26:14 +0200
Message-Id: <871qx3dpl5.fsf@gnus.org>
To: control@debbugs.gnu.org
From: Lars Ingebrigtsen
Subject: control message for bug #26960
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
@@CONTACT_ADDRESS@@ for details.
Content preview: unmerge 26960 quit
Content analysis details: (-2.9 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
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: -3.3 (---)
unmerge 26960
quit
From debbugs-submit-bounces@debbugs.gnu.org Mon May 09 08:26:30 2022
Received: (at 26960) by debbugs.gnu.org; 9 May 2022 12:26:30 +0000
Received: from localhost ([127.0.0.1]:56507 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1no2T8-0004E3-Ki
for submit@debbugs.gnu.org; Mon, 09 May 2022 08:26:30 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:21296)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1no2T7-0004Dl-Pa; Mon, 09 May 2022 08:26:30 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 5300D80767;
Mon, 9 May 2022 08:26:24 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 038438000B;
Mon, 9 May 2022 08:26:23 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
s=mail; t=1652099183;
bh=m+ZgU4RxT2w2/RS4hydurIqIwoohV2dpBDin6xUVbSs=;
h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
b=mdxxVQCR5VnM4vS2UwMpuLUgia8o8vTvBeGk4PsNHm2y7tdr2qzpSCevAqwOfDVgC
RdJBN3xZckIs3FXRZpEx7gOG+3xDwzhH0fayWBgQi8T/Uc9dI54N4ZdA9xj3rJuihQ
oWT7H7aoSmga4YQ4+x9OR7KyUriwGmtcc9lCsYjc9YLObBXWk0/+lns1HldHMv67ds
+NnE9HLkuFmH8+sfQws5n4UtEcafL8n08gjHcxJzygvdL/jt2e+d6pHY63Mlj2XczD
H3UiwQUaQ+7+lZlSIqPMXmzf4kvZVTWGpDEjYgN6ZpvmhIc+uwCK+301QoUUFJj0W9
TbfWIfmBT7KWQ==
Received: from pastel (unknown [45.72.221.51])
by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A92A612051F;
Mon, 9 May 2022 08:26:22 -0400 (EDT)
From: Stefan Monnier
To: Lars Ingebrigtsen
Subject: Re: bug#26960: 26.0.50; Complaints about unused variable in
cl-destructuring-bind
Message-ID:
References: <871qx4i4pe.fsf@gnus.org>
<8735hjdpm5.fsf@gnus.org>
Date: Mon, 09 May 2022 08:26:21 -0400
In-Reply-To: <8735hjdpm5.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon,
09 May 2022 11:25:38 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-SPAM-INFO: Spam detection results: 0
ALL_TRUSTED -1 Passed through trusted hosts only via SMTP
AWL -0.057 Adjusted score from AWL reputation of From: address
BAYES_00 -1.9 Bayes spam probability is 0 to 1%
DKIM_SIGNED 0.1 Message has a DKIM or DK signature,
not necessarily valid
DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
domain T_SCC_BODY_TEXT_LINE -0.01 -
X-SPAM-LEVEL:
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 26960
Cc: 26960@debbugs.gnu.org, 8711@debbugs.gnu.org,
Helmut Eller
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
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: -3.3 (---)
> I had a quick peek at `cl--do-arglist' (which I guess is what's creating
> this form), and... I think I'll leave this for somebody else to fix. =
=F0=9F=AB=A0
I did the same some years ago, FWIW :-)
Stefan