summaryrefslogtreecommitdiff
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2005-02-18 00:41:50 +0000
committerMiles Bader <miles@gnu.org>2005-02-18 00:41:50 +0000
commit8d46efcc0f2045a1e5a2739c55ba6a88fbf4bcfc (patch)
treebc968a02587d51199537bb335d5494e756e35fdf /lisp/replace.el
parent8589dc17f80450f5773a2d449fa6d94c9bb04fe3 (diff)
parent9b516537a9899900647d4eae5ec8778e6837ad3c (diff)
downloademacs-8d46efcc0f2045a1e5a2739c55ba6a88fbf4bcfc.tar.gz
emacs-8d46efcc0f2045a1e5a2739c55ba6a88fbf4bcfc.tar.bz2
emacs-8d46efcc0f2045a1e5a2739c55ba6a88fbf4bcfc.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-15
Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-95 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-96 Move Gnus images into etc/images * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-97 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-105 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-14 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-15 Update from CVS: lisp/imap.el (imap-log): Doc fix. * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-16 Merge from emacs--cvs-trunk--0
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el16
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index 42480b656d6..de3577913c1 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1435,7 +1435,8 @@ make, or the user didn't cancel the call."
query-replace-skip-read-only))
(unless (or literal noedit)
(replace-highlight (nth 0 real-match-data)
- (nth 1 real-match-data)))
+ (nth 1 real-match-data)
+ start end))
(setq noedit
(replace-match-maybe-edit
next-replacement nocasify literal
@@ -1451,7 +1452,8 @@ make, or the user didn't cancel the call."
;; `real-match-data'.
(while (not done)
(set-match-data real-match-data)
- (replace-highlight (match-beginning 0) (match-end 0))
+ (replace-highlight (match-beginning 0) (match-end 0)
+ start end)
;; Bind message-log-max so we don't fill up the message log
;; with a bunch of identical messages.
(let ((message-log-max nil))
@@ -1627,15 +1629,15 @@ make, or the user didn't cancel the call."
(defvar replace-overlay nil)
-(defun replace-highlight (beg end)
+(defun replace-highlight (match-beg match-end range-beg range-end)
(if query-replace-highlight
(if replace-overlay
- (move-overlay replace-overlay beg end (current-buffer))
- (setq replace-overlay (make-overlay beg end))
+ (move-overlay replace-overlay match-beg match-end (current-buffer))
+ (setq replace-overlay (make-overlay match-beg match-end))
(overlay-put replace-overlay 'priority 1) ;higher than lazy overlays
(overlay-put replace-overlay 'face 'query-replace)))
- (if query-replace-lazy-highlight
- (isearch-lazy-highlight-new-loop)))
+ (when query-replace-lazy-highlight
+ (isearch-lazy-highlight-new-loop range-beg range-end)))
(defun replace-dehighlight ()
(when replace-overlay