aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2004-09-01 18:44:35 +0000
committerJuri Linkov2004-09-01 18:44:35 +0000
commit2beb6aa0e09e024638d830b685892faebe8b4db1 (patch)
treec617374cea294428ac8b09aaeac5158e0c422672
parentee9c5954f0c3e32993580b22f11acf51039452c7 (diff)
downloademacs-2beb6aa0e09e024638d830b685892faebe8b4db1.tar.gz
emacs-2beb6aa0e09e024638d830b685892faebe8b4db1.zip
(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'.
-rw-r--r--lisp/progmodes/compile.el19
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."
1564 (unless compilation-highlight-overlay 1564 (unless compilation-highlight-overlay
1565 (setq compilation-highlight-overlay 1565 (setq compilation-highlight-overlay
1566 (make-overlay (point-min) (point-min))) 1566 (make-overlay (point-min) (point-min)))
1567 (overlay-put compilation-highlight-overlay 'face 'region)) 1567 (overlay-put compilation-highlight-overlay 'face 'next-error))
1568 (with-current-buffer (marker-buffer mk) 1568 (with-current-buffer (marker-buffer mk)
1569 (save-excursion 1569 (save-excursion
1570 (end-of-line) 1570 (end-of-line)
@@ -1574,11 +1574,18 @@ All arguments are markers. If END-MK is non nil, mark is set there."
1574 (re-search-forward highlight-regexp end t)) 1574 (re-search-forward highlight-regexp end t))
1575 (progn 1575 (progn
1576 (goto-char (match-beginning 0)) 1576 (goto-char (match-beginning 0))
1577 (move-overlay compilation-highlight-overlay (match-beginning 0) (match-end 0))) 1577 (move-overlay compilation-highlight-overlay
1578 (move-overlay compilation-highlight-overlay (point) end)) 1578 (match-beginning 0) (match-end 0)
1579 (sit-for 0.5) 1579 (current-buffer)))
1580 (delete-overlay compilation-highlight-overlay))))))) 1580 (move-overlay compilation-highlight-overlay
1581 1581 (point) end (current-buffer)))
1582 (if (numberp next-error-highlight)
1583 (sit-for next-error-highlight))
1584 (if (not (eq next-error-highlight t))
1585 (delete-overlay compilation-highlight-overlay))))))
1586 (when (and (eq next-error-highlight 'fringe-arrow))
1587 (set (make-local-variable 'overlay-arrow-position)
1588 (copy-marker (line-beginning-position))))))
1582 1589
1583(defun compilation-find-file (marker filename dir &rest formats) 1590(defun compilation-find-file (marker filename dir &rest formats)
1584 "Find a buffer for file FILENAME. 1591 "Find a buffer for file FILENAME.