unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#70597: Problem in pcase-let?
@ 2024-04-26 18:00 Marco Antoniotti
  2024-04-27 16:11 ` Bruno Barbier
  0 siblings, 1 reply; 18+ messages in thread
From: Marco Antoniotti @ 2024-04-26 18:00 UTC (permalink / raw)
  To: 70597

[-- Attachment #1: Type: text/plain, Size: 846 bytes --]

Hi

This is for GNU Emacs 29.2 (build 2, x86_64-w64-mingw32) of 2024-02-01
running on Windows 11.

I just noticed the following with pcase-let and pcase.  I believe this is a
problem with pcase-let.  The following is a IELM transcript.  The second
plet-case should, IMHO, fail.

ELISP> (pcase-let ((`(let ,bs (*when *,c . ,r)) '(let ((foo 42)) (*when *1
2 3))))
         (list 'bs bs 'c c 'r r))
(bs
 ((foo 42))
 c 1 r
 (2 3))

ELISP> (pcase-let ((`(let ,bs (*when *,c . ,r)) '(let ((foo 42)) (*zot *1 2
3))))
         (list 'bs bs 'c c 'r r))
(bs
 ((foo 42))
 c 1 r
 (2 3))

ELISP> (pcase '(let ((foo 42)) (*when *1 2 3))
         (`(let ,bs (*zot *,c . ,r)) (list 'bs bs 'c c 'r r)))
nil

pcase correctly fails to match *when *and *zot*, while pcase-let seems to
happily go ahead.

All the best

-- 
Marco Antoniotti
Somewhere over the Rainbow

[-- Attachment #2: Type: text/html, Size: 1819 bytes --]

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

end of thread, other threads:[~2024-05-05  8:49 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-26 18:00 bug#70597: Problem in pcase-let? Marco Antoniotti
2024-04-27 16:11 ` Bruno Barbier
2024-04-27 22:28   ` Marco Antoniotti
2024-04-28 10:01     ` Bruno Barbier
2024-04-28 10:07       ` Ihor Radchenko
2024-04-28 10:18         ` Eli Zaretskii
2024-04-28 15:22     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-28 15:38       ` Marco Antoniotti
2024-04-28 17:05         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-28 18:22           ` Marco Antoniotti
2024-04-28 21:08             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-02  9:23               ` Eli Zaretskii
2024-05-02 11:06                 ` Marco Antoniotti
2024-05-04 11:35                   ` Eli Zaretskii
2024-05-04 12:06                     ` Marco Antoniotti
2024-05-04 15:05                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-05  8:49                         ` Marco Antoniotti
2024-05-04 15:23               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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