]> git.eshelyaron.com Git - emacs.git/commitdiff
Convert smerge-mode.el from easy-mmode-defmap to define-keymap
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 17 Oct 2021 22:35:32 +0000 (00:35 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 17 Oct 2021 22:35:32 +0000 (00:35 +0200)
* lisp/vc/smerge-mode.el (smerge-basic-map, smerge-mode-map):
Convert form easy-mmode-defmap to define-keymap.

lisp/vc/smerge-mode.el

index b2a875c81ff9aebc8beab95d6ad86f85032baca7..5a0b90863ae2675296ff2ca2072df1e8fa4a428d 100644 (file)
@@ -142,25 +142,24 @@ Used in `smerge-diff-base-upper' and related functions."
   "Face used for added characters shown by `smerge-refine'."
   :version "24.3")
 
-(easy-mmode-defmap smerge-basic-map
-  `(("n" . smerge-next)
-    ("p" . smerge-prev)
-    ("r" . smerge-resolve)
-    ("a" . smerge-keep-all)
-    ("b" . smerge-keep-base)
-    ("o" . smerge-keep-lower)           ; for the obsolete keep-other
-    ("l" . smerge-keep-lower)
-    ("m" . smerge-keep-upper)           ; for the obsolete keep-mine
-    ("u" . smerge-keep-upper)
-    ("E" . smerge-ediff)
-    ("C" . smerge-combine-with-next)
-    ("R" . smerge-refine)
-    ("\C-m" . smerge-keep-current)
-    ("=" . ,(make-sparse-keymap "Diff"))
-    ("=<" "base-upper" . smerge-diff-base-upper)
-    ("=>" "base-lower" . smerge-diff-base-lower)
-    ("==" "upper-lower" . smerge-diff-upper-lower))
-  "The base keymap for `smerge-mode'.")
+(defvar-keymap smerge-basic-map
+  "n" #'smerge-next
+  "p" #'smerge-prev
+  "r" #'smerge-resolve
+  "a" #'smerge-keep-all
+  "b" #'smerge-keep-base
+  "o" #'smerge-keep-lower               ; for the obsolete keep-other
+  "l" #'smerge-keep-lower
+  "m" #'smerge-keep-upper               ; for the obsolete keep-mine
+  "u" #'smerge-keep-upper
+  "E" #'smerge-ediff
+  "C" #'smerge-combine-with-next
+  "R" #'smerge-refine
+  ["C-m"] #'smerge-keep-current
+  "=" (define-keymap :name "Diff"
+        "<" (cons "base-upper" #'smerge-diff-base-upper)
+        ">" (cons "base-lower" #'smerge-diff-base-lower)
+        "=" (cons "upper-lower" #'smerge-diff-upper-lower)))
 
 (defcustom smerge-command-prefix "\C-c^"
   "Prefix for `smerge-mode' commands."
@@ -169,9 +168,8 @@ Used in `smerge-diff-base-upper' and related functions."
                 (const :tag "none"  "")
                 string))
 
-(easy-mmode-defmap smerge-mode-map
-  `((,smerge-command-prefix . ,smerge-basic-map))
-  "Keymap for `smerge-mode'.")
+(defvar-keymap smerge-mode-map
+  smerge-command-prefix 'smerge-basic-map)
 
 (defvar-local smerge-check-cache nil)
 (defun smerge-check (n)