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

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

bug#46786: 28.0.50; pcase-let does not bind variables used inside macro


From: Lars Ingebrigtsen
Subject: bug#46786: 28.0.50; pcase-let does not bind variables used inside macro
Date: Sat, 27 Feb 2021 06:08:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Mauricio Collares <mauricio@collares.org> writes:

> This testcase is a reduced version of a problem that happens in
> the "matrix-client.el" package (available on alphapapa's GitHub):
>
> (require 'cl-lib)
> (require 'pcase)
>
> (cl-macrolet
>     ((message-self () `(message self)))
>   (pcase-let ((`(,self ,self2) '("1" "2")))
>     (message-self)))
>
> Behavior before commit a218c9861573b5ec4979ff2662f5c0343397e3ff
> ("lisp/emacs-lisp/pcase.el: Don't bind unused vars in branches"):
> outputs 1 to the minibuffer.
>
> Behavior after the commit: Symbol’s value as variable is void: self

I can reproduce the problem on the trunk here, too.  I've added Stefan M
to the CCs.

-- 
(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]