emacs-diffs
[Top][All Lists]
Advanced

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

master 619d5af54a: * lisp/replace.el (replace-highlight): Optimize for l


From: Juri Linkov
Subject: master 619d5af54a: * lisp/replace.el (replace-highlight): Optimize for large buffers (bug#56815)
Date: Tue, 9 Aug 2022 14:54:58 -0400 (EDT)

branch: master
commit 619d5af54ab1eb4d8f8e5971de65c8baf63f4732
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    * lisp/replace.el (replace-highlight): Optimize for large buffers 
(bug#56815)
    
    Let-bind isearch-lazy-count and lazy-highlight-buffer to nil to avoid
    revisiting all matches in the whole buffer after every replacement.
---
 lisp/replace.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/replace.el b/lisp/replace.el
index cac0edf43a..ae5c804be5 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -2744,7 +2744,9 @@ to a regexp that is actually used for the search.")
            (isearch-case-fold-search case-fold)
            (isearch-forward (not backward))
            (isearch-other-end match-beg)
-           (isearch-error nil))
+           (isearch-error nil)
+           (isearch-lazy-count nil)
+           (lazy-highlight-buffer nil))
        (isearch-lazy-highlight-new-loop range-beg range-end))))
 
 (defun replace-dehighlight ()



reply via email to

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