From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Lars Ingebrigtsen <larsi@gnus.org>
Newsgroups: gmane.emacs.bugs
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Date: Sat, 12 Feb 2022 18:21:31 +0100
Message-ID: <87ee480zms.fsf@gnus.org>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@qq.com>
 <877dos50su.fsf@web.de> <87k0e04jet.fsf@gnus.org>
 <jwvr188ywem.fsf-monnier+emacs@gnu.org> <87iltk11z5.fsf@gnus.org>
 <jwvv8xkovwb.fsf-monnier+emacs@gnu.org>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="9590"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
Cc: Michael Heerdegen <michael_heerdegen@web.de>, jixiuf <jixiuf@qq.com>,
 45619@debbugs.gnu.org
To: Stefan Monnier <monnier@iro.umontreal.ca>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 12 18:22:30 2022
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1nIw6P-0002Gl-Tq
	for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Feb 2022 18:22:29 +0100
Original-Received: from localhost ([::1]:34874 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1nIw6O-0001aO-Q5
	for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Feb 2022 12:22:28 -0500
Original-Received: from eggs.gnu.org ([209.51.188.92]:38026)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1nIw5y-0001Yv-HR
 for bug-gnu-emacs@gnu.org; Sat, 12 Feb 2022 12:22:02 -0500
Original-Received: from debbugs.gnu.org ([209.51.188.43]:41665)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1nIw5y-0003RA-6g
 for bug-gnu-emacs@gnu.org; Sat, 12 Feb 2022 12:22:02 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1nIw5x-000728-Qt
 for bug-gnu-emacs@gnu.org; Sat, 12 Feb 2022 12:22:01 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Lars Ingebrigtsen <larsi@gnus.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sat, 12 Feb 2022 17:22:01 +0000
Resent-Message-ID: <handler.45619.B45619.164468650727011@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: moreinfo
Original-Received: via spool by 45619-submit@debbugs.gnu.org id=B45619.164468650727011
 (code B ref 45619); Sat, 12 Feb 2022 17:22:01 +0000
Original-Received: (at 45619) by debbugs.gnu.org; 12 Feb 2022 17:21:47 +0000
Original-Received: from localhost ([127.0.0.1]:35562 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1nIw5i-00071Z-L5
 for submit@debbugs.gnu.org; Sat, 12 Feb 2022 12:21:46 -0500
Original-Received: from quimby.gnus.org ([95.216.78.240]:44310)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@gnus.org>) id 1nIw5g-00071I-Kn
 for 45619@debbugs.gnu.org; Sat, 12 Feb 2022 12:21:45 -0500
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=jZbVEwwjsiCjCyCyH2WgZ3gvT22uSQK9Mk7V9946sCg=; b=BeH8FC48jjqFXc/5aDFdVdtjIY
 AHddBnhKPPRA32xKS71vCrP0M9d/5HReP+XLhZ9MflfRnkCFvVvpQqgNGGpor6uycjWM2HNiyIuxI
 SeBUYMYvV57ZEufQI0Pdnh2SL0WzmokGnnO/I66JNZNxWfY0Cq0JVZTNN/IwVVBHoALE=;
Original-Received: from [84.212.220.105] (helo=giant)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@gnus.org>)
 id 1nIw5V-0001Jf-DR; Sat, 12 Feb 2022 18:21:36 +0100
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEX03LSVgWXr2rwU
 DgheTjv////FslQwAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+YCDBEUNsAvNWwAAAGSSURBVDjLfZSL
 ba0wDIah6gC1yQBNYIEce4HE3n+m2uYQ0it6LUUR+cjvJyzLn7ZCBvC1Anz9Rh/ftpbvh0t240kL
 M5lhmS1A2RzU8+QAvIE44DjPDO0GRENrr5NUPkH3A2H8DZQDZFIoOID50PQGUHKfnDeAAAdpOXCS
 6keJqHYL7ph9VCgRzmbpjHDXZElAPoMizq8BItZQzkr16EPKK8Lqj6BS97sku50LRz1UmvQ8AY1S
 baIta4cbsAQgA0XB6/v2oQF2FuUJrJY4eY02NsmiaYDohiiwbQZae4PPANqS+g6cFPEGppVFSCwM
 SAinlAZgEK+NmDfUE0Ail4dmO3trGp/AmuHvYknUvGdyAVXLgyyWjVLEofUCPj/N5+4cJKp3Htar
 ttNlrykPae0YoM8JYsEBKk43sNSYYYicpszxiJikC6Wab8CweZp02At98mHTcV70ofuniNfM7zam
 M7gC+gu8TKo8AYaij4BsdFN/ArUAJnwADPZ5pqtRbgrDlvVr/DNK8XUN5//tozz9XpYf84OP1yk2
 CiQAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDItMTJUMTc6MjA6NTQrMDA6MDBSwTM7AAAAJXRF
 WHRkYXRlOm1vZGlmeQAyMDIyLTAyLTEyVDE3OjIwOjU0KzAwOjAwI5yLhwAAAABJRU5ErkJggg==
X-Now-Playing: Jon Eberson Group's _Stories_: "Colours"
In-Reply-To: <jwvv8xkovwb.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message
 of "Sat, 12 Feb 2022 12:10:23 -0500")
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: "bug-gnu-emacs"
 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Xref: news.gmane.io gmane.emacs.bugs:226737
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/226737>

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> I don't think a single example can represent all cases.  Try:
>
>     (defun zot ()
>       (pcase-let (((or `(,foo) foo) '(2)))
>         (progn (bar))))

Hm, yes.

>>> I still think pcase should emit a warning when asked to bind
>>> a dynamically scoped variable.
>> If pcase-let currently does work fine for dynamic variables then it's
>> likely that people are depending on it, and it's too late to change...
>
> I don't mean to change the generated code, but to discourage such uses
> since they may break when the code is modified in apparently-minor ways.
> Hence a warning.

Byte-compiling this does yield a warning in Emacs 29:

pcase.el:6:28: Warning: Lexical argument shadows the dynamic variable foo


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no