window-scroll-functions

window-scroll-functions is a variable defined in `C source code'.
Its value is
(follow-avoid-tail-recenter)

  • This variable may be risky if used as a file-local variable.

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.
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.