Variable: compilation-context-lines
compilation-context-lines is a customizable variable defined in
compile.el.gz.
Value
nil
Documentation
Display this many lines of leading context before the current message.
If nil or t, and the left fringe is displayed, don't scroll the compilation output window; an arrow in the left fringe points to the current message. With no left fringe, if nil, the message scrolls to the top of the window; there is no arrow. If t, don't scroll the compilation output window at all; an arrow before column zero points to the current message.
This variable was added, or its default value changed, in Emacs 22.1.
Probably introduced at or before Emacs version 22.1.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/compile.el.gz
(defcustom compilation-context-lines nil
"Display this many lines of leading context before the current message.
If nil or t, and the left fringe is displayed, don't scroll the
compilation output window; an arrow in the left fringe points to
the current message. With no left fringe, if nil, the message
scrolls to the top of the window; there is no arrow. If t, don't
scroll the compilation output window at all; an arrow before
column zero points to the current message."
:type '(choice integer
(const :tag "Scroll window when no fringe" nil)
(const :tag "No window scrolling" t))
:version "22.1")