summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2021-10-07 18:45:36 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-10-07 18:45:36 +0200
commitd3a30b67dc798fa713ec5900b12517db321cc7d7 (patch)
tree1044f759e2bd6241fc47b6a173424be348438ec8
parentd2611920685ca415a1d85ffb9567b968518028d6 (diff)
downloademacs-d3a30b67dc798fa713ec5900b12517db321cc7d7.tar.gz
Convert mh-e to use define-keymap instead of gnus-define-keys
* lisp/mh-e/mh-speed.el (mh-folder-speedbar-key-map): * lisp/mh-e/mh-show.el (mh-show-mode-map): * lisp/mh-e/mh-search.el (mh-letter): (mh-search-mode-map): * lisp/mh-e/mh-letter.el (mh-letter-mode-map): * lisp/mh-e/mh-folder.el (mh-folder-mode-map): Convert to use `define-keymap' instead of `gnus-define-keys'.
-rw-r--r--lisp/mh-e/mh-folder.el262
-rw-r--r--lisp/mh-e/mh-letter.el124
-rw-r--r--lisp/mh-e/mh-search.el29
-rw-r--r--lisp/mh-e/mh-show.el252
-rw-r--r--lisp/mh-e/mh-speed.el10
5 files changed, 339 insertions, 338 deletions
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el
index 5fbaf12ef97..c8c6511bbc4 100644
--- a/lisp/mh-e/mh-folder.el
+++ b/lisp/mh-e/mh-folder.el
@@ -213,137 +213,137 @@ annotation.")
(defalias 'mh-alt-visit-folder #'mh-visit-folder)
;; Save the "b" binding for a future `back'. Maybe?
-(gnus-define-keys mh-folder-mode-map
- " " mh-page-msg
- "!" mh-refile-or-write-again
- "'" mh-toggle-tick
- "," mh-header-display
- "." mh-alt-show
- ":" mh-show-preferred-alternative
- ";" mh-toggle-mh-decode-mime-flag
- ">" mh-write-msg-to-file
- "?" mh-help
- "E" mh-extract-rejected-mail
- "M" mh-modify
- "\177" mh-previous-page
- "\C-d" mh-delete-msg-no-motion
- "\t" mh-index-next-folder
- [backtab] mh-index-previous-folder
- "\M-\t" mh-index-previous-folder
- "\e<" mh-first-msg
- "\e>" mh-last-msg
- "\ed" mh-redistribute
- "\r" mh-show
- "^" mh-alt-refile-msg
- "c" mh-copy-msg
- "d" mh-delete-msg
- "e" mh-edit-again
- "f" mh-forward
- "g" mh-goto-msg
- "i" mh-inc-folder
- "k" mh-delete-subject-or-thread
- "m" mh-alt-send
- "n" mh-next-undeleted-msg
- "\M-n" mh-next-unread-msg
- "o" mh-refile-msg
- "p" mh-previous-undeleted-msg
- "\M-p" mh-previous-unread-msg
- "q" mh-quit
- "r" mh-reply
- "s" mh-send
- "t" mh-toggle-showing
- "u" mh-undo
- "v" mh-index-visit-folder
- "x" mh-execute-commands
- "|" mh-pipe-msg)
-
-(gnus-define-keys (mh-folder-map "F" mh-folder-mode-map)
- "?" mh-prefix-help
- "'" mh-index-ticked-messages
- "S" mh-sort-folder
- "c" mh-catchup
- "f" mh-alt-visit-folder
- "k" mh-kill-folder
- "l" mh-list-folders
- "n" mh-index-new-messages
- "o" mh-alt-visit-folder
- "p" mh-pack-folder
- "q" mh-index-sequenced-messages
- "r" mh-rescan-folder
- "s" mh-search
- "u" mh-undo-folder
- "v" mh-visit-folder)
-
-(define-key mh-folder-mode-map "I" mh-inc-spool-map)
-
-(gnus-define-keys (mh-junk-map "J" mh-folder-mode-map)
- "?" mh-prefix-help
- "a" mh-junk-allowlist
- "b" mh-junk-blocklist
- "w" mh-junk-whitelist)
-
-(gnus-define-keys (mh-ps-print-map "P" mh-folder-mode-map)
- "?" mh-prefix-help
- "C" mh-ps-print-toggle-color
- "F" mh-ps-print-toggle-faces
- "f" mh-ps-print-msg-file
- "l" mh-print-msg
- "p" mh-ps-print-msg)
-
-(gnus-define-keys (mh-sequence-map "S" mh-folder-mode-map)
- "'" mh-narrow-to-tick
- "?" mh-prefix-help
- "d" mh-delete-msg-from-seq
- "k" mh-delete-seq
- "l" mh-list-sequences
- "n" mh-narrow-to-seq
- "p" mh-put-msg-in-seq
- "s" mh-msg-is-in-seq
- "w" mh-widen)
-
-(gnus-define-keys (mh-thread-map "T" mh-folder-mode-map)
- "?" mh-prefix-help
- "u" mh-thread-ancestor
- "p" mh-thread-previous-sibling
- "n" mh-thread-next-sibling
- "t" mh-toggle-threads
- "d" mh-thread-delete
- "o" mh-thread-refile)
-
-(gnus-define-keys (mh-limit-map "/" mh-folder-mode-map)
- "'" mh-narrow-to-tick
- "?" mh-prefix-help
- "c" mh-narrow-to-cc
- "g" mh-narrow-to-range
- "m" mh-narrow-to-from
- "s" mh-narrow-to-subject
- "t" mh-narrow-to-to
- "w" mh-widen)
-
-(gnus-define-keys (mh-extract-map "X" mh-folder-mode-map)
- "?" mh-prefix-help
- "s" mh-store-msg ;shar
- "u" mh-store-msg) ;uuencode
-
-(gnus-define-keys (mh-digest-map "D" mh-folder-mode-map)
- " " mh-page-digest
- "?" mh-prefix-help
- "\177" mh-page-digest-backwards
- "b" mh-burst-digest)
-
-(gnus-define-keys (mh-mime-map "K" mh-folder-mode-map)
- "?" mh-prefix-help
- "a" mh-mime-save-parts
- "e" mh-display-with-external-viewer
- "i" mh-folder-inline-mime-part
- "o" mh-folder-save-mime-part
- "t" mh-toggle-mime-buttons
- "v" mh-folder-toggle-mime-part
- "\t" mh-next-button
- [backtab] mh-prev-button
- "\M-\t" mh-prev-button)
-
-(define-key mh-folder-mode-map [mouse-2] 'mh-show-mouse)
+(define-keymap :keymap mh-folder-mode-map
+ " " #'mh-page-msg
+ "!" #'mh-refile-or-write-again
+ "'" #'mh-toggle-tick
+ "," #'mh-header-display
+ "." #'mh-alt-show
+ ":" #'mh-show-preferred-alternative
+ ";" #'mh-toggle-mh-decode-mime-flag
+ ">" #'mh-write-msg-to-file
+ "?" #'mh-help
+ "E" #'mh-extract-rejected-mail
+ "M" #'mh-modify
+ "\177" #'mh-previous-page
+ "\C-d" #'mh-delete-msg-no-motion
+ "\t" #'mh-index-next-folder
+ [backtab] #'mh-index-previous-folder
+ "\M-\t" #'mh-index-previous-folder
+ "\e<" #'mh-first-msg
+ "\e>" #'mh-last-msg
+ "\ed" #'mh-redistribute
+ "\r" #'mh-show
+ "^" #'mh-alt-refile-msg
+ "c" #'mh-copy-msg
+ "d" #'mh-delete-msg
+ "e" #'mh-edit-again
+ "f" #'mh-forward
+ "g" #'mh-goto-msg
+ "i" #'mh-inc-folder
+ "k" #'mh-delete-subject-or-thread
+ "m" #'mh-alt-send
+ "n" #'mh-next-undeleted-msg
+ "\M-n" #'mh-next-unread-msg
+ "o" #'mh-refile-msg
+ "p" #'mh-previous-undeleted-msg
+ "\M-p" #'mh-previous-unread-msg
+ "q" #'mh-quit
+ "r" #'mh-reply
+ "s" #'mh-send
+ "t" #'mh-toggle-showing
+ "u" #'mh-undo
+ "v" #'mh-index-visit-folder
+ "x" #'mh-execute-commands
+ "|" #'mh-pipe-msg
+
+ "F" (define-keymap :prefix 'mh-folder-map
+ "?" #'mh-prefix-help
+ "'" #'mh-index-ticked-messages
+ "S" #'mh-sort-folder
+ "c" #'mh-catchup
+ "f" #'mh-alt-visit-folder
+ "k" #'mh-kill-folder
+ "l" #'mh-list-folders
+ "n" #'mh-index-new-messages
+ "o" #'mh-alt-visit-folder
+ "p" #'mh-pack-folder
+ "q" #'mh-index-sequenced-messages
+ "r" #'mh-rescan-folder
+ "s" #'mh-search
+ "u" #'mh-undo-folder
+ "v" #'mh-visit-folder)
+
+ "I" mh-inc-spool-map
+
+ "J" (define-keymap :prefix 'mh-junk-map
+ "?" #'mh-prefix-help
+ "a" #'mh-junk-allowlist
+ "b" #'mh-junk-blocklist
+ "w" #'mh-junk-allowlist)
+
+ "P" (define-keymap :prefix 'mh-ps-print-map
+ "?" #'mh-prefix-help
+ "C" #'mh-ps-print-toggle-color
+ "F" #'mh-ps-print-toggle-faces
+ "f" #'mh-ps-print-msg-file
+ "l" #'mh-print-msg
+ "p" #'mh-ps-print-msg)
+
+ "S" (define-keymap :prefix 'mh-sequence-map
+ "'" #'mh-narrow-to-tick
+ "?" #'mh-prefix-help
+ "d" #'mh-delete-msg-from-seq
+ "k" #'mh-delete-seq
+ "l" #'mh-list-sequences
+ "n" #'mh-narrow-to-seq
+ "p" #'mh-put-msg-in-seq
+ "s" #'mh-msg-is-in-seq
+ "w" #'mh-widen)
+
+ "T" (define-keymap :prefix 'mh-thread-map
+ "?" #'mh-prefix-help
+ "u" #'mh-thread-ancestor
+ "p" #'mh-thread-previous-sibling
+ "n" #'mh-thread-next-sibling
+ "t" #'mh-toggle-threads
+ "d" #'mh-thread-delete
+ "o" #'mh-thread-refile)
+
+ "/" (define-keymap :prefix 'mh-limit-map
+ "'" #'mh-narrow-to-tick
+ "?" #'mh-prefix-help
+ "c" #'mh-narrow-to-cc
+ "g" #'mh-narrow-to-range
+ "m" #'mh-narrow-to-from
+ "s" #'mh-narrow-to-subject
+ "t" #'mh-narrow-to-to
+ "w" #'mh-widen)
+
+ "X" (define-keymap :prefix 'mh-extract-map
+ "?" #'mh-prefix-help
+ "s" #'mh-store-msg ;shar
+ "u" #'mh-store-msg) ;uuencode
+
+ "D" (define-keymap :prefix 'mh-digest-map
+ " " #'mh-page-digest
+ "?" #'mh-prefix-help
+ "\177" #'mh-page-digest-backwards
+ "b" #'mh-burst-digest)
+
+ "K" (define-keymap :prefix 'mh-mime-map
+ "?" #'mh-prefix-help
+ "a" #'mh-mime-save-parts
+ "e" #'mh-display-with-external-viewer
+ "i" #'mh-folder-inline-mime-part
+ "o" #'mh-folder-save-mime-part
+ "t" #'mh-toggle-mime-buttons
+ "v" #'mh-folder-toggle-mime-part
+ "\t" #'mh-next-button
+ [backtab] #'mh-prev-button
+ "\M-\t" #'mh-prev-button)
+
+ [mouse-2] #'mh-show-mouse)
;; "C-c /" prefix is used in mh-folder-mode by pgp.el and mailcrypt
diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el
index 493749577b9..ce17df21892 100644
--- a/lisp/mh-e/mh-letter.el
+++ b/lisp/mh-e/mh-letter.el
@@ -114,68 +114,68 @@
;;; MH-Letter Keys
;; If this changes, modify mh-letter-mode-help-messages accordingly, above.
-(gnus-define-keys mh-letter-mode-map
- " " mh-letter-complete-or-space
- "," mh-letter-confirm-address
- "\C-c?" mh-help
- "\C-c\C-\\" mh-fully-kill-draft ;if no C-q
- "\C-c\C-^" mh-insert-signature ;if no C-s
- "\C-c\C-c" mh-send-letter
- "\C-c\C-d" mh-insert-identity
- "\C-c\C-e" mh-mh-to-mime
- "\C-c\C-f\C-a" mh-to-field
- "\C-c\C-f\C-b" mh-to-field
- "\C-c\C-f\C-c" mh-to-field
- "\C-c\C-f\C-d" mh-to-field
- "\C-c\C-f\C-f" mh-to-fcc
- "\C-c\C-f\C-l" mh-to-field
- "\C-c\C-f\C-m" mh-to-field
- "\C-c\C-f\C-r" mh-to-field
- "\C-c\C-f\C-s" mh-to-field
- "\C-c\C-f\C-t" mh-to-field
- "\C-c\C-fa" mh-to-field
- "\C-c\C-fb" mh-to-field
- "\C-c\C-fc" mh-to-field
- "\C-c\C-fd" mh-to-field
- "\C-c\C-ff" mh-to-fcc
- "\C-c\C-fl" mh-to-field
- "\C-c\C-fm" mh-to-field
- "\C-c\C-fr" mh-to-field
- "\C-c\C-fs" mh-to-field
- "\C-c\C-ft" mh-to-field
- "\C-c\C-i" mh-insert-letter
- "\C-c\C-m\C-e" mh-mml-secure-message-encrypt
- "\C-c\C-m\C-f" mh-compose-forward
- "\C-c\C-m\C-g" mh-mh-compose-anon-ftp
- "\C-c\C-m\C-i" mh-compose-insertion
- "\C-c\C-m\C-m" mh-mml-to-mime
- "\C-c\C-m\C-n" mh-mml-unsecure-message
- "\C-c\C-m\C-s" mh-mml-secure-message-sign
- "\C-c\C-m\C-t" mh-mh-compose-external-compressed-tar
- "\C-c\C-m\C-u" mh-mh-to-mime-undo
- "\C-c\C-m\C-x" mh-mh-compose-external-type
- "\C-c\C-mee" mh-mml-secure-message-encrypt
- "\C-c\C-mes" mh-mml-secure-message-signencrypt
- "\C-c\C-mf" mh-compose-forward
- "\C-c\C-mg" mh-mh-compose-anon-ftp
- "\C-c\C-mi" mh-compose-insertion
- "\C-c\C-mm" mh-mml-to-mime
- "\C-c\C-mn" mh-mml-unsecure-message
- "\C-c\C-mse" mh-mml-secure-message-signencrypt
- "\C-c\C-mss" mh-mml-secure-message-sign
- "\C-c\C-mt" mh-mh-compose-external-compressed-tar
- "\C-c\C-mu" mh-mh-to-mime-undo
- "\C-c\C-mx" mh-mh-compose-external-type
- "\C-c\C-o" mh-open-line
- "\C-c\C-q" mh-fully-kill-draft
- "\C-c\C-s" mh-insert-signature
- "\C-c\C-t" mh-letter-toggle-header-field-display
- "\C-c\C-w" mh-check-whom
- "\C-c\C-y" mh-yank-cur-msg
- "\C-c\M-d" mh-insert-auto-fields
- "\M-\t" mh-letter-complete
- "\t" mh-letter-next-header-field-or-indent
- [backtab] mh-letter-previous-header-field)
+(define-keymap :keymap mh-letter-mode-map
+ " " #'mh-letter-complete-or-space
+ "," #'mh-letter-confirm-address
+ "\C-c?" #'mh-help
+ "\C-c\C-\\" #'mh-fully-kill-draft ;if no C-q
+ "\C-c\C-^" #'mh-insert-signature ;if no C-s
+ "\C-c\C-c" #'mh-send-letter
+ "\C-c\C-d" #'mh-insert-identity
+ "\C-c\C-e" #'mh-mh-to-mime
+ "\C-c\C-f\C-a" #'mh-to-field
+ "\C-c\C-f\C-b" #'mh-to-field
+ "\C-c\C-f\C-c" #'mh-to-field
+ "\C-c\C-f\C-d" #'mh-to-field
+ "\C-c\C-f\C-f" #'mh-to-fcc
+ "\C-c\C-f\C-l" #'mh-to-field
+ "\C-c\C-f\C-m" #'mh-to-field
+ "\C-c\C-f\C-r" #'mh-to-field
+ "\C-c\C-f\C-s" #'mh-to-field
+ "\C-c\C-f\C-t" #'mh-to-field
+ "\C-c\C-fa" #'mh-to-field
+ "\C-c\C-fb" #'mh-to-field
+ "\C-c\C-fc" #'mh-to-field
+ "\C-c\C-fd" #'mh-to-field
+ "\C-c\C-ff" #'mh-to-fcc
+ "\C-c\C-fl" #'mh-to-field
+ "\C-c\C-fm" #'mh-to-field
+ "\C-c\C-fr" #'mh-to-field
+ "\C-c\C-fs" #'mh-to-field
+ "\C-c\C-ft" #'mh-to-field
+ "\C-c\C-i" #'mh-insert-letter
+ "\C-c\C-m\C-e" #'mh-mml-secure-message-encrypt
+ "\C-c\C-m\C-f" #'mh-compose-forward
+ "\C-c\C-m\C-g" #'mh-mh-compose-anon-ftp
+ "\C-c\C-m\C-i" #'mh-compose-insertion
+ "\C-c\C-m\C-m" #'mh-mml-to-mime
+ "\C-c\C-m\C-n" #'mh-mml-unsecure-message
+ "\C-c\C-m\C-s" #'mh-mml-secure-message-sign
+ "\C-c\C-m\C-t" #'mh-mh-compose-external-compressed-tar
+ "\C-c\C-m\C-u" #'mh-mh-to-mime-undo
+ "\C-c\C-m\C-x" #'mh-mh-compose-external-type
+ "\C-c\C-mee" #'mh-mml-secure-message-encrypt
+ "\C-c\C-mes" #'mh-mml-secure-message-signencrypt
+ "\C-c\C-mf" #'mh-compose-forward
+ "\C-c\C-mg" #'mh-mh-compose-anon-ftp
+ "\C-c\C-mi" #'mh-compose-insertion
+ "\C-c\C-mm" #'mh-mml-to-mime
+ "\C-c\C-mn" #'mh-mml-unsecure-message
+ "\C-c\C-mse" #'mh-mml-secure-message-signencrypt
+ "\C-c\C-mss" #'mh-mml-secure-message-sign
+ "\C-c\C-mt" #'mh-mh-compose-external-compressed-tar
+ "\C-c\C-mu" #'mh-mh-to-mime-undo
+ "\C-c\C-mx" #'mh-mh-compose-external-type
+ "\C-c\C-o" #'mh-open-line
+ "\C-c\C-q" #'mh-fully-kill-draft
+ "\C-c\C-s" #'mh-insert-signature
+ "\C-c\C-t" #'mh-letter-toggle-header-field-display
+ "\C-c\C-w" #'mh-check-whom
+ "\C-c\C-y" #'mh-yank-cur-msg
+ "\C-c\M-d" #'mh-insert-auto-fields
+ "\M-\t" #'mh-letter-complete
+ "\t" #'mh-letter-next-header-field-or-indent
+ [backtab] #'mh-letter-previous-header-field)
;; "C-c /" prefix is used in mh-letter-mode by pgp.el and mailcrypt.el.
diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el
index d84af791f9a..49a2c00130c 100644
--- a/lisp/mh-e/mh-search.el
+++ b/lisp/mh-e/mh-search.el
@@ -42,6 +42,7 @@
;;; Code:
(require 'mh-e)
+(require 'mh-letter)
(require 'gnus-util)
(require 'imenu)
@@ -548,20 +549,20 @@ group of results."
;;; MH-Search Keys
;; If this changes, modify mh-search-mode-help-messages accordingly, below.
-(gnus-define-keys mh-search-mode-map
- "\C-c?" mh-help
- "\C-c\C-c" mh-index-do-search
- "\C-c\C-p" mh-pick-do-search
- "\C-c\C-f\C-b" mh-to-field
- "\C-c\C-f\C-c" mh-to-field
- "\C-c\C-f\C-m" mh-to-field
- "\C-c\C-f\C-s" mh-to-field
- "\C-c\C-f\C-t" mh-to-field
- "\C-c\C-fb" mh-to-field
- "\C-c\C-fc" mh-to-field
- "\C-c\C-fm" mh-to-field
- "\C-c\C-fs" mh-to-field
- "\C-c\C-ft" mh-to-field)
+(define-keymap :keymap mh-search-mode-map
+ "\C-c?" #'mh-help
+ "\C-c\C-c" #'mh-index-do-search
+ "\C-c\C-p" #'mh-pick-do-search
+ "\C-c\C-f\C-b" #'mh-to-field
+ "\C-c\C-f\C-c" #'mh-to-field
+ "\C-c\C-f\C-m" #'mh-to-field
+ "\C-c\C-f\C-s" #'mh-to-field
+ "\C-c\C-f\C-t" #'mh-to-field
+ "\C-c\C-fb" #'mh-to-field
+ "\C-c\C-fc" #'mh-to-field
+ "\C-c\C-fm" #'mh-to-field
+ "\C-c\C-fs" #'mh-to-field
+ "\C-c\C-ft" #'mh-to-field)
diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el
index 9dfce215e47..eb073ce15b1 100644
--- a/lisp/mh-e/mh-show.el
+++ b/lisp/mh-e/mh-show.el
@@ -562,132 +562,132 @@ still visible.\n")
;;; MH-Show Keys
-(gnus-define-keys mh-show-mode-map
- " " mh-show-page-msg
- "!" mh-show-refile-or-write-again
- "'" mh-show-toggle-tick
- "," mh-show-header-display
- "." mh-show-show
- ":" mh-show-show-preferred-alternative
- ">" mh-show-write-message-to-file
- "?" mh-help
- "E" mh-show-extract-rejected-mail
- "M" mh-show-modify
- "\177" mh-show-previous-page
- "\C-d" mh-show-delete-msg-no-motion
- "\t" mh-show-next-button
- [backtab] mh-show-prev-button
- "\M-\t" mh-show-prev-button
- "\ed" mh-show-redistribute
- "^" mh-show-refile-msg
- "c" mh-show-copy-msg
- "d" mh-show-delete-msg
- "e" mh-show-edit-again
- "f" mh-show-forward
- "g" mh-show-goto-msg
- "i" mh-show-inc-folder
- "k" mh-show-delete-subject-or-thread
- "m" mh-show-send
- "n" mh-show-next-undeleted-msg
- "\M-n" mh-show-next-unread-msg
- "o" mh-show-refile-msg
- "p" mh-show-previous-undeleted-msg
- "\M-p" mh-show-previous-unread-msg
- "q" mh-show-quit
- "r" mh-show-reply
- "s" mh-show-send
- "t" mh-show-toggle-showing
- "u" mh-show-undo
- "x" mh-show-execute-commands
- "v" mh-show-index-visit-folder
- "|" mh-show-pipe-msg)
-
-(gnus-define-keys (mh-show-folder-map "F" mh-show-mode-map)
- "?" mh-prefix-help
- "'" mh-index-ticked-messages
- "S" mh-show-sort-folder
- "c" mh-show-catchup
- "f" mh-show-visit-folder
- "k" mh-show-kill-folder
- "l" mh-show-list-folders
- "n" mh-index-new-messages
- "o" mh-show-visit-folder
- "p" mh-show-pack-folder
- "q" mh-show-index-sequenced-messages
- "r" mh-show-rescan-folder
- "s" mh-search
- "t" mh-show-toggle-threads
- "u" mh-show-undo-folder
- "v" mh-show-visit-folder)
-
-(gnus-define-keys (mh-show-sequence-map "S" mh-show-mode-map)
- "'" mh-show-narrow-to-tick
- "?" mh-prefix-help
- "d" mh-show-delete-msg-from-seq
- "k" mh-show-delete-seq
- "l" mh-show-list-sequences
- "n" mh-show-narrow-to-seq
- "p" mh-show-put-msg-in-seq
- "s" mh-show-msg-is-in-seq
- "w" mh-show-widen)
-
-(define-key mh-show-mode-map "I" mh-inc-spool-map)
-
-(gnus-define-keys (mh-show-junk-map "J" mh-show-mode-map)
- "?" mh-prefix-help
- "a" mh-show-junk-allowlist
- "b" mh-show-junk-blocklist
- "w" mh-show-junk-whitelist)
-
-(gnus-define-keys (mh-show-ps-print-map "P" mh-show-mode-map)
- "?" mh-prefix-help
- "C" mh-show-ps-print-toggle-color
- "F" mh-show-ps-print-toggle-faces
- "f" mh-show-ps-print-msg-file
- "l" mh-show-print-msg
- "p" mh-show-ps-print-msg)
-
-(gnus-define-keys (mh-show-thread-map "T" mh-show-mode-map)
- "?" mh-prefix-help
- "u" mh-show-thread-ancestor
- "p" mh-show-thread-previous-sibling
- "n" mh-show-thread-next-sibling
- "t" mh-show-toggle-threads
- "d" mh-show-thread-delete
- "o" mh-show-thread-refile)
-
-(gnus-define-keys (mh-show-limit-map "/" mh-show-mode-map)
- "'" mh-show-narrow-to-tick
- "?" mh-prefix-help
- "c" mh-show-narrow-to-cc
- "g" mh-show-narrow-to-range
- "m" mh-show-narrow-to-from
- "s" mh-show-narrow-to-subject
- "t" mh-show-narrow-to-to
- "w" mh-show-widen)
-
-(gnus-define-keys (mh-show-extract-map "X" mh-show-mode-map)
- "?" mh-prefix-help
- "s" mh-show-store-msg
- "u" mh-show-store-msg)
-
-(gnus-define-keys (mh-show-digest-map "D" mh-show-mode-map)
- "?" mh-prefix-help
- " " mh-show-page-digest
- "\177" mh-show-page-digest-backwards
- "b" mh-show-burst-digest)
-
-(gnus-define-keys (mh-show-mime-map "K" mh-show-mode-map)
- "?" mh-prefix-help
- "a" mh-mime-save-parts
- "e" mh-show-display-with-external-viewer
- "v" mh-show-toggle-mime-part
- "o" mh-show-save-mime-part
- "i" mh-show-inline-mime-part
- "t" mh-show-toggle-mime-buttons
- "\t" mh-show-next-button
- [backtab] mh-show-prev-button
- "\M-\t" mh-show-prev-button)
+(define-keymap :keymap mh-show-mode-map
+ " " #'mh-show-page-msg
+ "!" #'mh-show-refile-or-write-again
+ "'" #'mh-show-toggle-tick
+ "," #'mh-show-header-display
+ "." #'mh-show-show
+ ":" #'mh-show-show-preferred-alternative
+ ">" #'mh-show-write-message-to-file
+ "?" #'mh-help
+ "E" #'mh-show-extract-rejected-mail
+ "M" #'mh-show-modify
+ "\177" #'mh-show-previous-page
+ "\C-d" #'mh-show-delete-msg-no-motion
+ "\t" #'mh-show-next-button
+ [backtab] #'mh-show-prev-button
+ "\M-\t" #'mh-show-prev-button
+ "\ed" #'mh-show-redistribute
+ "^" #'mh-show-refile-msg
+ "c" #'mh-show-copy-msg
+ "d" #'mh-show-delete-msg
+ "e" #'mh-show-edit-again
+ "f" #'mh-show-forward
+ "g" #'mh-show-goto-msg
+ "i" #'mh-show-inc-folder
+ "k" #'mh-show-delete-subject-or-thread
+ "m" #'mh-show-send
+ "n" #'mh-show-next-undeleted-msg
+ "\M-n" #'mh-show-next-unread-msg
+ "o" #'mh-show-refile-msg
+ "p" #'mh-show-previous-undeleted-msg
+ "\M-p" #'mh-show-previous-unread-msg
+ "q" #'mh-show-quit
+ "r" #'mh-show-reply
+ "s" #'mh-show-send
+ "t" #'mh-show-toggle-showing
+ "u" #'mh-show-undo
+ "x" #'mh-show-execute-commands
+ "v" #'mh-show-index-visit-folder
+ "|" #'mh-show-pipe-msg
+
+ "F" (define-keymap :prefix 'mh-show-folder-map
+ "?" #'mh-prefix-help
+ "'" #'mh-index-ticked-messages
+ "S" #'mh-show-sort-folder
+ "c" #'mh-show-catchup
+ "f" #'mh-show-visit-folder
+ "k" #'mh-show-kill-folder
+ "l" #'mh-show-list-folders
+ "n" #'mh-index-new-messages
+ "o" #'mh-show-visit-folder
+ "p" #'mh-show-pack-folder
+ "q" #'mh-show-index-sequenced-messages
+ "r" #'mh-show-rescan-folder
+ "s" #'mh-search
+ "t" #'mh-show-toggle-threads
+ "u" #'mh-show-undo-folder
+ "v" #'mh-show-visit-folder)
+
+ "S" (define-keymap :prefix 'mh-show-sequence-map
+ "'" #'mh-show-narrow-to-tick
+ "?" #'mh-prefix-help
+ "d" #'mh-show-delete-msg-from-seq
+ "k" #'mh-show-delete-seq
+ "l" #'mh-show-list-sequences
+ "n" #'mh-show-narrow-to-seq
+ "p" #'mh-show-put-msg-in-seq
+ "s" #'mh-show-msg-is-in-seq
+ "w" #'mh-show-widen)
+
+ "I" mh-inc-spool-map
+
+ "J" (define-keymap :prefix 'mh-show-junk-map
+ "?" #'mh-prefix-help
+ "a" #'mh-show-junk-allowlist
+ "b" #'mh-show-junk-blocklist
+ "w" #'mh-show-junk-allowlist)
+
+ "P" (define-keymap :prefix 'mh-show-ps-print-map
+ "?" #'mh-prefix-help
+ "C" #'mh-show-ps-print-toggle-color
+ "F" #'mh-show-ps-print-toggle-faces
+ "f" #'mh-show-ps-print-msg-file
+ "l" #'mh-show-print-msg
+ "p" #'mh-show-ps-print-msg)
+
+ "T" (define-keymap :prefix 'mh-show-thread-map
+ "?" #'mh-prefix-help
+ "u" #'mh-show-thread-ancestor
+ "p" #'mh-show-thread-previous-sibling
+ "n" #'mh-show-thread-next-sibling
+ "t" #'mh-show-toggle-threads
+ "d" #'mh-show-thread-delete
+ "o" #'mh-show-thread-refile)
+
+ "/" (define-keymap :prefix 'mh-show-limit-map
+ "'" #'mh-show-narrow-to-tick
+ "?" #'mh-prefix-help
+ "c" #'mh-show-narrow-to-cc
+ "g" #'mh-show-narrow-to-range
+ "m" #'mh-show-narrow-to-from
+ "s" #'mh-show-narrow-to-subject
+ "t" #'mh-show-narrow-to-to
+ "w" #'mh-show-widen)
+
+ "X" (define-keymap :prefix 'mh-show-extract-map
+ "?" #'mh-prefix-help
+ "s" #'mh-show-store-msg
+ "u" #'mh-show-store-msg)
+
+ "D" (define-keymap :prefix 'mh-show-digest-map
+ "?" #'mh-prefix-help
+ " " #'mh-show-page-digest
+ "\177" #'mh-show-page-digest-backwards
+ "b" #'mh-show-burst-digest)
+
+ "K" (define-keymap :prefix 'mh-show-mime-map
+ "?" #'mh-prefix-help
+ "a" #'mh-mime-save-parts
+ "e" #'mh-show-display-with-external-viewer
+ "v" #'mh-show-toggle-mime-part
+ "o" #'mh-show-save-mime-part
+ "i" #'mh-show-inline-mime-part
+ "t" #'mh-show-toggle-mime-buttons
+ "\t" #'mh-show-next-button
+ [backtab] #'mh-show-prev-button
+ "\M-\t" #'mh-show-prev-button))
diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el
index 76ef990d825..712d6769844 100644
--- a/lisp/mh-e/mh-speed.el
+++ b/lisp/mh-e/mh-speed.el
@@ -83,11 +83,11 @@
(defvar mh-folder-speedbar-key-map (speedbar-make-specialized-keymap)
"Specialized speedbar keymap for MH-E buffers.")
-(gnus-define-keys mh-folder-speedbar-key-map
- "+" mh-speed-expand-folder
- "-" mh-speed-contract-folder
- "\r" mh-speed-view
- "r" mh-speed-refresh)
+(define-keymap :keymap mh-folder-speedbar-key-map
+ "+" #'mh-speed-expand-folder
+ "-" #'mh-speed-contract-folder
+ "\r" #'mh-speed-view
+ "r" #'mh-speed-refresh)
(defvar mh-show-speedbar-key-map mh-folder-speedbar-key-map)
(defvar mh-letter-speedbar-key-map mh-folder-speedbar-key-map)