]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/language/thai-util.el (thai-word-mode-map): Prefer defvar-keymap.
authorStefan Kangas <stefan@marxist.se>
Thu, 12 May 2022 13:53:28 +0000 (15:53 +0200)
committerStefan Kangas <stefan@marxist.se>
Fri, 13 May 2022 12:35:00 +0000 (14:35 +0200)
lisp/language/thai-util.el

index d11daf0f8396e52393ce0dfa647ec89268c1a29a..6c004e9495c7c5c32da9de5e05b7b819f0f9465e 100644 (file)
@@ -244,15 +244,13 @@ positions (integers or markers) specifying the region."
 ;; Thai-word-mode requires functions in the feature `thai-word'.
 (require 'thai-word)
 
-(defvar thai-word-mode-map
-  (let ((map (make-sparse-keymap)))
-    (define-key map [remap forward-word] 'thai-forward-word)
-    (define-key map [remap backward-word] 'thai-backward-word)
-    (define-key map [remap kill-word] 'thai-kill-word)
-    (define-key map [remap backward-kill-word] 'thai-backward-kill-word)
-    (define-key map [remap transpose-words] 'thai-transpose-words)
-    map)
-  "Keymap for `thai-word-mode'.")
+(defvar-keymap thai-word-mode-map
+  :doc "Keymap for `thai-word-mode'."
+  "<remap> <forward-word>"       #'thai-forward-word
+  "<remap> <backward-word>"      #'thai-backward-word
+  "<remap> <kill-word>"          #'thai-kill-word
+  "<remap> <backward-kill-word>" #'thai-backward-kill-word
+  "<remap> <transpose-words>"    #'thai-transpose-words)
 
 (define-minor-mode thai-word-mode
   "Minor mode to make word-oriented commands aware of Thai words.