diff options
| -rw-r--r-- | lisp/progmodes/compile.el | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index f5180b1fb48..d08766f5a35 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -1247,8 +1247,7 @@ Optional argument MINOR indicates this is called from | |||
| 1247 | (make-local-variable 'compilation-messages-start) | 1247 | (make-local-variable 'compilation-messages-start) |
| 1248 | (make-local-variable 'compilation-error-screen-columns) | 1248 | (make-local-variable 'compilation-error-screen-columns) |
| 1249 | (make-local-variable 'overlay-arrow-position) | 1249 | (make-local-variable 'overlay-arrow-position) |
| 1250 | (set (make-local-variable 'overlay-arrow-string) | 1250 | (set (make-local-variable 'overlay-arrow-string) "") |
| 1251 | (if (display-graphic-p) "=>" "")) | ||
| 1252 | (setq next-error-overlay-arrow-position nil) | 1251 | (setq next-error-overlay-arrow-position nil) |
| 1253 | (add-hook 'kill-buffer-hook | 1252 | (add-hook 'kill-buffer-hook |
| 1254 | (lambda () (setq next-error-overlay-arrow-position nil)) nil t) | 1253 | (lambda () (setq next-error-overlay-arrow-position nil)) nil t) |
| @@ -1575,9 +1574,12 @@ region and the first line of the next region." | |||
| 1575 | (setcdr loc (list line file marker))) | 1574 | (setcdr loc (list line file marker))) |
| 1576 | loc)) | 1575 | loc)) |
| 1577 | 1576 | ||
| 1578 | (defcustom compilation-context-lines 0 | 1577 | (defcustom compilation-context-lines nil |
| 1579 | "*Display this many lines of leading context before message. | 1578 | "Display this many lines of leading context before the current message. |
| 1580 | If nil, don't scroll the compilation output window." | 1579 | If nil and the left fringe is displayed, don't scroll the |
| 1580 | compilation output window; an arrow in the left fringe points to | ||
| 1581 | the current message. If nil and there is no left fringe, the message | ||
| 1582 | displays at the top of the window; there is no arrow." | ||
| 1581 | :type '(choice integer (const :tag "No window scrolling" nil)) | 1583 | :type '(choice integer (const :tag "No window scrolling" nil)) |
| 1582 | :group 'compilation | 1584 | :group 'compilation |
| 1583 | :version "22.1") | 1585 | :version "22.1") |
| @@ -1586,10 +1588,16 @@ If nil, don't scroll the compilation output window." | |||
| 1586 | "Align the compilation output window W with marker MK near top." | 1588 | "Align the compilation output window W with marker MK near top." |
| 1587 | (if (integerp compilation-context-lines) | 1589 | (if (integerp compilation-context-lines) |
| 1588 | (set-window-start w (save-excursion | 1590 | (set-window-start w (save-excursion |
| 1589 | (goto-char mk) | 1591 | (goto-char mk) |
| 1590 | (beginning-of-line (- 1 compilation-context-lines)) | 1592 | (beginning-of-line |
| 1591 | (point)))) | 1593 | (- 1 compilation-context-lines)) |
| 1592 | (set-window-point w mk)) | 1594 | (point))) |
| 1595 | (if (left-fringe-p) | ||
| 1596 | (set-window-start w (save-excursion | ||
| 1597 | (goto-char mk) | ||
| 1598 | (beginning-of-line 1) | ||
| 1599 | (point))))) | ||
| 1600 | (set-window-point w mk)) | ||
| 1593 | 1601 | ||
| 1594 | (defvar next-error-highlight-timer) | 1602 | (defvar next-error-highlight-timer) |
| 1595 | 1603 | ||