GNU bug report logs - #67611
[PATCH] Add a Pcase pattern `cl-lambda` equivalent to `cl-destructuring-bind`

Previous Next

Package: emacs;

Reported by: Okamsn <okamsn <at> protonmail.com>

Date: Sun, 3 Dec 2023 20:35:01 UTC

Severity: wishlist

Tags: patch

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #61 received at 67611 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: João Távora <joaotavora <at> gmail.com>, 
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Okamsn <okamsn <at> protonmail.com>, 67611 <at> debbugs.gnu.org
Subject: Re: 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 <at> 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.




This bug report was last modified 147 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.