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

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

bug#72328: [PATCH] Nested backquote in pcase


From: Michael Heerdegen
Subject: bug#72328: [PATCH] Nested backquote in pcase
Date: Mon, 29 Jul 2024 21:05:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Thuna <thuna.cing@gmail.com> writes:

> Your example would remain perfectly consistent under the new behavior.
> What *wouldn't*, however, is something like
>
> (let ((a 1) (b 2))
>  (pcase `(69 foo `(,bar ,,a ((,,b))))
>    (`(69 foo `(,bar ,,a ((,,b))))
>     (list a b))))
>
> Which currently errors on two counts: 1. ,,a in the pattern first
> expands the initial , as though it escape the backquote pattern (not the
> one before (,bar...) but the one before (69...))  and tries to match the
> object - which is (\, 1) - against the pattern ,a which is of course
> nonsense so the macroexpansion fails.  2. ,bar in the pattern tries to
> match the corresponding object - which is (\, bar) - against the pattern
> `bar' which binds the object - once again (\, bar) - to `bar'.

I see, thanks.  Yes, I misinterpreted what you wanted to do in your
patch.


> Do you disagree that the result of this form should also be (1 2)?

Maybe.  I have to think about it.


Michael.





reply via email to

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