unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46786: 28.0.50; pcase-let does not bind variables used inside macro
@ 2021-02-26  0:40 Mauricio Collares
  2021-02-27  5:08 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Mauricio Collares @ 2021-02-26  0:40 UTC (permalink / raw)
  To: 46786

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-09 23:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-03-09 22:30     ` Mauricio Collares
2021-03-09 23:57       ` Stefan Monnier

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).