emacs-devel
[Top][All Lists]
Advanced

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

Re: Improve `replace-regexp-in-string' ergonomics?


From: Stefan Monnier
Subject: Re: Improve `replace-regexp-in-string' ergonomics?
Date: Tue, 12 Oct 2021 08:34:57 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> But the reason I haven't started working on this yet is that I don't see
> a way past the limit we have on nine back references, and it wouldn't be
> cool to have such an arbitrary limit here.

Basically (like in `syntax-propertize-rules`) you need to disallow backrefs.
The upside is that it gives the warm&fuzzy feeling that we could speed
it up with a DFA implementation ;-)

BTW, the current limit on backrefs is just due to a lack of syntax for
higher-numbered backrefs, so it would be easy to lift this limit: it's
a small matter of choosing an appropriate syntax and then adjusting the
code that parses the regexps in regexp.c.


        Stefan




reply via email to

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