Variable: scroll-margin
scroll-margin is a customizable variable defined in xdisp.c.
Value
0
Documentation
Number of lines of margin at the top and bottom of a window.
Trigger automatic scrolling whenever point gets within this many lines of the top or bottom of the window (see info node (emacs)Auto Scrolling).
Probably introduced at or before Emacs version 20.1.
Source Code
// Defined in /usr/src/emacs/src/xdisp.c
DEFVAR_INT ("scroll-margin", scroll_margin,
doc: /* Number of lines of margin at the top and bottom of a window.
Trigger automatic scrolling whenever point gets within this many lines
of the top or bottom of the window (see info node `Auto Scrolling'). */);