all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: michael_heerdegen@web.de, monnier@iro.umontreal.ca,
	thuna.cing@gmail.com, 72328@debbugs.gnu.org
Subject: bug#72328: [PATCH] Nested backquote in pcase
Date: Sat, 07 Sep 2024 10:18:26 +0300	[thread overview]
Message-ID: <86o750ylrx.fsf@gnu.org> (raw)
In-Reply-To: <86ed6fox6h.fsf@gnu.org> (message from Eli Zaretskii on Fri, 23 Aug 2024 22:29:10 +0300)

Ping!  Stefan, should I install this in your name?

> Cc: michael_heerdegen@web.de, thuna.cing@gmail.com, 72328@debbugs.gnu.org
> Date: Fri, 23 Aug 2024 22:29:10 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > From: Stefan Monnier <monnier@iro.umontreal.ca>
> > Cc: michael_heerdegen@web.de,  thuna.cing@gmail.com,  72328@debbugs.gnu.org
> > Date: Fri, 23 Aug 2024 15:11:04 -0400
> > 
> > >> > Would be good to hear from Stefan
> > >> The first step is to declare nested backquotes unsupported and add
> > >> a warning when we encounter them.
> > > Where and how would you suggest to do that?
> > 
> > Somethink like...
> > 
> > 
> >         Stefan
> > 
> > 
> > diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
> > index fd6b0c8db5c..fe62820f0cb 100644
> > --- a/lisp/emacs-lisp/pcase.el
> > +++ b/lisp/emacs-lisp/pcase.el
> > @@ -1172,7 +1172,10 @@ pcase--expand-\`
> >            (upatd (pcase--expand-\` (cdr qpat))))
> >        (if (and (eq (car-safe upata) 'quote) (eq (car-safe upatd) 'quote))
> >            `'(,(cadr upata) . ,(cadr upatd))
> > -        `(and (pred consp)
> > +        `(and ,@(when (eq (car qpat) '\`)
> > +                  `((guard ,(macroexp-warn-and-return
> > +                             "Nested ` are not supported" t nil nil qpat))))
> > +              (pred consp)
> >                (app car-safe ,upata)
> >                (app cdr-safe ,upatd)))))
> >     ((or (stringp qpat) (numberp qpat) (symbolp qpat)) `',qpat)
> 
> Feel free to install on master, and thanks.
> 
> 
> 
> 





  reply	other threads:[~2024-09-07  7:18 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-28  0:40 bug#72328: [PATCH] Nested backquote in pcase Thuna
2024-07-28 14:52 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-28 15:51   ` Thuna
2024-07-28 16:02     ` Eli Zaretskii
2024-07-28 16:20       ` Thuna
2024-07-29 16:03     ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-29 16:45       ` Eli Zaretskii
2024-07-30  7:45         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-03  0:07           ` Thuna
2024-08-03  5:59             ` Eli Zaretskii
2024-08-03 13:22               ` Thuna
2024-08-04 17:10                 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-04 21:27                   ` Thuna
2024-08-05 11:52                     ` Eli Zaretskii
2024-08-05 19:32                       ` Thuna
2024-08-06  8:21                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-06 11:13                         ` Eli Zaretskii
2024-08-06 13:09                           ` Thuna
2024-08-07  3:33                             ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-07 11:53                               ` Eli Zaretskii
2024-08-07 17:34                               ` Thuna
2024-08-08  5:57                                 ` Eli Zaretskii
2024-08-23  3:25                                   ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-23 14:49                                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-23 16:04                                       ` Eli Zaretskii
2024-08-23 19:11                                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-23 19:29                                           ` Eli Zaretskii
2024-09-07  7:18                                             ` Eli Zaretskii [this message]
2024-09-07 12:24                                               ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-23 20:19                                         ` Thuna
2024-07-29 17:43       ` Thuna
2024-07-29 19:05         ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-29 20:45         ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-29 20:59           ` Thuna
2024-07-30 17:53             ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors

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

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

  git send-email \
    --in-reply-to=86o750ylrx.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=72328@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=monnier@iro.umontreal.ca \
    --cc=thuna.cing@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.