]> git.eshelyaron.com Git - emacs.git/commitdiff
* admin/gitmerge.el (gitmerge-mode-map): Convert to defvar-keymap.
authorStefan Kangas <stefan@marxist.se>
Wed, 17 Nov 2021 03:14:33 +0000 (04:14 +0100)
committerStefan Kangas <stefan@marxist.se>
Wed, 17 Nov 2021 03:24:54 +0000 (04:24 +0100)
admin/gitmerge.el

index 67fca87c119ebe514b54ed37dcaf89ffcfa25bd9..5aae6b40a0c99d6196981140c129e4776b5a3d12 100644 (file)
@@ -96,16 +96,13 @@ If nil, the function `gitmerge-default-branch' guesses.")
 (defvar gitmerge-log-regexp
   "^\\([A-Z ]\\)\\s-*\\([0-9a-f]+\\) \\(.+?\\): \\(.*\\)$")
 
-(defvar gitmerge-mode-map
-  (let ((map (make-keymap)))
-    (define-key map [(l)] 'gitmerge-show-log)
-    (define-key map [(d)] 'gitmerge-show-diff)
-    (define-key map [(f)] 'gitmerge-show-files)
-    (define-key map [(s)] 'gitmerge-toggle-skip)
-    (define-key map [(m)] 'gitmerge-start-merge)
-    map)
-  "Keymap for gitmerge major mode.")
-
+(defvar-keymap gitmerge-mode-map
+  :doc "Keymap for gitmerge major mode."
+  "l" #'gitmerge-show-log
+  "d" #'gitmerge-show-diff
+  "f" #'gitmerge-show-files
+  "s" #'gitmerge-toggle-skip
+  "m" #'gitmerge-start-merge)
 
 (defvar gitmerge-mode-font-lock-keywords
   `((,gitmerge-log-regexp