]> git.eshelyaron.com Git - emacs.git/commitdiff
Convert shortdoc-mode-map to defvar-keymap
authorStefan Kangas <stefan@marxist.se>
Wed, 8 Dec 2021 12:22:21 +0000 (13:22 +0100)
committerStefan Kangas <stefan@marxist.se>
Wed, 8 Dec 2021 12:22:21 +0000 (13:22 +0100)
* lisp/emacs-lisp/shortdoc.el (shortdoc-mode-map): Convert to
defvar-keymap.

lisp/emacs-lisp/shortdoc.el

index ba08e68af5796d287f51a6f12fed8b481953e79e..5c51e257eb0e5510c4b1bcca552a553a0634c0f7 100644 (file)
@@ -1423,14 +1423,12 @@ Example:
         (setq slist (cdr slist)))
       (setcdr slist (cons elem (cdr slist))))))
 
-(defvar shortdoc-mode-map
-  (let ((map (make-sparse-keymap)))
-    (define-key map (kbd "n") 'shortdoc-next)
-    (define-key map (kbd "p") 'shortdoc-previous)
-    (define-key map (kbd "C-c C-n") 'shortdoc-next-section)
-    (define-key map (kbd "C-c C-p") 'shortdoc-previous-section)
-    map)
-  "Keymap for `shortdoc-mode'.")
+(defvar-keymap shortdoc-mode-map
+  :doc "Keymap for `shortdoc-mode'."
+  "n"       #'shortdoc-next
+  "p"       #'shortdoc-previous
+  "C-c C-n" #'shortdoc-next-section
+  "C-c C-p" #'shortdoc-previous-section)
 
 (define-derived-mode shortdoc-mode special-mode "shortdoc"
   "Mode for shortdoc."