unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 72754@debbugs.gnu.org
Subject: bug#72754: 31.0.50; Add a pcase-pattern-let?
Date: Sat, 24 Aug 2024 07:56:44 +0200	[thread overview]
Message-ID: <87ed6ev4yr.fsf@web.de> (raw)
In-Reply-To: <jwvwmk8hei1.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 22 Aug 2024 09:38:04 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> > wouldn't it be a significant improvement and maybe a low hanging fruit
> > to add a macro allowing to add local pattern definitions?  I.e., like
> > `macrolet' by for pcase patterns?
>
> I don't know how important/useful it would be, but yes it would make
> a lot of sense.  As a matter of fact, it's a general pattern which
> recurs in all the packages which provide an extensible domain specific
> language (peg.el, pcase.el, bindat.el, rx.el, gv.el, ...) and I'd like
> to find a general solution.

Makes sense, we could then also implement the dynamical docstring
generation for all of these in a general way.  As whole it's a bigger
project, though.

> It can also make sense to allow defining a set of extensions at one
> place, and then make them available locally.

Absolutely.

If you want to give it a try, I'm here...


Michael.





      reply	other threads:[~2024-08-24  5:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22  2:02 bug#72754: 31.0.50; Add a pcase-pattern-let? Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-22 13:38 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-24  5:56   ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ed6ev4yr.fsf@web.de \
    --to=bug-gnu-emacs@gnu.org \
    --cc=72754@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).