summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2005-03-29 04:56:44 +0000
committerJuri Linkov <juri@jurta.org>2005-03-29 04:56:44 +0000
commit17ab48a6e21a11ef39005759c02fa2854ee73eee (patch)
tree9490a5997af640618d0dbe48f9b573d3b280e32a
parentf144a1f46a3a54df22dfcd7366ffa6ecd5c50e3c (diff)
downloademacs-17ab48a6e21a11ef39005759c02fa2854ee73eee.tar.gz
(compilation-goto-locus):
Use `next-error-highlight-timer' instead of `sit-for'.
-rw-r--r--lisp/progmodes/compile.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 457177d7c4c..bafc901d3d1 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -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)