diff options
author | Juri Linkov <juri@jurta.org> | 2004-09-01 18:44:35 +0000 |
---|---|---|
committer | Juri Linkov <juri@jurta.org> | 2004-09-01 18:44:35 +0000 |
commit | 1fd6cdfce22d46e37c2f48272ebfdaecc67ff435 (patch) | |
tree | af210d62dd21b7f1ea49be4b0a89f1ba667ad4f5 /lisp | |
parent | ebc6d36d3d25045addf6f3e821de645a6566120c (diff) | |
download | emacs-1fd6cdfce22d46e37c2f48272ebfdaecc67ff435.tar.gz |
(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'.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/progmodes/compile.el | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 32fa246b9f6..b890f542b8d 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1564,7 +1564,7 @@ All arguments are markers. If END-MK is non nil, mark is set there." (unless compilation-highlight-overlay (setq compilation-highlight-overlay (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) (save-excursion (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)) (progn (goto-char (match-beginning 0)) - (move-overlay compilation-highlight-overlay (match-beginning 0) (match-end 0))) - (move-overlay compilation-highlight-overlay (point) end)) - (sit-for 0.5) - (delete-overlay compilation-highlight-overlay))))))) - + (move-overlay compilation-highlight-overlay + (match-beginning 0) (match-end 0) + (current-buffer))) + (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) "Find a buffer for file FILENAME. |