Subject: bug#50136: 28.0.50; A problem with rx-let expansion

From: Michael Heerdegen <[email-masked]>
Date: Fri, 20 Aug 2021 19:21:20 +0200

Mattias Engdegård <[email-masked]> writes:

> > AFAIU, the current approach doesn't allow to extend this with an
> > optional CHARS argument to specify with chars are allowed "in between"
> > (instead of "any").  The "&optional" keyword makes it barf.
>
> That's right. What would be the preferred semantics? For example, what
> value would you expect an absent optional parameter to take?

I guess it's not very useful for the current mechanism.  With a
macro-like thing, the expansion would just not use the value if it's nil.  The
expander would check whether the argument was provided.

> Actually it's the rx `eval` form that you are looking for if you want
> arbitrary compile-time computation. `regexp` and `literal` are
> explicitly made for run-time expressions.

Yes, I think you are right.

Michael.