Function: mouse-scroll-subr

Scroll the window WINDOW, JUMP lines at a time, until new input arrives.
If OVERLAY is an overlay, let it stretch from START to the far edge of
the newly visible text.
Upon exit, point is at the far edge of the newly visible text.

(fn WINDOW JUMP &optional OVERLAY START)