bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Stefan Kangas
Subject: bug#67611: [PATCH] Add a Pcase pattern `cl-lambda` equivalent to `cl-destructuring-bind`
Date: Sat, 13 Jan 2024 00:58:49 -0600

João Távora <joaotavora@gmail.com> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]