GNU bug report logs - #45619
No warning when pcase-let is binding dynamic variable

Previous Next

Package: emacs;

Reported by: jixiuf <jixiuf <at> qq.com>

Date: Sun, 3 Jan 2021 09:05:01 UTC

Severity: normal

Found in version 28.0.50

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, jixiuf <jixiuf <at> qq.com>, 45619 <at> debbugs.gnu.org
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Date: Sat, 12 Feb 2022 17:30:54 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> Hmm... I doubt it's fixed in all cases.

Here's a more self-contained example:

;;;  -*- lexical-binding: t -*-

(defvar foo 1)

(defun zot ()
  (pcase-let ((`(,foo) '(2)))
    (bar)))

(defun bar ()
  (message "%s" foo))

M-: (zot) messages "2".

> 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...

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




This bug report was last modified 3 years and 114 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.