Received: (at 79706) by debbugs.gnu.org; 28 Feb 2026 10:45:29 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 28 05:45:28 2026 Received: from localhost ([127.0.0.1]:34487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vwHp9-0006D3-Fp for submit <at> debbugs.gnu.org; Sat, 28 Feb 2026 05:45:28 -0500 Received: from mta-09-4.privateemail.com ([198.54.127.118]:32331) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <basil@HIDDEN>) id 1vwHp6-0005on-5M for 79706 <at> debbugs.gnu.org; Sat, 28 Feb 2026 05:45:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=contovou.net; s=default; t=1772275518; bh=4hBD98v0oDD8LQN1cAQ7GxCGoMo7M6l/5hP6S0T6qS4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=nApXsXKMDxJ8QFLl6iNk5IiNgolGIDDyxym9w+RnjEcN+2Yg30yQIQFDjEQ7QIKYl JkAX9gOP+uiz5GVYWJO/k/uvMNr760YjZXLoxSDgcgIEI7wnjWlD8jKEUHoisBpBoq DljNSQACLlBxVbzwiQe09zSNL4P4FeKyHCHtu1h+7m6nDslVcrEJWuJkWBuQDDULLQ g2sZnpKD1HbA/pbfOCE8YMqX/aumioYm86j/XSnWMRmk6fDu8n3pjEQfNoO2tM4mQW 7ad4DRmkPrk1dO/uTlSSKFNVz0qJmY7UXTagw3SSJkGd5csiOP1ebu3LjZuVCe59zv yPJS21qepK7ng== Received: from mta-09.privateemail.com (localhost [127.0.0.1]) by mta-09.privateemail.com (Postfix) with ESMTP id 4fNMKV1vRLz3hhS8; Sat, 28 Feb 2026 05:45:18 -0500 (EST) Received: from localhost (1F2EF519.nat.pool.telekom.hu [31.46.245.25]) by mta-09.privateemail.com (Postfix) with ESMTPA; Sat, 28 Feb 2026 05:45:15 -0500 (EST) From: "Basil L. Contovounesios" <basil@HIDDEN> To: Sean Whitton <spwhitton@HIDDEN> Subject: Re: bug#79706: 31.0.50; problems with let-alist In-Reply-To: <871pi5nsdl.fsf@HIDDEN> References: <874irkbos0.fsf@HIDDEN> <87y0kvrqhl.fsf@HIDDEN> <87bjhflctx.fsf@HIDDEN> <878qcjb4df.fsf@HIDDEN> <877bs2h680.fsf@HIDDEN> <87ecm79yrq.fsf@HIDDEN> <87zf4v2ti4.fsf@HIDDEN> <87qzq59b5p.fsf@HIDDEN> <871pi5nsdl.fsf@HIDDEN> Date: Sat, 28 Feb 2026 11:45:12 +0100 Message-ID: <875x7huoxz.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: Sean Whitton [2026-02-28 09:12 +0000] wrote: > Eshel Yaron [27/Feb 9:36pm +01] wrote: >> You can't implement the current .foo.bar notation with cl-macrolet, so >> I'm not sure what you mean exactly. > [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [198.54.127.118 listed in sa-accredit.habeas.com] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [198.54.127.118 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [198.54.127.118 listed in wl.mailspike.net] 0.4 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [198.54.127.118 listed in bl.score.senderscore.com] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 79706 Cc: 79706 <at> debbugs.gnu.org, Eshel Yaron <me@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.4 (/) Sean Whitton [2026-02-28 09:12 +0000] wrote: > Eshel Yaron [27/Feb 9:36pm +01] wrote: >> You can't implement the current .foo.bar notation with cl-macrolet, so >> I'm not sure what you mean exactly. > I think you can with cl-symbol-macrolet ? Wouldn't that require knowing all the symbols in advance? The idea with cl-macrolet is to let the macroexpander do the code walking. -- Basil
bug-gnu-emacs@HIDDEN:bug#79706; Package emacs.
Full text available.Received: (at 79706) by debbugs.gnu.org; 28 Feb 2026 09:13:05 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 28 04:13:05 2026 Received: from localhost ([127.0.0.1]:34033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vwGNk-0006NU-KP for submit <at> debbugs.gnu.org; Sat, 28 Feb 2026 04:13:04 -0500 Received: from sendmail.purelymail.com ([34.202.193.197]:33014) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>) id 1vwGNi-0006MZ-RG for 79706 <at> debbugs.gnu.org; Sat, 28 Feb 2026 04:13:03 -0500 DKIM-Signature: a=rsa-sha256; b=SWi7kwU9PEt3E6ojG/JFiyBmZgJDex2zgNmJRml97gCx2NltIzC4X0E3A5zmUqlrkE80pft3fQgxHo76rlCLOJlg1j4NFELlUYfc0+m3XE/liPPa/ExvoBEiw3OPJJhb5WOdROB1YM5OqqShK81u841KHJFNkzFAW42Md2mJnGAVXTrx8gOYsHJsut2MId1IR+0l8DQZHkcrjt8NRbLZj1x3Of0eKdc8LN8Xvr4FzzN7IirEnfBjxIU7LisrOoAUylF0m2XJ1fbJspaf3cMfaj+N8kacji+1r4WEAc698lXfz15TQi4MqijW7A5ycYKtUnDmV69rj7ixnTPXc2mK0g==; s=purelymail3; d=spwhitton.name; v=1; bh=7SRLjWNE//W98J9pXIopKqK0NGkdE1mIrr4fXGgWOdk=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=mqyT3O7KSf0R5Lkg0yIV3Nd9NWioErIWqwoDLggdVMh+OADBlFQDBGRqm0EObPwvLyC+zNe0NgVRjrxeSlXk4QNHupcwTi9arptNQopTAZETx+CyP1XsgcDxvbV4lu/8mRaL1cgAsR+eGh3ListdXVKALmD+6zMhFFKLHVPbWAjHRfY0NzP1GaSBCRNB0c/WSQdbxoC7ZfrEDmw/0Tc53dB7YtZqJ81ODDkkeW12ovduwkkgT+e5fEClrz0TpV81f6jfFiOSw15JlD6SfBHmqC89whvP9nXzY8rKBSVoBoI+zpyUY+lwFVU5FUOeMWBo0TrhZ60nYeqslmoWnDVYRA==; s=purelymail3; d=purelymail.com; v=1; bh=7SRLjWNE//W98J9pXIopKqK0NGkdE1mIrr4fXGgWOdk=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 79706 <at> debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -2020778739; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sat, 28 Feb 2026 09:12:56 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 36AD77E162E; Sat, 28 Feb 2026 09:12:54 +0000 (GMT) From: Sean Whitton <spwhitton@HIDDEN> To: Eshel Yaron <me@HIDDEN> Subject: Re: bug#79706: 31.0.50; problems with let-alist In-Reply-To: <87qzq59b5p.fsf@HIDDEN> References: <874irkbos0.fsf@HIDDEN> <87y0kvrqhl.fsf@HIDDEN> <87bjhflctx.fsf@HIDDEN> <878qcjb4df.fsf@HIDDEN> <877bs2h680.fsf@HIDDEN> <87ecm79yrq.fsf@HIDDEN> <87zf4v2ti4.fsf@HIDDEN> <87qzq59b5p.fsf@HIDDEN> Date: Sat, 28 Feb 2026 09:12:54 +0000 Message-ID: <871pi5nsdl.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: Eshel Yaron [27/Feb 9:36pm +01] wrote: > You can't implement the current .foo.bar notation with cl-macrolet, so > I'm not sure what you mean exactly. I think you can with cl-symbol-macrolet ? -- Sean Whitton Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H5 RBL: Excellent reputation (+5) [34.202.193.197 listed in wl.mailspike.net] 0.4 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [34.202.193.197 listed in bl.score.senderscore.com] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 1.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [34.202.193.197 listed in sa-trusted.bondedsender.org] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 79706 Cc: 79706 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.4 (/) Eshel Yaron [27/Feb 9:36pm +01] wrote: > You can't implement the current .foo.bar notation with cl-macrolet, so > I'm not sure what you mean exactly. I think you can with cl-symbol-macrolet ? -- Sean Whitton
bug-gnu-emacs@HIDDEN:bug#79706; Package emacs.
Full text available.
Received: (at 79706) by debbugs.gnu.org; 27 Feb 2026 21:10:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 27 16:10:38 2026
Received: from localhost ([127.0.0.1]:54083 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vw56b-0004G5-IL
for submit <at> debbugs.gnu.org; Fri, 27 Feb 2026 16:10:38 -0500
Received: from mail.eshelyaron.com ([107.175.124.16]:55376 helo=eshelyaron.com)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1vw56Z-0004Fm-6V
for 79706 <at> debbugs.gnu.org; Fri, 27 Feb 2026 16:10:36 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
s=mail; t=1772226634;
bh=aT4F06WBxzqmt5jDrPLXZ9GmN9u6BjOmDmINunyFmoo=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=vXbT2Uu2LeLFnFkwqNvpiSXW3PXqqWnC8KaqvMuBGtpCGp8CWz0dM2JUXPtz/oufs
93OEQcynDTwepoY8m3ckbsvj8juTLuWoVGxUcSNmBBbUrZYAHQBvN1o1hDygDwdhdb
9slc89dBwRHV9AY7eE2QjqpCpFJvIJm9xAjk2skxVfDBB+chY7IVY1jIvyv6eemTQ3
Z4VedpmfevPFPSW/ton45C8LFzEH92nFbWZdQaplGkvao/jkqIsS3FzjPpgcKO7WRA
Cm5fx3F6nEbyqq9YjArKPzupCgDwUIl1LOd0Y6vV32RrGPgPpDDV3caJrJc9oQFut4
VCsvrRm5uCchA==
From: Eshel Yaron <me@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#79706: 31.0.50; problems with let-alist
In-Reply-To: <874in34850.fsf@HIDDEN>
References: <874irkbos0.fsf@HIDDEN>
<87y0kvrqhl.fsf@HIDDEN>
<87bjhflctx.fsf@HIDDEN>
<878qcjb4df.fsf@HIDDEN>
<877bs2h680.fsf@HIDDEN>
<E1vvSmo-0005DX-8t@HIDDEN>
<874in34850.fsf@HIDDEN>
Date: Fri, 27 Feb 2026 22:10:30 +0100
Message-ID: <87ecm599kp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.4 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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
the administrator of that system for details.
Content preview: Sean Whitton <spwhitton@HIDDEN> writes: > Richard
Stallman [25/Feb 11:15pm -05] wrote: >> [[[ To any NSA and FBI agents reading
my email: please consider ]]] >> [[[ whether defending the US Constitution
against all enemies, ]]] >> [[[ forei [...]
Content analysis details: (1.4 points, 10.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
1.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The
query to Validity was blocked. See
https://knowledge.validity.com/hc/en-us/articles/20961730681243
for more information.
[107.175.124.16 listed in sa-trusted.bondedsender.org]
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
-0.0 SPF_PASS SPF: sender matches SPF record
0.4 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The
query to Validity was blocked. See
https://knowledge.validity.com/hc/en-us/articles/20961730681243
for more information.
[107.175.124.16 listed in bl.score.senderscore.com]
X-Debbugs-Envelope-To: 79706
Cc: 79706 <at> debbugs.gnu.org, rms@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.4 (/)
Sean Whitton <spwhitton@HIDDEN> writes:
> Richard Stallman [25/Feb 11:15pm -05] wrote:
>> [[[ To any NSA and FBI agents reading my email: please consider ]]]
>> [[[ whether defending the US Constitution against all enemies, ]]]
>> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>>
>> > > These problems essentially stem from a common cause: the way let-alist
>> > > analyzes its body is too naive.
>>
>> This leads me to wonder whether the specification of `let-alist' is
>> somehow incoherent. The idea of lexical scoping goes with the idea
>> that the variables' names are optimized away in the process of
>> preparing the code to run. Does it really make sense to use
>> `let-alist' to bind lexical variables?
>>
>> Can someone show some real examples of doing that? It would be useful
>> to see what sort of problem is being solved by that solution,
>> and why it avoids causing problems.
>
> In align.el the function align--rule-should-run uses let-alist.
> It expands like this:
>
> (defun align--rule-should-run (rule)
> "Given an `align-rules-list' entry RULE, return t if it should run.
> This is decided by the `modes' and `run-if' keys in the alist
> RULE. Their meaning is documented in `align-rules-list' (which see)."
> (let-alist rule
> (not (or (and .modes (not (derived-mode-p (eval .modes))))
> (and .run-if (not (funcall .run-if)))))))
>
> =>
>
> (defun align--rule-should-run (rule)
> "Given an `align-rules-list' entry RULE, return t if it should run.
> This is decided by the `modes' and `run-if' keys in the alist
> RULE. Their meaning is documented in `align-rules-list' (which see)."
> (let ((alist rule))
> (let
> ((.modes (cdr (assq 'modes alist)))
> (.run-if (cdr (assq 'run-if alist))))
> (not
> (or (and .modes (not (derived-mode-p (eval .modes))))
> (and .run-if (not (funcall .run-if))))))))
Note how in this example (and others) let-alist produces sub-optimal code.
Namely, here it looks up 'run-if even if the value isn't actually used.
Here's how this looks in my Emacs, where I've replaced let-alist forms
with my proposed alist-let:
(alist-let rule
(and (derived-mode-p (eval (or (a modes) 'major-mode)))
(funcall (or (a run-if) #'always))))
And here's the expansion:
(let* ((alist rule))
(and (derived-mode-p (eval (or (alist-get 'modes alist) 'major-mode)))
(funcall (or (alist-get 'run-if alist) #'always))))
Best,
Eshel
bug-gnu-emacs@HIDDEN:bug#79706; Package emacs.
Full text available.Received: (at 79706) by debbugs.gnu.org; 27 Feb 2026 20:36:30 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 27 15:36:30 2026 Received: from localhost ([127.0.0.1]:53375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vw4ZZ-0006tM-Tl for submit <at> debbugs.gnu.org; Fri, 27 Feb 2026 15:36:30 -0500 Received: from mail.eshelyaron.com ([107.175.124.16]:47086 helo=eshelyaron.com) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1vw4ZW-0006si-RH for 79706 <at> debbugs.gnu.org; Fri, 27 Feb 2026 15:36:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1772224586; bh=FkP8S/BxfNfzpTuGTrl7G1Adlb4x+zGLIUe8Na7LBjs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=QyjDm3dMzWYJvJStnuiAL3vBfNEzNU9D0D9QSWz3o7eE9OvIax3PrmjjX/D6wC6Ga r1Lpi8DAOaSnHL4BbxoAHlfqpIS065MtgoJE9LRV28J6pB1YKTk7cCxv5TLhgr/Yni 99LQ4G5YACK3/deX/U1LMApG9DUA1QKNcNQ2FOqM/Ms5v2S1rYSUXCtWbCbjjS0Fr+ BuT/frcRCW3ilozgC62G2/tX7fE8kO5cFC/Y/1seQTO/4FcLP4JrzxZquM80HrWo58 pmObTcIdo32tt5b7iciVUa6WYzjD6vgi36vWOX2eGPU0LtgzUNm36oiL9fdEVFPiR2 1fcP9KpHLtcFA== From: Eshel Yaron <me@HIDDEN> To: Sean Whitton <spwhitton@HIDDEN> Subject: Re: bug#79706: 31.0.50; problems with let-alist In-Reply-To: <87zf4v2ti4.fsf@HIDDEN> References: <874irkbos0.fsf@HIDDEN> <87y0kvrqhl.fsf@HIDDEN> <87bjhflctx.fsf@HIDDEN> <878qcjb4df.fsf@HIDDEN> <877bs2h680.fsf@HIDDEN> <87ecm79yrq.fsf@HIDDEN> <87zf4v2ti4.fsf@HIDDEN> Date: Fri, 27 Feb 2026 21:36:18 +0100 Message-ID: <87qzq59b5p.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: Sean Whitton <spwhitton@HIDDEN> writes: > Eshel Yaron [26/Feb 6:54pm +01] wrote: >> Hi, >> >> Sean Whitton <spwhitton@HIDDEN> writes: >> >>> Eshel Yaron [23/Feb 9:18pm +01] wrote: >>>> Hmm, what do you have in mind? >>>> >>>> (As I [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.4 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [107.175.124.16 listed in bl.score.senderscore.com] 1.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [107.175.124.16 listed in sa-accredit.habeas.com] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 79706 Cc: 79706 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.4 (/) Sean Whitton <spwhitton@HIDDEN> writes: > Eshel Yaron [26/Feb 6:54pm +01] wrote: >> Hi, >> >> Sean Whitton <spwhitton@HIDDEN> writes: >> >>> Eshel Yaron [23/Feb 9:18pm +01] wrote: >>>> Hmm, what do you have in mind? >>>> >>>> (As I mentioned upthread: >>>> >>>> These problems essentially stem from a common cause: the way let-alist >>>> analyzes its body is too naive. >>>> >>>> So AFAICT addressing these issues would require employing a different, >>>> much richer code analysis. The cl-macrolet approach lets us hook into >>>> such a proper analysis, practically for free.) >>> >>> I don't understand why you're not considering replacing let-alist's body >>> analysis with a better one? >> >> Well, I did consider it of course. It's just much easier and better in >> the long run to migrate to a cl-macrolet based approach, IMO. > > Well then maybe let-alist should be migrated to use cl-macrolet? You can't implement the current .foo.bar notation with cl-macrolet, so I'm not sure what you mean exactly. Eshel
bug-gnu-emacs@HIDDEN:bug#79706; Package emacs.
Full text available.Received: (at 79706) by debbugs.gnu.org; 26 Feb 2026 19:29:50 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 26 14:29:50 2026 Received: from localhost ([127.0.0.1]:43268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vvh3V-0003sv-Vh for submit <at> debbugs.gnu.org; Thu, 26 Feb 2026 14:29:50 -0500 Received: from sendmail.purelymail.com ([34.202.193.197]:46702) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>) id 1vvh3T-0003sS-K9 for 79706 <at> debbugs.gnu.org; Thu, 26 Feb 2026 14:29:48 -0500 DKIM-Signature: a=rsa-sha256; b=nygeDeAt+aNhCIHmSO+A4r6EmH7Btnhud9hDgN5UE+L00DeW59BTZqK8VdNYsWEEINE81n5qVxIk94aTWC+EmPgMPp9bWzuGlC4EJMHYvdIvxvO1wOtoPyD7h+h+bYOERwrJfqGwxKvN9xVT7AK2h5+qTIoTCqf8euJEJM0uWQs9bEnlmsG+mJh5c5FA9tmLyfLvbA/4t6Ox/xxsrD0AMNZ/QebYltDAKr+PrLq0TRRfOmQUVLMyxf/7uoOQ+sMXp2p3wQOujyGZi3aOcM72AB/NfHslRWExLR+ezVq4dxvR1iovhiPcO8l6d/vuhwQrA96Xgl8iNeyb0uPzDH9bEQ==; s=purelymail3; d=spwhitton.name; v=1; bh=4t54WR4GasbVjb7Y6WZZRpYKP34VLT1di/1cytEvGeM=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=YYokg9ljMBMD3uZSJ9HpVJ9iVZ+aeaDKL07J6q5wYPssI9ny1+/ndRwv3V4ibaN0hU0shcPUJ4ojw/kFlRcXdK2y8Jthlmh4jym65UKCSmpjWM7UbrQyNC1Tl7dK5UFnhIhbydee0ud7qHEi8SiL5coDV1vVbKfYxld/GV1ZbFjfLSVnoG9U8iNUSGrk4gkpY5xih4Jq+i/y5g3N/CMZt4/q+f+q1rv8pQfGP3s9Mg0XHlHs7L5fNF2HhqIEevNbVQvno+buaLmCyadwdpIYRHke098M1HlQbWBoY4EnX0Q+Vbk54binkt1aZvU1q6iOdRt05f1uuoypeMMAqZqiMA==; s=purelymail3; d=purelymail.com; v=1; bh=4t54WR4GasbVjb7Y6WZZRpYKP34VLT1di/1cytEvGeM=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 79706 <at> debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 281935395; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Thu, 26 Feb 2026 19:29:40 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id A6C897E70AE; Thu, 26 Feb 2026 19:29:39 +0000 (GMT) From: Sean Whitton <spwhitton@HIDDEN> To: Eshel Yaron <me@HIDDEN> Subject: Re: bug#79706: 31.0.50; problems with let-alist In-Reply-To: <87ecm79yrq.fsf@HIDDEN> References: <874irkbos0.fsf@HIDDEN> <87y0kvrqhl.fsf@HIDDEN> <87bjhflctx.fsf@HIDDEN> <878qcjb4df.fsf@HIDDEN> <877bs2h680.fsf@HIDDEN> <87ecm79yrq.fsf@HIDDEN> Date: Thu, 26 Feb 2026 19:29:39 +0000 Message-ID: <87zf4v2ti4.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: Eshel Yaron [26/Feb 6:54pm +01] wrote: > Hi, > > Sean Whitton <spwhitton@HIDDEN> writes: > >> Eshel Yaron [23/Feb 9:18pm +01] wrote: >>> Hmm, what do you have in mind? >>> >>> (As I mentioned [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.2 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [34.202.193.197 listed in sa-accredit.habeas.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.3 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [34.202.193.197 listed in bl.score.senderscore.com] 0.0 RCVD_IN_MSPIKE_H5 RBL: Excellent reputation (+5) [34.202.193.197 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 79706 Cc: 79706 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.5 (/) Eshel Yaron [26/Feb 6:54pm +01] wrote: > Hi, > > Sean Whitton <spwhitton@HIDDEN> writes: > >> Eshel Yaron [23/Feb 9:18pm +01] wrote: >>> Hmm, what do you have in mind? >>> >>> (As I mentioned upthread: >>> >>> These problems essentially stem from a common cause: the way let-alist >>> analyzes its body is too naive. >>> >>> So AFAICT addressing these issues would require employing a different, >>> much richer code analysis. The cl-macrolet approach lets us hook into >>> such a proper analysis, practically for free.) >> >> I don't understand why you're not considering replacing let-alist's body >> analysis with a better one? > > Well, I did consider it of course. It's just much easier and better in > the long run to migrate to a cl-macrolet based approach, IMO. Well then maybe let-alist should be migrated to use cl-macrolet? >> That would not be a breaking change? > > My proposal doesn't break anything either, we'd just add an alternative, > recommend it perhaps, and at some later point we'd deprecate let-alist. That's too disruptive, I think. -- Sean Whitton
bug-gnu-emacs@HIDDEN:bug#79706; Package emacs.
Full text available.
Received: (at 79706) by debbugs.gnu.org; 26 Feb 2026 19:28:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 26 14:28:25 2026
Received: from localhost ([127.0.0.1]:43258 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vvh29-0003oR-1R
for submit <at> debbugs.gnu.org; Thu, 26 Feb 2026 14:28:25 -0500
Received: from sendmail.purelymail.com ([34.202.193.197]:35686)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
id 1vvh26-0003nq-4r
for 79706 <at> debbugs.gnu.org; Thu, 26 Feb 2026 14:28:23 -0500
DKIM-Signature: a=rsa-sha256;
b=aAV8Lq5owXap2Z8pPo6X/5nGpEsQDfuVVKXmMWfnW/kYJYJYIlVt5eAACgStX1si6CH+cRhQwkzOM+HcwOKVHgsm20nj9EQtq68Y7LICJsI+vr678LOn/KeaUJttuMC0zEktaOtF+jJ7c/WdYk0WrSq5ADGH2k7PCdH00/9S0iGAogG357mldYZZIf19yxS1AXstvdwE24h7kOkUeTvUro1ndCrlCufsriEeCUvQk7vO9Pxv1vaS8rGYORTrlZEvbOQ5/7akLSqNKPA2XD1bZIUoekM/MDPiQ4g/OMlHLtleZPGZthlKorL4miXaQ2m9+CIhp0N3PKx7eZMJxWcEaw==;
s=purelymail3; d=spwhitton.name; v=1;
bh=a/kFCXq237R1p5r1N1eTBdUKY8p8bFWRMPfGYUxpSHE=;
h=Received:Received:From:To:Subject:Date;
DKIM-Signature: a=rsa-sha256;
b=UdRmXkwNKdDBbEIMUPzMLVc19quBconqsIlHFXAwyYRZwcouzPrRmHEesx9pvFoK0WTaovEoy1/CTzpoAWX6EE9aC2+Rv28tE2JpZisAVy7i6N/NbTz+HUvv+ew/o+zUSCbdV0KHW3RSViRePzxYYLqLeeHGjkaBOFq7O7GVipj94Dz/N4yKQpPtsh01QsH0YubgAWwKXes7HCiyA64HUk58R9myHUFuMn5GwHZ14c6XqslIjWj4q7LhLtcPbORDqyjh3GCjM8Diwl67ezWefTFqHn7T2FpmyOClMoeD91bKdITVHvDXvRugZL7bFDzKBsZAdU9i1QYJ6zGokkByEQ==;
s=purelymail3; d=purelymail.com; v=1;
bh=a/kFCXq237R1p5r1N1eTBdUKY8p8bFWRMPfGYUxpSHE=;
h=Feedback-ID:Received:Received:From:To:Subject:Date;
Feedback-ID: 20115:3760:null:purelymail
X-Pm-Original-To: 79706 <at> debbugs.gnu.org
Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 592204547;
(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384);
Thu, 26 Feb 2026 19:28:13 +0000 (UTC)
Received: by melete.silentflame.com (Postfix, from userid 1000)
id EC4407E70AE; Thu, 26 Feb 2026 19:28:11 +0000 (GMT)
From: Sean Whitton <spwhitton@HIDDEN>
To: rms@HIDDEN
Subject: Re: bug#79706: 31.0.50; problems with let-alist
In-Reply-To: <E1vvSmo-0005DX-8t@HIDDEN>
References: <874irkbos0.fsf@HIDDEN>
<87y0kvrqhl.fsf@HIDDEN>
<87bjhflctx.fsf@HIDDEN>
<878qcjb4df.fsf@HIDDEN>
<877bs2h680.fsf@HIDDEN>
<E1vvSmo-0005DX-8t@HIDDEN>
Date: Thu, 26 Feb 2026 19:28:11 +0000
Message-ID: <874in34850.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.5 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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
the administrator of that system for details.
Content preview: Richard Stallman [25/Feb 11:15pm -05] wrote: > [[[ To any
NSA and FBI agents reading my email: please consider ]]] > [[[ whether
defending
the US Constitution against all enemies, ]]] > [[[ foreign or [...]
Content analysis details: (1.5 points, 10.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
1.2 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE:
The query to Validity was blocked. See
https://knowledge.validity.com/hc/en-us/articles/20961730681243
for more information.
[34.202.193.197 listed in sa-trusted.bondedsender.org]
0.3 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The
query to Validity was blocked. See
https://knowledge.validity.com/hc/en-us/articles/20961730681243
for more information.
[34.202.193.197 listed in bl.score.senderscore.com]
0.0 RCVD_IN_MSPIKE_H5 RBL: Excellent reputation (+5)
[34.202.193.197 listed in wl.mailspike.net]
-0.0 SPF_PASS SPF: sender matches SPF record
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
0.0 RCVD_IN_MSPIKE_WL Mailspike good senders
X-Debbugs-Envelope-To: 79706
Cc: 79706 <at> debbugs.gnu.org, me@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)
Richard Stallman [25/Feb 11:15pm -05] wrote:
> [[[ To any NSA and FBI agents reading my email: please consider ]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> > > These problems essentially stem from a common cause: the way let-alist
> > > analyzes its body is too naive.
>
> This leads me to wonder whether the specification of `let-alist' is
> somehow incoherent. The idea of lexical scoping goes with the idea
> that the variables' names are optimized away in the process of
> preparing the code to run. Does it really make sense to use
> `let-alist' to bind lexical variables?
>
> Can someone show some real examples of doing that? It would be useful
> to see what sort of problem is being solved by that solution,
> and why it avoids causing problems.
In align.el the function align--rule-should-run uses let-alist.
It expands like this:
(defun align--rule-should-run (rule)
"Given an `align-rules-list' entry RULE, return t if it should run.
This is decided by the `modes' and `run-if' keys in the alist
RULE. Their meaning is documented in `align-rules-list' (which see)."
(let-alist rule
(not (or (and .modes (not (derived-mode-p (eval .modes))))
(and .run-if (not (funcall .run-if)))))))
=>
(defun align--rule-should-run (rule)
"Given an `align-rules-list' entry RULE, return t if it should run.
This is decided by the `modes' and `run-if' keys in the alist
RULE. Their meaning is documented in `align-rules-list' (which see)."
(let ((alist rule))
(let
((.modes (cdr (assq 'modes alist)))
(.run-if (cdr (assq 'run-if alist))))
(not
(or (and .modes (not (derived-mode-p (eval .modes))))
(and .run-if (not (funcall .run-if))))))))
--
Sean Whitton
bug-gnu-emacs@HIDDEN:bug#79706; Package emacs.
Full text available.Received: (at 79706) by debbugs.gnu.org; 26 Feb 2026 17:54:14 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 26 12:54:14 2026 Received: from localhost ([127.0.0.1]:42647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vvfYz-000590-9V for submit <at> debbugs.gnu.org; Thu, 26 Feb 2026 12:54:13 -0500 Received: from mail.eshelyaron.com ([107.175.124.16]:49936 helo=eshelyaron.com) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1vvfYw-00058k-3o for 79706 <at> debbugs.gnu.org; Thu, 26 Feb 2026 12:54:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1772128449; bh=PvFbsHBDEcrTbyj7GY0YR3D0VLggb66PpbCavz56RZw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=LxQgZ8dXpqwzsuQOmF6RjX27f/w82Vju+dxTHhXG1znJDfFxCFa+nnPzWeepC+g1P 778DYUVWF6wk7AZ48nIcantIJh3Fp+DsjqMYEJ6cz7PPpeeA3U0M4zkaNx/U3+qSV4 PRXVukqplDtVTDSyX2cHDJSsvdmuvd6i8pHO77vT3R6XiNXof8SWaIbUCbcCkI6oAl B6YaQI9QN08l4y7TizqlHxFZUWhMcCOueY89WI31pTL6RCH/HZbBkUUxJRxA5o1F9D cINZ7vwaDw1j6b5Qpv4cVuRVQHdBA6brtJ81K/NWYGfoMjax+Kx4++XM+bLPDfzoWz 71ptFLj6feH5Q== From: Eshel Yaron <me@HIDDEN> To: Sean Whitton <spwhitton@HIDDEN> Subject: Re: bug#79706: 31.0.50; problems with let-alist In-Reply-To: <877bs2h680.fsf@HIDDEN> References: <874irkbos0.fsf@HIDDEN> <87y0kvrqhl.fsf@HIDDEN> <87bjhflctx.fsf@HIDDEN> <878qcjb4df.fsf@HIDDEN> <877bs2h680.fsf@HIDDEN> Date: Thu, 26 Feb 2026 18:54:01 +0100 Message-ID: <87ecm79yrq.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: Hi, Sean Whitton <spwhitton@HIDDEN> writes: > Eshel Yaron [23/Feb 9:18pm +01] wrote: >> Hmm, what do you have in mind? >> >> (As I mentioned upthread: >> >> These problems essentially stem from a common cause: the way let-alist >> analyzes its [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.3 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [107.175.124.16 listed in bl.score.senderscore.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.2 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [107.175.124.16 listed in sa-trusted.bondedsender.org] X-Debbugs-Envelope-To: 79706 Cc: 79706 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.5 (/) Hi, Sean Whitton <spwhitton@HIDDEN> writes: > Eshel Yaron [23/Feb 9:18pm +01] wrote: >> Hmm, what do you have in mind? >> >> (As I mentioned upthread: >> >> These problems essentially stem from a common cause: the way let-alist >> analyzes its body is too naive. >> >> So AFAICT addressing these issues would require employing a different, >> much richer code analysis. The cl-macrolet approach lets us hook into >> such a proper analysis, practically for free.) > > I don't understand why you're not considering replacing let-alist's body > analysis with a better one? Well, I did consider it of course. It's just much easier and better in the long run to migrate to a cl-macrolet based approach, IMO. > That would not be a breaking change? My proposal doesn't break anything either, we'd just add an alternative, recommend it perhaps, and at some later point we'd deprecate let-alist. >>> Adding a new macro is therefore certainly premature. >> >> Alright, when would be the right time in your opinion? > > If we run into things that we can't fix without a breaking change and > we're not willing to make that breaking change. It's not that we can't fix 'em, it's just not really worth it, I think. (But maybe I'm wrong and there's a simple solution that I'm not seeing, that's why I asked above what kind of fix you had in mind.) Best, Eshel
bug-gnu-emacs@HIDDEN:bug#79706; Package emacs.
Full text available.Received: (at 79706) by debbugs.gnu.org; 26 Feb 2026 04:15:51 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 25 23:15:51 2026 Received: from localhost ([127.0.0.1]:36908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vvSn0-0008CE-5a for submit <at> debbugs.gnu.org; Wed, 25 Feb 2026 23:15:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37722) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <rms@HIDDEN>) id 1vvSmv-0008BK-Vs for 79706 <at> debbugs.gnu.org; Wed, 25 Feb 2026 23:15:46 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <rms@HIDDEN>) id 1vvSmq-00069i-KI; Wed, 25 Feb 2026 23:15:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=EvGGdrUKnblayfucGTwJ4SbuUxYpo9QSu6bnuheWc14=; b=ZE1AnIwCkGzB DWYjGt389KIS1jLr+2wP0zDq767sWcJQAtALI/F49XRCHPL8I2F9jvjrg4hldtgDwKFcsGZCGHuvZ binmCL/HdVv/gL85Ihv2cfiwvq5mZNqp4KRq/Kyfy1t0xykLexLFlAVlUseDoofkIKdbjX3psif1F OY1IEMOtmTDKL285vu9LuiOHiKbootU/689rlmCq1wWRR/z91HOyOvzxHuVt7sWSsnGkzdRAZfZfr RGq7EU3/P3gfkW21k5NOpnbg5O12dW9mLFqpcANaLD4XYhJgHciiP0ECedk6PROq0lC/8aRVUpnlN RntWFRHTsalzxAvDqKJmkg==; Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from <rms@HIDDEN>) id 1vvSmo-0005DX-8t; Wed, 25 Feb 2026 23:15:38 -0500 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman <rms@HIDDEN> To: Sean Whitton <spwhitton@HIDDEN> In-Reply-To: <877bs2h680.fsf@HIDDEN> (message from Sean Whitton on Tue, 24 Feb 2026 08:54:23 +0000) Subject: Re: bug#79706: 31.0.50; problems with let-alist References: <874irkbos0.fsf@HIDDEN> <87y0kvrqhl.fsf@HIDDEN> <87bjhflctx.fsf@HIDDEN> <878qcjb4df.fsf@HIDDEN> <877bs2h680.fsf@HIDDEN> Message-Id: <E1vvSmo-0005DX-8t@HIDDEN> Date: Wed, 25 Feb 2026 23:15:38 -0500 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79706 Cc: 79706 <at> debbugs.gnu.org, me@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Reply-To: rms@HIDDEN Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > These problems essentially stem from a common cause: the way let-alist > > analyzes its body is too naive. This leads me to wonder whether the specification of `let-alist' is somehow incoherent. The idea of lexical scoping goes with the idea that the variables' names are optimized away in the process of preparing the code to run. Does it really make sense to use `let-alist' to bind lexical variables? Can someone show some real examples of doing that? It would be useful to see what sort of problem is being solved by that solution, and why it avoids causing problems. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)
bug-gnu-emacs@HIDDEN:bug#79706; Package emacs.
Full text available.Received: (at 79706) by debbugs.gnu.org; 24 Feb 2026 08:54:36 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 24 03:54:36 2026 Received: from localhost ([127.0.0.1]:38166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vuoBg-0004Lr-0a for submit <at> debbugs.gnu.org; Tue, 24 Feb 2026 03:54:36 -0500 Received: from sendmail.purelymail.com ([34.202.193.197]:48614) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>) id 1vuoBd-0004Ld-GS for 79706 <at> debbugs.gnu.org; Tue, 24 Feb 2026 03:54:34 -0500 DKIM-Signature: a=rsa-sha256; b=CQgVlsQKkzd4RshaLdgxHndGvfz/TcLY2EjJh97aCV1Rx1ogkwo6LkarrClpSjCtFDbMeRw9ewVHDQerzcTOhwuMrR6wgaSbHj24BDMRiUPbmj1bmCGEt3bglpqAJej9tVBpqwqlJA4e+gk64CaMvZ9dfo4sstma4mDi3sF+mBcSQqW15BbAfKghNvFwSqbtf4S6b/n519fUBsy+GDb1OA5t1URd1cMrdH82qxgZBy4oxQPQlAQmbyFUgCBDEXN+NscYY9tBnjgFg23nPuLf2gBucHjlaDWnh+/GpCv9NoDvBTsqsInEk1Mv0IQhndXGHRbT0lvzADautdrDtacibQ==; s=purelymail2; d=spwhitton.name; v=1; bh=gtALyBnbuTRfKwCCw0bPGeKoeVKB25BXHkpHxkpt4FI=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=kS9ujJerJ4eT+8THmZeRh+yIRNJXhDVdhMuxAQ2twLPmbMc6YLYuLd/nSTzc4MzK2Lo934M6s4d0TPkXTwFnOtYz/BTK8Z6OkoVIMy+4X3Y0s11T/rqtxLTbYAUuEBYW9vS1kXiq7QTvqS9KCxLXj4uc8oc10u8VY/HyLcSR0ec9z5z+54qdXFXujVyvwSl0HyUoXdxOwH6030Bk1Bht2/AdMKfOfXmTaI5aC7eoEwUynpHr7jX5Sk20Co/k5eC6ovxkyKX5WrbdNfCbuxHPksTChq+m4evaA9L7JlTZSr05A87/NQ9IOGOB35eb3ep4nDobbyNfoE6k2mey1kDA+g==; s=purelymail2; d=purelymail.com; v=1; bh=gtALyBnbuTRfKwCCw0bPGeKoeVKB25BXHkpHxkpt4FI=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 79706 <at> debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 156423816; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 24 Feb 2026 08:54:25 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 9F4267E6F76; Tue, 24 Feb 2026 08:54:23 +0000 (GMT) From: Sean Whitton <spwhitton@HIDDEN> To: Eshel Yaron <me@HIDDEN> Subject: Re: bug#79706: 31.0.50; problems with let-alist In-Reply-To: <878qcjb4df.fsf@HIDDEN> References: <874irkbos0.fsf@HIDDEN> <87y0kvrqhl.fsf@HIDDEN> <87bjhflctx.fsf@HIDDEN> <878qcjb4df.fsf@HIDDEN> Date: Tue, 24 Feb 2026 08:54:23 +0000 Message-ID: <877bs2h680.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 79706 Cc: 79706 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) Eshel Yaron [23/Feb 9:18pm +01] wrote: > Hmm, what do you have in mind? > > (As I mentioned upthread: > > These problems essentially stem from a common cause: the way let-alist > analyzes its body is too naive. > > So AFAICT addressing these issues would require employing a different, > much richer code analysis. The cl-macrolet approach lets us hook into > such a proper analysis, practically for free.) I don't understand why you're not considering replacing let-alist's body analysis with a better one? That would not be a breaking change? >> Adding a new macro is therefore certainly premature. > > Alright, when would be the right time in your opinion? If we run into things that we can't fix without a breaking change and we're not willing to make that breaking change. -- Sean Whitton
bug-gnu-emacs@HIDDEN:bug#79706; Package emacs.
Full text available.Received: (at 79706) by debbugs.gnu.org; 23 Feb 2026 20:18:46 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 23 15:18:46 2026 Received: from localhost ([127.0.0.1]:58098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vucOE-0002Q5-Bf for submit <at> debbugs.gnu.org; Mon, 23 Feb 2026 15:18:46 -0500 Received: from mail.eshelyaron.com ([107.175.124.16]:50014 helo=eshelyaron.com) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1vucOB-0002Pt-3w for 79706 <at> debbugs.gnu.org; Mon, 23 Feb 2026 15:18:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1771877922; bh=ww8FeW7oi7ILQ/X5UEq9kvDgnSfH5RqSuEEoru4zcdA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=A98jkfY9XIGO0CfoFdOc9n0WaLcp9eBIF7tpn+o1jG4dIyXAY6EgNbVslAhxiZ3dD H5XzzK55D38UkElg5+GbpRn1ZTycUCBltQ9w8qaXM3T+X4+fkyBBfJd9hNrpu4y9B4 Yx1aBFIf8cKCRRwxZSC8uVSbumiNkyCTxfbh0caujij9KgbhAo2+RFIu+qzh36ah/H 7f3bpYFuPRPQFlWzqRxCu6LG8OGajdopsZ7ueVByBj8DyN7zDZItAWtpG5BWGaVJ6M 2a92dpA1tKcWIotTolMbLNSQps7TqjRWAEYEsriXN+gJfSu9t0Z9sAlSQnA5RzvNd5 mYxqoIhiUKJ+w== From: Eshel Yaron <me@HIDDEN> To: Sean Whitton <spwhitton@HIDDEN> Subject: Re: bug#79706: 31.0.50; problems with let-alist In-Reply-To: <87bjhflctx.fsf@HIDDEN> References: <874irkbos0.fsf@HIDDEN> <87y0kvrqhl.fsf@HIDDEN> <87bjhflctx.fsf@HIDDEN> Date: Mon, 23 Feb 2026 21:18:36 +0100 Message-ID: <878qcjb4df.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 79706 Cc: 79706 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) Hi Sean, Sean Whitton <spwhitton@HIDDEN> writes: > Eshel Yaron [14/Feb 9:59pm +01] wrote: >> This macro solves all of the aforementioned let-alist shortcomings, at >> the cost of a slightly heavier notation; e.g. you write "(a foo bar)" >> instead of ".foo.bar". >> >> Since let-alist has seen non-negligible use (mostly out of core Emacs), >> I propose adding this macro as a recommended alternative in Emacs 31 and >> maybe converting the few let-alist forms in emacs.git to use alist-let, >> but without deprecating let-alist for now. > > Many of the problems you identify are things that could be fixed in > let-alist without breaking any existing code. Hmm, what do you have in mind? (As I mentioned upthread: These problems essentially stem from a common cause: the way let-alist analyzes its body is too naive. So AFAICT addressing these issues would require employing a different, much richer code analysis. The cl-macrolet approach lets us hook into such a proper analysis, practically for free.) > Adding a new macro is therefore certainly premature. Alright, when would be the right time in your opinion? Thanks, Eshel
bug-gnu-emacs@HIDDEN:bug#79706; Package emacs.
Full text available.Received: (at 79706) by debbugs.gnu.org; 23 Feb 2026 15:05:57 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 23 10:05:57 2026 Received: from localhost ([127.0.0.1]:54974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vuXVU-0007dR-On for submit <at> debbugs.gnu.org; Mon, 23 Feb 2026 10:05:57 -0500 Received: from sendmail.purelymail.com ([34.202.193.197]:43598) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>) id 1vuXVR-0007cy-K9 for 79706 <at> debbugs.gnu.org; Mon, 23 Feb 2026 10:05:54 -0500 DKIM-Signature: a=rsa-sha256; b=GNvPsEC4qHKmEYJo+2zKeuh2Bm48gh/NHEkYcklQ9slqFHBQ4hH6YLlh6sV7tuy3yX1yd3DIJfzJLVH9FAhUEdm2J4wEvEonRv6N/6lp9twD/9Nd9RgmAwgu+MVzgiAQP7iE+E/cVHesPGMBfhiNbCtVwhUFcldFP/e0e3bRLJEKMGXFaTlBDWqhijv5+E7JuZ6RCb3imku7zfej3ADmJrjrPkEMNdzqa4y7b/mMsSwg3gWupCCugfpWqE5Rih/RXjIORhJe1rtXzFO+V2xVTn1VfMo15v6Yi8+CzoqY3oDU2hVX0cW11+hPj9Wv81EmLMRgzA6O7uxzbC7Nm9TI6Q==; s=purelymail2; d=spwhitton.name; v=1; bh=IORJm+3wD5WMAblDfTLz0was3mM9DiBrn3mGCS1OEoA=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=ZyVkzNd+PC5eeOvyPl7qe0JAJJ2IprGN1Vz9ipH5CdeicUHqhMjrBiKdJwORVq1uwjCUtY992hl1cghWkLBAsDtkF/1JK0tSa21S8yKwMexoJPAC2eaWKldUkGtNxqQIw91qe6vQZHa/dOwooyD+kJYmJP8stysiK6JkebGS9UGQzsLr3U6rZkUc6FAIRtUU8WLaidLtHaToR61qHJZhWfktOsA5Ra6okYHutD0fvJe/0RYXWwrl6i7nJc0QE+o6vto3UE8y2/M0vaQIEyVe2cR1lZ3zYkQ6bBtUEiTA4jczsb226VSM54knZljbo/B1eUqEb0GxQ97Arlijmi3SZQ==; s=purelymail2; d=purelymail.com; v=1; bh=IORJm+3wD5WMAblDfTLz0was3mM9DiBrn3mGCS1OEoA=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 79706 <at> debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1915911039; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Mon, 23 Feb 2026 15:05:47 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id CF5017E08D9; Mon, 23 Feb 2026 15:05:46 +0000 (GMT) From: Sean Whitton <spwhitton@HIDDEN> To: Eshel Yaron <me@HIDDEN> Subject: Re: bug#79706: 31.0.50; problems with let-alist In-Reply-To: <87y0kvrqhl.fsf@HIDDEN> References: <874irkbos0.fsf@HIDDEN> <87y0kvrqhl.fsf@HIDDEN> Date: Mon, 23 Feb 2026 15:05:46 +0000 Message-ID: <87bjhflctx.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 79706 Cc: 79706 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) Eshel Yaron [14/Feb 9:59pm +01] wrote: > This macro solves all of the aforementioned let-alist shortcomings, at > the cost of a slightly heavier notation; e.g. you write "(a foo bar)" > instead of ".foo.bar". > > Since let-alist has seen non-negligible use (mostly out of core Emacs), > I propose adding this macro as a recommended alternative in Emacs 31 and > maybe converting the few let-alist forms in emacs.git to use alist-let, > but without deprecating let-alist for now. Many of the problems you identify are things that could be fixed in let-alist without breaking any existing code. Adding a new macro is therefore certainly premature. -- Sean Whitton
bug-gnu-emacs@HIDDEN:bug#79706; Package emacs.
Full text available.
Received: (at 79706) by debbugs.gnu.org; 15 Feb 2026 10:55:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 15 05:55:25 2026
Received: from localhost ([127.0.0.1]:42341 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vrZmf-0001cB-GI
for submit <at> debbugs.gnu.org; Sun, 15 Feb 2026 05:55:25 -0500
Received: from mail.eshelyaron.com ([107.175.124.16]:58190 helo=eshelyaron.com)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1vrZmd-0001ag-JX
for 79706 <at> debbugs.gnu.org; Sun, 15 Feb 2026 05:55:24 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
s=mail; t=1771152922;
bh=Du+YgO2CIXnnTFK55LRJTcu/M9FhVvQSrpCRgT8DCZg=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=LAB6UDsj9+fUzpTay9JgJtXOR3YnAUYiIGBGAahk+rKE11Ckw6tzOkD+peYzVGad5
DEOi24E/zkhsJZT9jHksM+6NCk/Ujk5gFJAeQPeFpnQelfGCuLLoVc5CKuuGOqILC6
vv6aD0WbCpXJYxemZtRCyyj31nBnlmGFbSpJ8i2JsEepOLmnwmIU1aKZahAsQ8jzUU
tAlD7cE/gE/X7bbWVzNtaT35a8+w5pMzoqaGVrSKCkxs/Bb5AhmZRAcbkVIdsta3xE
OIAOra0nEbAxymTbmyKmO1w1IXF5EIppOzDX+uWVDEpAUX9jOc0aLCQVf1EKVelrs+
LaiCpu+7wlcww==
From: Eshel Yaron <me@HIDDEN>
To: "Basil L. Contovounesios" <basil@HIDDEN>
Subject: Re: bug#79706: 31.0.50; problems with let-alist
In-Reply-To: <87cy27hudw.fsf@HIDDEN>
References: <874irkbos0.fsf@HIDDEN>
<87y0kvrqhl.fsf@HIDDEN> <87cy27hudw.fsf@HIDDEN>
Date: Sun, 15 Feb 2026 11:55:17 +0100
Message-ID: <873432s2cq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79706
Cc: 79706 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
Hi,
"Basil L. Contovounesios" <basil@HIDDEN> writes:
> Eshel Yaron [2026-02-14 21:59 +0100] wrote:
>
>> 2. Alist keys are always looked up using `eq'.
>
> Any ideas for how this restriction could be lifted?
Yes, there are several ways to go about that. I tend to think that it'd
be best to consider concrete use cases to choose the right extension.
Also, always using eq gives us a good starting point since it allows us
to cover the use cases of let-alist.
> Maybe a parallel macrolet with a different name?
Yes, that's one option. Other alternatives I considered are:
1. Per key specification:
(alist-let alist (a foo ("bar" :test #'equal) (2.5 :test #'=) baz))
2. Optional keyword argument per alist-let form:
(alist-let alist :test #'equal BODY...)
3. Another macro, a variant of alist-let that use #'equal for key
comparison, e.g. alist-let-equal
>> This macro solves all of the aforementioned let-alist shortcomings, at
>> the cost of a slightly heavier notation;
>
> And at the cost of repeated lookups given the same key, right?
> E.g. in (list (a foo) (a foo)).
Right. In the current implementation, each (a KEY...) form accesses the
alist independently. Crucially, we never look up values prematurely
even though they are not actually used, as is the case with let-alist.
But yes, there's definitely room for further optimization for code that
accesses the same key multiple times. We need to take into account the
possibility that the value changed between accesses, which might
complicate things a bit.
> I understand this is for the benefit of setf, but maybe we can
> distinguish getters from setters.
Yeah, maybe, I didn't really look into that so far. I was mostly happy
with how setf Just Works :)
Best,
Eshel
bug-gnu-emacs@HIDDEN:bug#79706; Package emacs.
Full text available.Received: (at 79706) by debbugs.gnu.org; 14 Feb 2026 21:45:33 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 14 16:45:33 2026 Received: from localhost ([127.0.0.1]:56475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vrNSG-0005J7-DY for submit <at> debbugs.gnu.org; Sat, 14 Feb 2026 16:45:33 -0500 Received: from mta-13-4.privateemail.com ([198.54.127.109]:37693) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <basil@HIDDEN>) id 1vrNSC-0005IA-CL for 79706 <at> debbugs.gnu.org; Sat, 14 Feb 2026 16:45:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=contovou.net; s=default; t=1771105521; bh=en9wduGKykASW+bbP3JuOdsbsrpoM6/woIwlRf4818w=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Z4jBSGxl2FK+EgsKEm50Ly3PfL6oD1rQHeJ2YDLDqCGqB/lSeEuUkD6gJW5vtMaIO bLd6/s92ga4I24k4dAcStwqzVmsVR0VMBrtujbQIcyN1JvTgfShygHGWj/GZ/bSyD9 ZaRqXQilmpn06cNZaPy4awkIRnTNKUL6LxZIe8EdtDzfLshztPwWno3a50nmvXjWYl PR6egJYaxXS03+j1C0htoedsImz3/gJARAQh2rgSZptOP4ATaTbKwvSAVH9L/vZ9zI zB6hmcimtHFKmuzYiZtQIviXcF2X22TUDAsvHvctRwy2DFfn5bmKWCG6mKD6irGROJ OQMft8/YMPD/w== Received: from mta-13.privateemail.com (localhost [127.0.0.1]) by mta-13.privateemail.com (Postfix) with ESMTP id 4fD2dY5gFgz3hhWY; Sat, 14 Feb 2026 16:45:21 -0500 (EST) Received: from localhost (1F2EF516.nat.pool.telekom.hu [31.46.245.22]) by mta-13.privateemail.com (Postfix) with ESMTPA; Sat, 14 Feb 2026 16:45:20 -0500 (EST) From: "Basil L. Contovounesios" <basil@HIDDEN> To: Eshel Yaron <me@HIDDEN> Subject: Re: bug#79706: 31.0.50; problems with let-alist In-Reply-To: <87y0kvrqhl.fsf@HIDDEN> References: <874irkbos0.fsf@HIDDEN> <87y0kvrqhl.fsf@HIDDEN> Date: Sat, 14 Feb 2026 22:45:15 +0100 Message-ID: <87cy27hudw.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79706 Cc: 79706 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Eshel Yaron [2026-02-14 21:59 +0100] wrote: > 2. Alist keys are always looked up using `eq'. Any ideas for how this restriction could be lifted? Maybe a parallel macrolet with a different name? > This macro solves all of the aforementioned let-alist shortcomings, at > the cost of a slightly heavier notation; And at the cost of repeated lookups given the same key, right? E.g. in (list (a foo) (a foo)). I understand this is for the benefit of setf, but maybe we can distinguish getters from setters. Thanks, -- Basil
bug-gnu-emacs@HIDDEN:bug#79706; Package emacs.
Full text available.
Received: (at 79706) by debbugs.gnu.org; 14 Feb 2026 20:59:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 14 15:59:30 2026
Received: from localhost ([127.0.0.1]:55558 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vrMjh-0006PP-GL
for submit <at> debbugs.gnu.org; Sat, 14 Feb 2026 15:59:30 -0500
Received: from mail.eshelyaron.com ([107.175.124.16]:46128 helo=eshelyaron.com)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1vrMje-0006Ox-MT
for 79706 <at> debbugs.gnu.org; Sat, 14 Feb 2026 15:59:27 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
s=mail; t=1771102765;
bh=EP6JW269VqfCF7ZC9QbtebjCSzn+RWUhekVZPCSxOvI=;
h=From:To:Subject:In-Reply-To:References:Date:From;
b=BXxCMujw5LnZLSDAmVAn8jKIIMCV/U+fIK5Xj6Ni/h6sAAFBR6xa5ytohScBgik+P
rpbV9kjX3GWp042FxWfVF9xGq59vHukBy3urpx6vjg8Sq1ENrM8pZm4d5aoDYTMmkO
guodqLAJtdILuMBGszcyQFGI/qJNB/7KBqhGw2dK0GDEzyg+tNZLzPRkstrwPUZTgg
lKBW7/5jneYdCs7oVcRqUBPfPsFnLO5tKNiabuv/m3HUHdiHquqlvinjUq6YnchsjY
1jNr2VS7PuSJqSAgE5gcSoEDzhuuD7gXqGq6vmSCzrRjV7cxwBwUv7icFLAanHCBhC
Hd3zOIQviZLrw==
From: Eshel Yaron <me@HIDDEN>
To: 79706 <at> debbugs.gnu.org
Subject: Re: bug#79706: 31.0.50; problems with let-alist
In-Reply-To: <874irkbos0.fsf@HIDDEN>
References: <874irkbos0.fsf@HIDDEN>
Date: Sat, 14 Feb 2026 21:59:18 +0100
Message-ID: <87y0kvrqhl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79706
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
Eshel Yaron writes:
> The implementation of let-alist currently suffers from some drawbacks:
>
> 1. It can create bindings for unused alist keys (false positives).
> 2. It can fail to create bindings for some alist keys (false negatives).
> 3. It generates inefficient code.
> 4. It's limited to read-only access.
>
> [...examples...]
>
> These problems essentially stem from a common cause: the way let-alist
> analyzes its body is too naive. It treats the body as plain data,
> disregarding the actual semantics of ELisp code.
>
> I suggest to either reimplement let-alist using a more sophisticated
> code-walker (we might even be able to reuse elisp-scope.el for that!),
> or deprecate it and perhaps provide an alternative based on local macros.
Here's a suggested alternative, tentatively called alist-let:
(defmacro alist-let (alist &rest body)
"Establish access to values of ALIST using (a KEY...) notation in BODY.
ALIST is a form whose value is an alist. It is evaluated (only) once.
In BODY, `a' is local macro that expands to (possibly nested)
`alist-get' calls that access values in the alist. This helps you write
code that accesses multiple fixed keys of a given alist more concisely.
For example, the form
(let ((alist (compute-alist)))
(if (something-p)
(alist-get \\='bar (alist-get \\='foo alist))
(alist-get \\='spam (alist-get \\='baz alist))))
can be simplified with this macro to the equivalent form
(alist-let (compute-alist)
(if (something-p) (a foo bar) (a baz spam)))
Some additional notes:
1. The first KEY in a (a KEY...) form is the outermost (unnested) key.
2. Alist keys are always looked up using `eq'.
3. You can use (setf (a KEY...) NEWVAL) to destructively update
the alist, associating the new value NEWVAL to key(s) KEY(...)."
(declare (indent 1))
(macroexp-let2 nil alist alist
`(cl-macrolet ((a (key &rest keys)
(let ((form `(alist-get ',key ,',alist)))
(while keys (setq form `(alist-get ',(pop keys) ,form)))
form)))
,@body)))
This macro solves all of the aforementioned let-alist shortcomings, at
the cost of a slightly heavier notation; e.g. you write "(a foo bar)"
instead of ".foo.bar".
Since let-alist has seen non-negligible use (mostly out of core Emacs),
I propose adding this macro as a recommended alternative in Emacs 31 and
maybe converting the few let-alist forms in emacs.git to use alist-let,
but without deprecating let-alist for now.
Thoughts?
Eshel
bug-gnu-emacs@HIDDEN:bug#79706; Package emacs.
Full text available.
Received: (at submit) by debbugs.gnu.org; 27 Oct 2025 10:52:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 27 06:52:28 2025
Received: from localhost ([127.0.0.1]:48212 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vDKpv-0006X2-KI
for submit <at> debbugs.gnu.org; Mon, 27 Oct 2025 06:52:27 -0400
Received: from lists.gnu.org ([2001:470:142::17]:48564)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1vDKpr-0006Wd-Ul
for submit <at> debbugs.gnu.org; Mon, 27 Oct 2025 06:52:24 -0400
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 <me@HIDDEN>) id 1vDKph-0005oy-LA
for bug-gnu-emacs@HIDDEN; Mon, 27 Oct 2025 06:52:15 -0400
Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <me@HIDDEN>) id 1vDKpd-0003xw-1l
for bug-gnu-emacs@HIDDEN; Mon, 27 Oct 2025 06:52:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
s=mail; t=1761562324;
bh=KDBByHK3CSCeby/RGQPB4QW33YsRL+NhS27QE+JyDcE=;
h=From:To:Subject:Date:From;
b=q37K+2IULfvVWD2g3qBwncdQ/hm8QJZDzm2PqCWd8bAIVpEyJBcJr1hYl9gv0xplH
LThySIavVW71zbN5HfC6/U19xrK5ODobx7cG2zUX1hCDmXjorfEJJtDioXliu1LRV0
dX97SABvbLMmiCl0mO0FFDGj0VpgywQV7CjamieIiWqTi/Axgr7bfZinsCihJ17kQh
o5Gl7QT56oVhvW3Luoesb8xkFVf6Z3KU4lCJcTziEmbZQWGr6RSGpkjkB3yj7EnQ37
ki1ZrdpQTwNsgAANdWT2Q5AUCCHKaRFTFED+r9Yl2Hl/LgW6koBThnqhugsHhAlr3n
s5/mhFUSe7fMw==
From: Eshel Yaron <me@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 31.0.50; problems with let-alist
X-Debbugs-Cc:
Date: Mon, 27 Oct 2025 11:51:59 +0100
Message-ID: <874irkbos0.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@HIDDEN;
helo=eshelyaron.com
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,
RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)
Hi,
The implementation of let-alist currently suffers from some drawbacks:
1. It can create bindings for unused alist keys (false positives).
2. It can fail to create bindings for some alist keys (false negatives).
3. It generates inefficient code.
4. It's limited to read-only access.
A false positive (1) example:
(let-alist alist '.foo)
This form expands to:
(let ((alist alist))
(let ((.foo (cdr (assq 'foo enlist))))
'.foo))
Note how the local variable .foo is unused and the lookup is unneeded.
Likewise here:
(let-alist alist [.foo])
And also in these:
(let-alist alist (let ((.foo 'bar)) 'baz))
(let-alist alist (ignore-error .foo 'bar))
(let-alist alist (funcall #'.foo))
Here's another, slightly more "interesting" false positive:
(defalias 'la 'let-alist)
(let-alist alist (la blist .foo))
Now, a false negative (2) example:
(cl-macrolet ((oof () '.foo)) (let-alist alist (oof)))
This expands to:
(let ((alist alist)) (let nil .foo))
Which gives a void-variable error, because let-alist failed to generate
a binding for '.foo'.
Next, let's consider the common case in which an alist entry is
consulted only conditionally. A trivial example:
(let-alist alist (when nil .foo))
This expands to:
(let ((alist alist))
(let ((.foo (cdr (assq 'foo alist))))
(when nil .foo)))
In words: the generated code looks up 'foo' too early (3).
This is perhaps the most pressing issue since it affects existing code
"in the wild", even among the very few let-alist forms in core Emacs,
for example see align--rule-should-run and ffap-gopher-at-point.
Lastly, a missing feature, let-alist doesn't allow us to modify the
alist entries (4):
(let ((res nil))
(let-alist res (setf .foo 'bar))
res)
=> nil
These problems essentially stem from a common cause: the way let-alist
analyzes its body is too naive. It treats the body as plain data,
disregarding the actual semantics of ELisp code.
I suggest to either reimplement let-alist using a more sophisticated
code-walker (we might even be able to reuse elisp-scope.el for that!),
or deprecate it and perhaps provide an alternative based on local macros.
Thanks,
Eshel
Eshel Yaron <me@HIDDEN>:bug-gnu-emacs@HIDDEN.
Full text available.bug-gnu-emacs@HIDDEN:bug#79706; Package emacs.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.