GNU bug report logs - #46786
28.0.50; pcase-let does not bind variables used inside macro

Previous Next

Package: emacs;

Reported by: Mauricio Collares <mauricio <at> collares.org>

Date: Fri, 26 Feb 2021 00:42:02 UTC

Severity: normal

Found in version 28.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#46786: closed (28.0.50; pcase-let does not bind variables
 used inside macro)
Date: Tue, 09 Mar 2021 23:58:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 09 Mar 2021 18:57:11 -0500
with message-id <jwvim5zx4n5.fsf-monnier+emacs <at> gnu.org>
and subject line Re: bug#46786: 28.0.50; pcase-let does not bind variables used inside macro
has caused the debbugs.gnu.org bug report #46786,
regarding 28.0.50; pcase-let does not bind variables used inside macro
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
46786: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=46786
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Mauricio Collares <mauricio <at> collares.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; pcase-let does not bind variables used inside macro
Date: Thu, 25 Feb 2021 21:40:54 -0300
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


[Message part 3 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Mauricio Collares <mauricio <at> collares.org>
Cc: 46786-done <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#46786: 28.0.50; pcase-let does not bind variables used
 inside macro
Date: Tue, 09 Mar 2021 18:57:11 -0500
> 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



This bug report was last modified 4 years and 130 days ago.

Previous Next


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