Subject: bug#67611: [PATCH] Add a Pcase pattern `cl-lambda` equivalent to `cl-destructuring-bind`

From: Stefan Kangas <[email-masked]>
Date: Sat, 13 Jan 2024 00:58:49 -0600

João Távora <[email-masked]> writes:

> Pcase is complicated and hard-to-follow yes.  Becasue complex pattern
> matching is a complicated thing to express, just as regular expressions
> are such a thing

Pretty much, yes.  We could improve its documentation though.

We could add a tutorial to the ELisp manual, for example (probably not
included in the printed version).

> If you ask me, we'd be better off designing an "explain pcase"
> utility or designing font-lock rules that helps explain it.
>
> The byte-compiler  is already traversing that anyway and flagging
> unused variables and stuff.  Can't we use this to mark what is a
> lexical variable and what is a literal symbol, for example?  Can't
> we have a very clear highlighting of the pcase extension being
> used, like highlighting the '`' or the 'cl-arglist' or the 'seq'.

That would be very useful to explore, I think.