[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR)))
From: |
Stefan Monnier |
Subject: |
bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR))) |
Date: |
Sun, 16 Jun 2019 08:35:01 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> I'm not sure that it is, e.g., python-rx might bind it too (if it
> weren't for the fact that python.el needs to maintain backwards
> compatibility with older Emacs).
I think that would still be "python-rx using internals of rx".
And that could be fixed if we can rewrite it with rx-macrolet, right?
> regexp does exactly what it did before, i.e., it accepts only a constant
> string. Likewise regexp-quote accepts only a constant string, which
> makes it pointless to use in rx-to-string (just use a plain STRING
> directly), but I didn't disallow it.
Good, thanks.
>>> - 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.
> Oh, hmm. That might be a reason to keep using `eval'.
It could make people reluctant to change, yes, but that still wouldn't
be a valid reason in my book.
>> FWIW, I have the impression that in most cases where this could be
>> useful, a better solution would be to provide something like
>> `rx-defmacro` and/or `rx-macrolet`.
> I guess that could replace the "old crusty" rx-constituents thing too.
That's the idea, yes.
Stefan
- bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR))), Noam Postavsky, 2019/06/15
- bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR))), Michael Heerdegen, 2019/06/15
- bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR))), Mattias Engdegård, 2019/06/16
- bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR))), Stefan Monnier, 2019/06/16
- bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR))), Noam Postavsky, 2019/06/16
- bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR))),
Stefan Monnier <=
- bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR))), Noam Postavsky, 2019/06/16
- bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR))), Stefan Monnier, 2019/06/16
- bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR))), Drew Adams, 2019/06/16
- bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR))), Mattias Engdegård, 2019/06/16
- bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR))), Drew Adams, 2019/06/16
- bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR))), Juri Linkov, 2019/06/17
- bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR))), Mattias Engdegård, 2019/06/18
- bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR))), Noam Postavsky, 2019/06/18
- bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR))), Mattias Engdegård, 2019/06/19
- bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR))), Noam Postavsky, 2019/06/19