bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45619: 28.0.50; pcase-let on MacOS doesn't work


From: Lars Ingebrigtsen
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Date: Sat, 12 Feb 2022 18:21:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]