changeset 67427:055cc88a4fd0

(ispell-highlight-spelling-error-overlay): Change overlay priority from 1 to 1001. Reuse existing overlay.
author Juri Linkov <juri@jurta.org>
date Fri, 09 Dec 2005 09:47:30 +0000
parents eac49762e6b9
children 9e33a6897729
files lisp/textmodes/ispell.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/ispell.el	Fri Dec 09 09:46:16 2005 +0000
+++ b/lisp/textmodes/ispell.el	Fri Dec 09 09:47:30 2005 +0000
@@ -2307,11 +2307,13 @@
 
 The variable `ispell-highlight-face' selects the face to use for highlighting."
   (if highlight
-      (progn
+      (if ispell-overlay
+	  (move-overlay ispell-overlay start end (current-buffer))
 	(setq ispell-overlay (make-overlay start end))
-	(overlay-put ispell-overlay 'priority 1) ;higher than lazy overlays
+	(overlay-put ispell-overlay 'priority 1001) ;higher than lazy overlays
 	(overlay-put ispell-overlay 'face ispell-highlight-face))
-    (delete-overlay ispell-overlay))
+    (if ispell-overlay
+	(delete-overlay ispell-overlay)))
   (if (and ispell-lazy-highlight (boundp 'lazy-highlight-cleanup))
       (if highlight
 	  (let ((isearch-string