1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 03:40:56 -08:00

(compilation-goto-locus): Use next-error' face instead of region'.

Set 4-th argument of `move-overlay' to `current-buffer' to move overlay
to different source buffers.  Use new variable `next-error-highlight'.
This commit is contained in:
Juri Linkov 2004-09-01 18:44:35 +00:00
parent ee9c5954f0
commit 2beb6aa0e0

View file

@ -1564,7 +1564,7 @@ All arguments are markers. If END-MK is non nil, mark is set there."
(unless compilation-highlight-overlay (unless compilation-highlight-overlay
(setq compilation-highlight-overlay (setq compilation-highlight-overlay
(make-overlay (point-min) (point-min))) (make-overlay (point-min) (point-min)))
(overlay-put compilation-highlight-overlay 'face 'region)) (overlay-put compilation-highlight-overlay 'face 'next-error))
(with-current-buffer (marker-buffer mk) (with-current-buffer (marker-buffer mk)
(save-excursion (save-excursion
(end-of-line) (end-of-line)
@ -1574,11 +1574,18 @@ All arguments are markers. If END-MK is non nil, mark is set there."
(re-search-forward highlight-regexp end t)) (re-search-forward highlight-regexp end t))
(progn (progn
(goto-char (match-beginning 0)) (goto-char (match-beginning 0))
(move-overlay compilation-highlight-overlay (match-beginning 0) (match-end 0))) (move-overlay compilation-highlight-overlay
(move-overlay compilation-highlight-overlay (point) end)) (match-beginning 0) (match-end 0)
(sit-for 0.5) (current-buffer)))
(delete-overlay compilation-highlight-overlay))))))) (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))
(delete-overlay compilation-highlight-overlay))))))
(when (and (eq next-error-highlight 'fringe-arrow))
(set (make-local-variable 'overlay-arrow-position)
(copy-marker (line-beginning-position))))))
(defun compilation-find-file (marker filename dir &rest formats) (defun compilation-find-file (marker filename dir &rest formats)
"Find a buffer for file FILENAME. "Find a buffer for file FILENAME.