mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-26 10:49:33 +00:00
Prefer defvar-keymap in lisp/epa*.el
* lisp/epa-ks.el (epa-ks-search-mode-map): * lisp/epa.el (epa-key-list-mode-map, epa-key-mode-map): Prefer defvar-keymap.
This commit is contained in:
parent
a139748e54
commit
cbbecd46fd
@ -66,14 +66,12 @@ This is used by `epa-ks-lookup-key', for looking up public keys."
|
||||
"List of arguments to pass to `epa-search-keys'.
|
||||
This is used when reverting a buffer to restart search.")
|
||||
|
||||
(defvar epa-ks-search-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(suppress-keymap map)
|
||||
(define-key map (kbd "f") #'epa-ks-mark-key-to-fetch)
|
||||
(define-key map (kbd "i") #'epa-ks-inspect-key-to-fetch)
|
||||
(define-key map (kbd "u") #'epa-ks-unmark-key-to-fetch)
|
||||
(define-key map (kbd "x") #'epa-ks-do-key-to-fetch)
|
||||
map))
|
||||
(defvar-keymap epa-ks-search-mode-map
|
||||
:suppress t
|
||||
"f" #'epa-ks-mark-key-to-fetch
|
||||
"i" #'epa-ks-inspect-key-to-fetch
|
||||
"u" #'epa-ks-unmark-key-to-fetch
|
||||
"x" #'epa-ks-do-key-to-fetch)
|
||||
|
||||
(define-derived-mode epa-ks-search-mode tabulated-list-mode "Keyserver"
|
||||
"Major mode for listing public key search results."
|
||||
|
48
lisp/epa.el
48
lisp/epa.el
@ -183,28 +183,26 @@ You should bind this variable with `let', but do not set it globally.")
|
||||
(defvar epa-suppress-error-buffer nil)
|
||||
(defvar epa-last-coding-system-specified nil)
|
||||
|
||||
(defvar epa-key-list-mode-map
|
||||
(let ((keymap (make-sparse-keymap)))
|
||||
(define-key keymap "\C-m" 'epa-show-key)
|
||||
(define-key keymap [?\t] 'forward-button)
|
||||
(define-key keymap [backtab] 'backward-button)
|
||||
(define-key keymap "m" 'epa-mark-key)
|
||||
(define-key keymap "u" 'epa-unmark-key)
|
||||
(define-key keymap "d" 'epa-decrypt-file)
|
||||
(define-key keymap "v" 'epa-verify-file)
|
||||
(define-key keymap "s" 'epa-sign-file)
|
||||
(define-key keymap "e" 'epa-encrypt-file)
|
||||
(define-key keymap "r" 'epa-delete-keys)
|
||||
(define-key keymap "i" 'epa-import-keys)
|
||||
(define-key keymap "o" 'epa-export-keys)
|
||||
(define-key keymap "g" 'revert-buffer)
|
||||
(define-key keymap "n" 'next-line)
|
||||
(define-key keymap "p" 'previous-line)
|
||||
(define-key keymap " " 'scroll-up-command)
|
||||
(define-key keymap [?\S-\ ] 'scroll-down-command)
|
||||
(define-key keymap [delete] 'scroll-down-command)
|
||||
(define-key keymap "q" 'epa-exit-buffer)
|
||||
keymap))
|
||||
(defvar-keymap epa-key-list-mode-map
|
||||
"RET" #'epa-show-key
|
||||
"TAB" #'forward-button
|
||||
"<backtab>" #'backward-button
|
||||
"m" #'epa-mark-key
|
||||
"u" #'epa-unmark-key
|
||||
"d" #'epa-decrypt-file
|
||||
"v" #'epa-verify-file
|
||||
"s" #'epa-sign-file
|
||||
"e" #'epa-encrypt-file
|
||||
"r" #'epa-delete-keys
|
||||
"i" #'epa-import-keys
|
||||
"o" #'epa-export-keys
|
||||
"g" #'revert-buffer
|
||||
"n" #'next-line
|
||||
"p" #'previous-line
|
||||
"SPC" #'scroll-up-command
|
||||
"S-SPC" #'scroll-down-command
|
||||
"<delete>" #'scroll-down-command
|
||||
"q" #'epa-exit-buffer)
|
||||
|
||||
(easy-menu-define epa-key-list-mode-menu epa-key-list-mode-map
|
||||
"Menu for `epa-key-list-mode'."
|
||||
@ -230,10 +228,8 @@ You should bind this variable with `let', but do not set it globally.")
|
||||
["Unmark Key" epa-unmark-key
|
||||
:help "Unmark a key"]))
|
||||
|
||||
(defvar epa-key-mode-map
|
||||
(let ((keymap (make-sparse-keymap)))
|
||||
(define-key keymap "q" 'epa-exit-buffer)
|
||||
keymap))
|
||||
(defvar-keymap epa-key-mode-map
|
||||
"q" #'epa-exit-buffer)
|
||||
|
||||
(defvar epa-exit-buffer-function #'quit-window)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user