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

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

bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR)))


From: Mattias Engdegård
Subject: bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR)))
Date: Sun, 16 Jun 2019 12:03:53 +0200

Thank you! Definitely agree with the need for something like this, although I 
haven't read the patch in detail yet.
Some notes:

- A more suitable name is needed; `regexp-quote' makes no sense at all in the 
context of rx. What about `literal'? For simplicity, I'm proceeding with that 
name below.

- The docs probably need to be explicit about the differences between `literal' 
and `eval' w.r.t. evaluation time and environment.

- What is now the correct way of including a compile-time regexp expression, 
such as a defconst? (regexp (eval-when-compile EXPR))? Still a mouthful, but 
perhaps outside the scope of this bug.

- Thanks for mentioning bug#14769; I'll give it a go.

- I like rx a lot and use it extensively, but the implementation... could be 
improved (as you no doubt noticed). And so I have: I'm sitting on a full 
rewrite, code-named `ry'. It's shorter, much cleaner, and about twice as fast 
(usually more). The only thing still missing is compatibility with the old 
crusty `rx-constituents' extension mechanism.

The plan was to replace rx with ry entirely when complete. I'll see what it 
would take to add `literal'.






reply via email to

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