]> git.eshelyaron.com Git - emacs.git/commitdiff
(compilation-goto-locus):
authorJuri Linkov <juri@jurta.org>
Tue, 29 Mar 2005 04:57:52 +0000 (04:57 +0000)
committerJuri Linkov <juri@jurta.org>
Tue, 29 Mar 2005 04:57:52 +0000 (04:57 +0000)
Use `next-error-highlight-timer' instead of `sit-for'.

lisp/ChangeLog
lisp/progmodes/compile.el

index 95ab41b8a862946bd7085cbe6ba8bc5305cee357..eea97f40a9503d6ddbdfba069c702dd5f2029aac 100644 (file)
@@ -1,3 +1,10 @@
+2005-03-29  Juri Linkov  <juri@jurta.org>
+
+       * simple.el (next-error-highlight-timer): New variable.
+
+       * progmodes/compile.el (compilation-goto-locus):
+       Use `next-error-highlight-timer' instead of `sit-for'.
+
 2005-03-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * mail/supercite.el (sc-mail-field): Use assoc-string.
index 457177d7c4c6d70de2e9fb3da4e24e3b11e4e7f3..bafc901d3d1ef406fc51af3bc9c87b3e81d5f9b4 100644 (file)
@@ -1613,6 +1613,8 @@ and overlay is highlighted between MK and END-MK."
     (compilation-set-window-height w)
 
     (when highlight-regexp
+      (if (timerp next-error-highlight-timer)
+         (cancel-timer next-error-highlight-timer))
       (unless compilation-highlight-overlay
        (setq compilation-highlight-overlay
              (make-overlay (point-min) (point-min)))
@@ -1632,8 +1634,11 @@ and overlay is highlighted between MK and END-MK."
              (move-overlay compilation-highlight-overlay
                            (point) end (current-buffer)))
            (if (numberp next-error-highlight)
-               (sit-for next-error-highlight))
-           (if (not (eq next-error-highlight t))
+               (setq next-error-highlight-timer
+                     (run-at-time next-error-highlight nil 'delete-overlay
+                                  compilation-highlight-overlay)))
+           (if (not (or (eq next-error-highlight t)
+                        (numberp next-error-highlight)))
                (delete-overlay compilation-highlight-overlay))))))
     (when (and (eq next-error-highlight 'fringe-arrow))
       (set (make-local-variable 'overlay-arrow-position)