mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-24 07:20:37 +00:00
(compilation-context-lines): Add nil option to disable compilation output window scrolling.
(compilation-set-window): Use it.
This commit is contained in:
parent
35904fd355
commit
a3a9c080fa
@ -1473,17 +1473,19 @@ region and the first line of the next region."
|
||||
loc))
|
||||
|
||||
(defcustom compilation-context-lines 0
|
||||
"*Display this many lines of leading context before message."
|
||||
:type 'integer
|
||||
"*Display this many lines of leading context before message.
|
||||
If nil, don't scroll the compilation output window."
|
||||
:type '(choice integer (const :tag "No window scrolling" nil))
|
||||
:group 'compilation
|
||||
:version "21.4")
|
||||
|
||||
(defsubst compilation-set-window (w mk)
|
||||
"Align the compilation output window W with marker MK near top."
|
||||
(set-window-start w (save-excursion
|
||||
(goto-char mk)
|
||||
(beginning-of-line (- 1 compilation-context-lines))
|
||||
(point)))
|
||||
(if (integerp compilation-context-lines)
|
||||
(set-window-start w (save-excursion
|
||||
(goto-char mk)
|
||||
(beginning-of-line (- 1 compilation-context-lines))
|
||||
(point))))
|
||||
(set-window-point w mk))
|
||||
|
||||
(defun compilation-goto-locus (msg mk end-mk)
|
||||
|
Loading…
Reference in New Issue
Block a user