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

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

bug#54017: add regexp translation option to read-regexp


From: emacsq
Subject: bug#54017: add regexp translation option to read-regexp
Date: Thu, 17 Feb 2022 10:55:22 +0000

> a pair of two translation functions should be provided:
> one to translate a custom regexp syntax to the default regexp syntax
>(to be used on the return value of read-regexp), and another translation
> from the default regexp syntax to the custom regexp syntax (to be used
> to translate the default regexp value added to the minibuffer)?

The purpose of regexp translation is that all user facing regexps by
read-regexp should use the translated format, so if there is a need
for a function which converts to the convenient format then the
user should provide that as well. Maybe there should be one function only
with  an argument specifying the direction of the translation.

BTW, ideally the variables you mentioned ('search-default-mode' and
'replace-regexp-function') should be merged with this option, because
it's unlikely the user wants one regexp syntax for one command and a
different syntax for an other one, so there should be a single
translation function which works everywhere where user facing
regexps occur.






reply via email to

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