From: Stefan Kangas Date: Thu, 12 May 2022 13:53:28 +0000 (+0200) Subject: * lisp/language/thai-util.el (thai-word-mode-map): Prefer defvar-keymap. X-Git-Tag: emacs-29.0.90~1910^2~733 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=87eed0704153bcf3b1b01ff3414f2ccb112457e7;p=emacs.git * lisp/language/thai-util.el (thai-word-mode-map): Prefer defvar-keymap. --- diff --git a/lisp/language/thai-util.el b/lisp/language/thai-util.el index d11daf0f839..6c004e9495c 100644 --- a/lisp/language/thai-util.el +++ b/lisp/language/thai-util.el @@ -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'." + " " #'thai-forward-word + " " #'thai-backward-word + " " #'thai-kill-word + " " #'thai-backward-kill-word + " " #'thai-transpose-words) (define-minor-mode thai-word-mode "Minor mode to make word-oriented commands aware of Thai words.