From ab1bdce51e336b4433dbbc0949b4dc02773831de Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Fri, 31 May 2013 02:29:42 +0300 Subject: [PATCH] * lisp/replace.el (perform-replace): Avoid `isearch-range-invisible' call when `query-flag' is nil and `search-invisible' is non-nil. Fixes: debbugs:11746 --- lisp/ChangeLog | 6 ++++++ lisp/replace.el | 3 +++ 2 files changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 33f0f787d74..e7532cdbd07 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-05-30 Juri Linkov + + * replace.el (perform-replace): Avoid `isearch-range-invisible' + call when `query-flag' is nil and `search-invisible' is non-nil. + (Bug#11746) + 2013-05-30 Glenn Morris * progmodes/cc-bytecomp.el (cc-bytecomp-noruntime-functions): New. diff --git a/lisp/replace.el b/lisp/replace.el index 15d5f2694a8..af05bd11fb2 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -2093,6 +2093,9 @@ make, or the user didn't cancel the call." (setq skip-filtered-count (1+ skip-filtered-count))) ;; Optionally ignore invisible matches. ((not (or (eq search-invisible t) + ;; Don't open overlays for automatic replacements. + (and (not query-flag) search-invisible) + ;; Open hidden overlays for interactive replacements. (not (isearch-range-invisible (nth 0 real-match-data) (nth 1 real-match-data))))) (setq skip-invisible-count (1+ skip-invisible-count))) -- 2.39.2