Subject: bug#46786: closed (Re: bug#46786: 28.0.50; pcase-let does not bind variables used inside macro)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 09 Mar 2021 23:58:01 +0000

Your bug report

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

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
46786: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=46786
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#46786: 28.0.50; pcase-let does not bind variables used inside macro
From: Stefan Monnier <[email-masked]>
To: Mauricio Collares <[email-masked]>
Cc: [email-masked], Lars Ingebrigtsen <[email-masked]>
Date: Tue, 09 Mar 2021 18:57:11 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

> I've just received a report from a user that the fix worked great. Thank
> you very much!

Thanks for confirming, I'm glad you like it,

        Stefan

Subject: 28.0.50; pcase-let does not bind variables used inside macro
From: Mauricio Collares <[email-masked]>
To: [email-masked]
Date: Thu, 25 Feb 2021 21:40:54 -0300
List-Id: <debbugs-submit.debbugs.gnu.org>

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

Best,
Mauricio