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

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

bug#52558: Option for easier typing of regexps


From: Eli Zaretskii
Subject: bug#52558: Option for easier typing of regexps
Date: Tue, 28 Dec 2021 22:21:02 +0200

> From: Juri Linkov <juri@linkov.net>
> Date: Tue, 28 Dec 2021 21:15:32 +0200
> Cc: 52558@debbugs.gnu.org
> 
> >> (setq replace-regexp-function
> >
> > And additional change is needed for correct highlighting:
> >
> > @@ -2690,7 +2693,8 @@ replace-highlight
> > +       (isearch-regexp-function (or replace-regexp-function
> 
> This is pushed to master, so now it's possible to provide a custom
> regexp converter for search and replace using isearch-regexp-function
> and replace-regexp-function.

Thanks, but the doc string of the new function is hard to understand:

> +(defvar replace-regexp-function nil
> +  "Function to convert a search string to a regexp to replace.
> +It's bound to `isearch-regexp-function' when searching
> +for a string to replace.")

The first sentence is unclear: what do you mean by "convert a search
string to a regexp to replace"?  What "search string" is being
converted to regexp, and how does "replace" enter this picture?

And this:

  It's bound to `isearch-regexp-function' when searching

seems to be incorrect: it's isearch-regexp-function that's bound to
replace-regexp-function, not the other way around.

Can you clarify the doc string, please?





reply via email to

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