Subject: Re: bug#70597: Problem in pcase-let?

From: Marco Antoniotti <[email-masked]>
Date: Sat, 4 May 2024 14:06:45 +0200

Hi

sorry, but I do not think that the current doc string and/or the manual
explains the situation.

And it looks like this is a recurring misunderstanding by the users.

Just adding the example would clarify things.

All the best

MA

On Sat, May 4, 2024 at 1:35 PM Eli Zaretskii <[email-masked]> wrote:

> > From: Marco Antoniotti <[email-masked]>
> > Date: Thu, 2 May 2024 13:06:58 +0200
> > Cc: Stefan Monnier <[email-masked]>, [email-masked],
> [email-masked]
> >
> > it's your call.  But please change the doc string to clarify that
> pcase-let does not do "symbol equality" pattern
> > matching, but only structural matching.  Adding an example like the
> following will help.
> >
> > (pcase-let ((`(foo ,x 23 ,y) '(bar 11 baz 22))) (list x y))
>
> This is already explained in the ELisp manual, and the doc string
> already says
>
>   Each EXP should match its respective PATTERN (i.e. be of structure
>   compatible to PATTERN)
>
> So I don't think we need to do anything else here, and I'm closing
> this bug.
>

-- 
Marco Antoniotti
Somewhere over the Rainbow