From 4299bf6da78f786a6db7880009d61addba55c71f Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 10 May 2022 23:13:19 +0200 Subject: [PATCH] * lisp/scroll-lock.el (scroll-lock-mode-map): Prefer defvar-keymap. --- lisp/scroll-lock.el | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lisp/scroll-lock.el b/lisp/scroll-lock.el index 3f5f777f53f..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." + " " #'scroll-lock-next-line + " " #'scroll-lock-previous-line + " " #'scroll-lock-forward-paragraph + " " #'scroll-lock-backward-paragraph + "S-" #'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'.") -- 2.39.2