# HG changeset patch # User Juri Linkov # Date 1112072204 0 # Node ID e779ff0ee1924ab8945afc455e55b67f555f0c99 # Parent ed6d9a5fc534c7c8ac8498bd6253b04d511331d1 (compilation-goto-locus): Use `next-error-highlight-timer' instead of `sit-for'. diff -r ed6d9a5fc534 -r e779ff0ee192 lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Tue Mar 29 04:55:43 2005 +0000 +++ b/lisp/progmodes/compile.el Tue Mar 29 04:56:44 2005 +0000 @@ -1613,6 +1613,8 @@ (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 @@ (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)