summaryrefslogtreecommitdiff
path: root/lisp/isearch.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2005-12-09 09:45:06 +0000
committerJuri Linkov <juri@jurta.org>2005-12-09 09:45:06 +0000
commit704d3ae7ac91f1105e5973081a6a06bce71a17c9 (patch)
tree6600216d901506ff19f6ade1338b904e79ae7bc9 /lisp/isearch.el
parent9cf328cc65acd9515b088173f93a12edf88dae63 (diff)
downloademacs-704d3ae7ac91f1105e5973081a6a06bce71a17c9.tar.gz
(isearch-highlight): Change main overlay priority from 1 to 1001. Simplify.
(isearch-lazy-highlight-update): Change lazy overlay priority from 0 to 1000.
Diffstat (limited to 'lisp/isearch.el')
-rw-r--r--lisp/isearch.el24
1 files changed, 12 insertions, 12 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 505ff40e6b5..fe764b3d41d 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2235,17 +2235,15 @@ since they have special meaning in a regexp."
(defvar isearch-overlay nil)
(defun isearch-highlight (beg end)
- (unless (null search-highlight)
- (cond (isearch-overlay
- ;; Overlay already exists, just move it.
- (move-overlay isearch-overlay beg end (current-buffer)))
-
- (t
- ;; Overlay doesn't exist, create it.
- (setq isearch-overlay (make-overlay beg end))
- (overlay-put isearch-overlay 'face isearch)
- (overlay-put isearch-overlay 'priority 1) ;higher than lazy overlays
- ))))
+ (if search-highlight
+ (if isearch-overlay
+ ;; Overlay already exists, just move it.
+ (move-overlay isearch-overlay beg end (current-buffer))
+ ;; Overlay doesn't exist, create it.
+ (setq isearch-overlay (make-overlay beg end))
+ ;; 1001 is higher than lazy's 1000 and ediff's 100+
+ (overlay-put isearch-overlay 'priority 1001)
+ (overlay-put isearch-overlay 'face isearch))))
(defun isearch-dehighlight ()
(when isearch-overlay
@@ -2409,8 +2407,10 @@ Attempt to do the search exactly the way the pending isearch would."
;; non-zero-length match
(let ((ov (make-overlay mb me)))
(push ov isearch-lazy-highlight-overlays)
+ ;; 1000 is higher than ediff's 100+,
+ ;; but lower than isearch main overlay's 1001
+ (overlay-put ov 'priority 1000)
(overlay-put ov 'face lazy-highlight-face)
- (overlay-put ov 'priority 0) ;lower than main overlay
(overlay-put ov 'window (selected-window))))
(if isearch-forward
(setq isearch-lazy-highlight-end (point))