[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/compile.el,v
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/compile.el,v |
Date: |
Sun, 24 Sep 2006 20:42:08 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Richard M. Stallman <rms> 06/09/24 20:42:08
Index: compile.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/compile.el,v
retrieving revision 1.408
retrieving revision 1.409
diff -u -b -r1.408 -r1.409
--- compile.el 15 Sep 2006 15:37:36 -0000 1.408
+++ compile.el 24 Sep 2006 20:42:08 -0000 1.409
@@ -1784,17 +1784,31 @@
(current-buffer)))
(move-overlay compilation-highlight-overlay
(point) end (current-buffer)))
- (if (numberp next-error-highlight)
+ (if (or (eq next-error-highlight t)
+ (numberp next-error-highlight))
+ ;; We want highlighting: delete overlay on next input.
+ (add-hook 'pre-command-hook
+ 'compilation-goto-locus-delete-o)
+ ;; We don't want highlighting: delete overlay now.
+ (delete-overlay compilation-highlight-overlay))
+ ;; We want highlighting for a limited time:
+ ;; set up a timer to delete it.
+ (when (numberp next-error-highlight)
(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))))))
+ (run-at-time next-error-highlight nil
+ 'compilation-goto-locus-delete-o)))))))
(when (and (eq next-error-highlight 'fringe-arrow))
+ ;; We want a fringe arrow (instead of highlighting).
(setq next-error-overlay-arrow-position
(copy-marker (line-beginning-position))))))
+(defun compilation-goto-locus-delete-o ()
+ (delete-overlay compilation-highlight-overlay)
+ ;; Get rid of timer and hook that would try to do this again.
+ (if (timerp next-error-highlight-timer)
+ (cancel-timer next-error-highlight-timer))
+ (remove-hook 'pre-command-hook
+ 'compilation-goto-locus-delete-o))
(defun compilation-find-file (marker filename directory &rest formats)
"Find a buffer for file FILENAME.
- [Emacs-diffs] Changes to emacs/lisp/progmodes/compile.el,v, Chong Yidong, 2006/09/05
- [Emacs-diffs] Changes to emacs/lisp/progmodes/compile.el,v, Nick Roberts, 2006/09/12
- [Emacs-diffs] Changes to emacs/lisp/progmodes/compile.el,v, Paul Eggert, 2006/09/12
- [Emacs-diffs] Changes to emacs/lisp/progmodes/compile.el,v, Chong Yidong, 2006/09/15
- [Emacs-diffs] Changes to emacs/lisp/progmodes/compile.el,v,
Richard M. Stallman <=