Variable: scroll-lock-mode-hook
scroll-lock-mode-hook is a customizable variable defined in
scroll-lock.el.gz.
Value
nil
Documentation
Hook run after entering or leaving scroll-lock-mode(var)/scroll-lock-mode(fun).
No problems result if this variable is not bound.
add-hook automatically binds it. (This is true for all hook variables.)
Source Code
;; Defined in /usr/src/emacs/lisp/scroll-lock.el.gz
;;;###autoload
(define-minor-mode scroll-lock-mode
"Buffer-local minor mode for pager-like scrolling.
When enabled, keys that normally move point by line or paragraph
will scroll the buffer by the respective amount of lines instead
and point will be kept vertically fixed relative to window
boundaries during scrolling.
Note that the default key binding to `scroll' will not work on
MS-Windows systems if `w32-scroll-lock-modifier' is non-nil."
:lighter " ScrLck"
:keymap scroll-lock-mode-map
(if scroll-lock-mode
(progn
(setq scroll-lock-preserve-screen-pos-save
scroll-preserve-screen-position)
(setq-local scroll-preserve-screen-position 'always))
(setq scroll-preserve-screen-position
scroll-lock-preserve-screen-pos-save)))