summaryrefslogtreecommitdiff
path: root/lisp/scroll-lock.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/scroll-lock.el')
-rw-r--r--lisp/scroll-lock.el18
1 files changed, 8 insertions, 10 deletions
diff --git a/lisp/scroll-lock.el b/lisp/scroll-lock.el
index d41e3352332..fa1f3a633b5 100644
--- a/lisp/scroll-lock.el
+++ b/lisp/scroll-lock.el
@@ -30,15 +30,13 @@
;;; Code:
-(defvar scroll-lock-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map [remap next-line] 'scroll-lock-next-line)
- (define-key map [remap previous-line] 'scroll-lock-previous-line)
- (define-key map [remap forward-paragraph] 'scroll-lock-forward-paragraph)
- (define-key map [remap backward-paragraph] 'scroll-lock-backward-paragraph)
- (define-key map [S-down] 'scroll-lock-next-line-always-scroll)
- map)
- "Keymap for Scroll Lock mode.")
+(defvar-keymap scroll-lock-mode-map
+ :doc "Keymap for Scroll Lock mode."
+ "<remap> <next-line>" #'scroll-lock-next-line
+ "<remap> <previous-line>" #'scroll-lock-previous-line
+ "<remap> <forward-paragraph>" #'scroll-lock-forward-paragraph
+ "<remap> <backward-paragraph>" #'scroll-lock-backward-paragraph
+ "S-<down>" #'scroll-lock-next-line-always-scroll)
(defvar-local scroll-lock-preserve-screen-pos-save scroll-preserve-screen-position
"Used for saving the state of `scroll-preserve-screen-position'.")
@@ -55,7 +53,7 @@ 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_Lock will not work on
+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