[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 4299bf6da7 3/5: * lisp/scroll-lock.el (scroll-lock-mode-map): Pre
From: |
Stefan Kangas |
Subject: |
master 4299bf6da7 3/5: * lisp/scroll-lock.el (scroll-lock-mode-map): Prefer defvar-keymap. |
Date: |
Wed, 11 May 2022 10:12:12 -0400 (EDT) |
branch: master
commit 4299bf6da78f786a6db7880009d61addba55c71f
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
* 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 3f5f777f53..fa1f3a633b 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'.")