Variable: scroll-lock-mode

scroll-lock-mode is a buffer-local variable defined in scroll-lock.el.gz.

Documentation

Non-nil if Scroll-Lock mode is enabled.

Use the command scroll-lock-mode(var)/scroll-lock-mode(fun) to change this variable.

Probably introduced at or before Emacs version 27.1.

Key Bindings

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