Variable: window-scroll-functions

window-scroll-functions is a variable defined in xdisp.c.

Value

(follow-avoid-tail-recenter)

Documentation

List of functions to call before redisplaying a window with scrolling.

Each function is called with two arguments, the window and its new display-start position. These functions are called whenever the window-start marker is modified, either to point into another buffer (e.g. via set-window-buffer) or another place in the same buffer. When each function is called, the window-start marker of its window argument has been already set to the new value, and the buffer which that window will display is set to be the current buffer. Note that the value of window-end is not valid when these functions are called.

Warning: Do not use this feature to alter the way the window is scrolled. It is not designed for that, and such use probably won't work.

Probably introduced at or before Emacs version 19.30.

Source Code

// Defined in /usr/src/emacs/src/xdisp.c
  DEFVAR_LISP ("window-scroll-functions", Vwindow_scroll_functions,
    doc: /* List of functions to call before redisplaying a window with scrolling.
Each function is called with two arguments, the window and its new
display-start position.
These functions are called whenever the `window-start' marker is modified,
either to point into another buffer (e.g. via `set-window-buffer') or another
place in the same buffer.
When each function is called, the `window-start' marker of its window
argument has been already set to the new value, and the buffer which that
window will display is set to be the current buffer.
Note that the value of `window-end' is not valid when these functions are
called.

Warning: Do not use this feature to alter the way the window
is scrolled.  It is not designed for that, and such use probably won't
work.  */);