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: Lars Ingebrigtsen
Subject: bug#52558: Option for easier typing of regexps
Date: Sat, 22 Jan 2022 15:23:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Juri Linkov <juri@linkov.net> writes:

>> If you want to use M-x query-replace directly,
>> then simpler would be add replace-regexp-function
>> that you can use with:
>>
>> (setq replace-regexp-function
>
> And additional change is needed for correct highlighting:
>
> diff --git a/lisp/replace.el b/lisp/replace.el
> index 0e81b15a09..4302868520 100644
> --- a/lisp/replace.el
> +++ b/lisp/replace.el
> @@ -2690,7 +2693,8 @@ replace-highlight
>    (if query-replace-lazy-highlight
>        (let ((isearch-string search-string)
>           (isearch-regexp regexp-flag)
> -         (isearch-regexp-function (or delimited-flag
> +         (isearch-regexp-function (or replace-regexp-function
> +                                         delimited-flag
>                                        (and replace-char-fold

Re-skimming this thread, I think these extensions make sense, so perhaps
you should just push them?  (With a NEWS item, I guess.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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