aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorKaroly Lorentey2005-02-19 00:06:48 +0000
committerKaroly Lorentey2005-02-19 00:06:48 +0000
commit60c73d2ed638e5d51643c65a0fc6dea618fc72c8 (patch)
tree3d9e0adc703f9cfd5df162c66ac15999c4106738 /lisp/replace.el
parentc20213c90736fc9c2a6eca2ca44d6e200dbf5efe (diff)
parent8a59305430c68ee23d3cc7ab7487ab3acebdbe7f (diff)
downloademacs-60c73d2ed638e5d51643c65a0fc6dea618fc72c8.tar.gz
emacs-60c73d2ed638e5d51643c65a0fc6dea618fc72c8.zip
Merged from miles@gnu.org--gnu-2005 (patch 14-16, 95-106)
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 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-98 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-99 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-100 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-101 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-102 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-103 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-104 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-105 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-106 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 git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-295
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."
1435 query-replace-skip-read-only)) 1435 query-replace-skip-read-only))
1436 (unless (or literal noedit) 1436 (unless (or literal noedit)
1437 (replace-highlight (nth 0 real-match-data) 1437 (replace-highlight (nth 0 real-match-data)
1438 (nth 1 real-match-data))) 1438 (nth 1 real-match-data)
1439 start end))
1439 (setq noedit 1440 (setq noedit
1440 (replace-match-maybe-edit 1441 (replace-match-maybe-edit
1441 next-replacement nocasify literal 1442 next-replacement nocasify literal
@@ -1451,7 +1452,8 @@ make, or the user didn't cancel the call."
1451 ;; `real-match-data'. 1452 ;; `real-match-data'.
1452 (while (not done) 1453 (while (not done)
1453 (set-match-data real-match-data) 1454 (set-match-data real-match-data)
1454 (replace-highlight (match-beginning 0) (match-end 0)) 1455 (replace-highlight (match-beginning 0) (match-end 0)
1456 start end)
1455 ;; Bind message-log-max so we don't fill up the message log 1457 ;; Bind message-log-max so we don't fill up the message log
1456 ;; with a bunch of identical messages. 1458 ;; with a bunch of identical messages.
1457 (let ((message-log-max nil)) 1459 (let ((message-log-max nil))
@@ -1627,15 +1629,15 @@ make, or the user didn't cancel the call."
1627 1629
1628(defvar replace-overlay nil) 1630(defvar replace-overlay nil)
1629 1631
1630(defun replace-highlight (beg end) 1632(defun replace-highlight (match-beg match-end range-beg range-end)
1631 (if query-replace-highlight 1633 (if query-replace-highlight
1632 (if replace-overlay 1634 (if replace-overlay
1633 (move-overlay replace-overlay beg end (current-buffer)) 1635 (move-overlay replace-overlay match-beg match-end (current-buffer))
1634 (setq replace-overlay (make-overlay beg end)) 1636 (setq replace-overlay (make-overlay match-beg match-end))
1635 (overlay-put replace-overlay 'priority 1) ;higher than lazy overlays 1637 (overlay-put replace-overlay 'priority 1) ;higher than lazy overlays
1636 (overlay-put replace-overlay 'face 'query-replace))) 1638 (overlay-put replace-overlay 'face 'query-replace)))
1637 (if query-replace-lazy-highlight 1639 (when query-replace-lazy-highlight
1638 (isearch-lazy-highlight-new-loop))) 1640 (isearch-lazy-highlight-new-loop range-beg range-end)))
1639 1641
1640(defun replace-dehighlight () 1642(defun replace-dehighlight ()
1641 (when replace-overlay 1643 (when replace-overlay