[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Default value of next-error-highlight is too small
From: |
Richard Stallman |
Subject: |
Re: Default value of next-error-highlight is too small |
Date: |
Mon, 18 Sep 2006 10:57:46 -0400 |
This should implement highlighting until next input event.
Does it work?
*** compile.el 15 Sep 2006 14:18:26 -0400 1.408
--- compile.el 17 Sep 2006 17:43:06 -0400
***************
*** 1784,1800 ****
(current-buffer)))
(move-overlay compilation-highlight-overlay
(point) end (current-buffer)))
! (if (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))))))
(when (and (eq next-error-highlight 'fringe-arrow))
(setq next-error-overlay-arrow-position
(copy-marker (line-beginning-position))))))
(defun compilation-find-file (marker filename directory &rest formats)
"Find a buffer for file FILENAME.
--- 1784,1814 ----
(current-buffer)))
(move-overlay compilation-highlight-overlay
(point) end (current-buffer)))
! (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
! '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.
- RE: Default value of next-error-highlight is too small, (continued)
- RE: Default value of next-error-highlight is too small, Drew Adams, 2006/09/16
- Re: Default value of next-error-highlight is too small, Eli Zaretskii, 2006/09/16
- RE: Default value of next-error-highlight is too small, Drew Adams, 2006/09/16
- Re: Default value of next-error-highlight is too small, Eli Zaretskii, 2006/09/16
- RE: Default value of next-error-highlight is too small, Drew Adams, 2006/09/17
- Re: Default value of next-error-highlight is too small, Eli Zaretskii, 2006/09/17
- RE: Default value of next-error-highlight is too small, Drew Adams, 2006/09/17
- Re: Default value of next-error-highlight is too small, Juri Linkov, 2006/09/17
- Re: Default value of next-error-highlight is too small, Richard Stallman, 2006/09/17
- RE: Default value of next-error-highlight is too small, Drew Adams, 2006/09/17
- Re: Default value of next-error-highlight is too small,
Richard Stallman <=
- RE: Default value of next-error-highlight is too small, Drew Adams, 2006/09/18
Re: Default value of next-error-highlight is too small, Richard Stallman, 2006/09/11