From 704d3ae7ac91f1105e5973081a6a06bce71a17c9 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Fri, 9 Dec 2005 09:45:06 +0000 Subject: [PATCH] (isearch-highlight): Change main overlay priority from 1 to 1001. Simplify. (isearch-lazy-highlight-update): Change lazy overlay priority from 0 to 1000. --- lisp/isearch.el | 24 ++++++++++++------------ 1 file 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)) -- 2.39.5