579 |
(and end-line |
(and end-line |
580 |
(setq end-line (match-string-no-properties end-line)) |
(setq end-line (match-string-no-properties end-line)) |
581 |
(setq end-line (string-to-number end-line))) |
(setq end-line (string-to-number end-line))) |
582 |
(and col |
(if col |
583 |
(setq col (match-string-no-properties col)) |
(if (functionp col) |
584 |
(setq col (- (string-to-number col) compilation-first-column))) |
(setq col (funcall col)) |
585 |
(if (and end-col (setq end-col (match-string-no-properties end-col))) |
(and |
586 |
(setq end-col (- (string-to-number end-col) compilation-first-column -1)) |
(setq col (match-string-no-properties col)) |
587 |
(if end-line (setq end-col -1))) |
(setq col (- (string-to-number col) compilation-first-column))))) |
588 |
|
(if (and end-col (functionp end-col)) |
589 |
|
(setq end-col (funcall end-col)) |
590 |
|
(if (and end-col (setq end-col (match-string-no-properties end-col))) |
591 |
|
(setq end-col (- (string-to-number end-col) compilation-first-column -1)) |
592 |
|
(if end-line (setq end-col -1)))) |
593 |
(if (consp type) ; not a static type, check what it is. |
(if (consp type) ; not a static type, check what it is. |
594 |
(setq type (or (and (car type) (match-end (car type)) 1) |
(setq type (or (and (car type) (match-end (car type)) 1) |
595 |
(and (cdr type) (match-end (cdr type)) 0) |
(and (cdr type) (match-end (cdr type)) 0) |
731 |
,@(when end-line |
,@(when end-line |
732 |
`((,end-line compilation-line-face nil t))) |
`((,end-line compilation-line-face nil t))) |
733 |
|
|
734 |
,@(when col |
,@(when (integerp col) |
735 |
`((,col compilation-column-face nil t))) |
`((,col compilation-column-face nil t))) |
736 |
,@(when end-col |
,@(when (integerp end-col) |
737 |
`((,end-col compilation-column-face nil t))) |
`((,end-col compilation-column-face nil t))) |
738 |
|
|
739 |
,@(nthcdr 6 item) |
,@(nthcdr 6 item) |
1529 |
|
|
1530 |
(defun compilation-goto-locus (msg mk end-mk) |
(defun compilation-goto-locus (msg mk end-mk) |
1531 |
"Jump to an error corresponding to MSG at MK. |
"Jump to an error corresponding to MSG at MK. |
1532 |
All arguments are markers. If END-MK is non-nil, mark is set there." |
All arguments are markers. If END-MK is non-nil, mark is set there |
1533 |
|
and overlay is highlighted between MK and END-MK." |
1534 |
(if (eq (window-buffer (selected-window)) |
(if (eq (window-buffer (selected-window)) |
1535 |
(marker-buffer msg)) |
(marker-buffer msg)) |
1536 |
;; If the compilation buffer window is selected, |
;; If the compilation buffer window is selected, |
1546 |
(widen) |
(widen) |
1547 |
(goto-char mk)) |
(goto-char mk)) |
1548 |
(if end-mk |
(if end-mk |
1549 |
(push-mark end-mk nil t) |
(push-mark end-mk t) |
1550 |
(if mark-active (setq mark-active))) |
(if mark-active (setq mark-active))) |
1551 |
;; If hideshow got in the way of |
;; If hideshow got in the way of |
1552 |
;; seeing the right place, open permanently. |
;; seeing the right place, open permanently. |
1567 |
compilation-highlight-regexp))) |
compilation-highlight-regexp))) |
1568 |
(compilation-set-window-height w) |
(compilation-set-window-height w) |
1569 |
|
|
1570 |
(when (and highlight-regexp |
(when highlight-regexp |
|
(not (and end-mk transient-mark-mode))) |
|
1571 |
(unless compilation-highlight-overlay |
(unless compilation-highlight-overlay |
1572 |
(setq compilation-highlight-overlay |
(setq compilation-highlight-overlay |
1573 |
(make-overlay (point-min) (point-min))) |
(make-overlay (point-min) (point-min))) |
1574 |
(overlay-put compilation-highlight-overlay 'face 'next-error)) |
(overlay-put compilation-highlight-overlay 'face 'next-error)) |
1575 |
(with-current-buffer (marker-buffer mk) |
(with-current-buffer (marker-buffer mk) |
1576 |
(save-excursion |
(save-excursion |
1577 |
(end-of-line) |
(if end-mk (goto-char end-mk) (end-of-line)) |
1578 |
(let ((end (point))) |
(let ((end (point))) |
1579 |
(beginning-of-line) |
(if mk (goto-char mk) (beginning-of-line)) |
1580 |
(if (and (stringp highlight-regexp) |
(if (and (stringp highlight-regexp) |
1581 |
(re-search-forward highlight-regexp end t)) |
(re-search-forward highlight-regexp end t)) |
1582 |
(progn |
(progn |