From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Mauricio Collares <mauricio@collares.org>
Cc: 46786@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>
Subject: bug#46786: 28.0.50; pcase-let does not bind variables used inside macro
Date: Mon, 01 Mar 2021 15:38:43 -0500 [thread overview]
Message-ID: <jwv35xepvi4.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <874khyjdxq.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 27 Feb 2021 06:08:01 +0100")
>> 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.
Indeed, this is a bug. I reverted the commit and installed some other
attempt at silencing the corresponding spurious warnings.
Can you confirm that this fixes the problem in your original code
(i.e. matrix-client.el, IIUC)?
Stefan
next prev parent reply other threads:[~2021-03-01 20:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-26 0:40 bug#46786: 28.0.50; pcase-let does not bind variables used inside macro Mauricio Collares
2021-02-27 5:08 ` Lars Ingebrigtsen
2021-03-01 20:38 ` Stefan Monnier [this message]
2021-03-09 22:30 ` Mauricio Collares
2021-03-09 23:57 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv35xepvi4.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=46786@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=mauricio@collares.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).