mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-13 16:38:14 +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'.
|
"List of arguments to pass to `epa-search-keys'.
|
||||||
This is used when reverting a buffer to restart search.")
|
This is used when reverting a buffer to restart search.")
|
||||||
|
|
||||||
(defvar epa-ks-search-mode-map
|
(defvar-keymap epa-ks-search-mode-map
|
||||||
(let ((map (make-sparse-keymap)))
|
:suppress t
|
||||||
(suppress-keymap map)
|
"f" #'epa-ks-mark-key-to-fetch
|
||||||
(define-key map (kbd "f") #'epa-ks-mark-key-to-fetch)
|
"i" #'epa-ks-inspect-key-to-fetch
|
||||||
(define-key map (kbd "i") #'epa-ks-inspect-key-to-fetch)
|
"u" #'epa-ks-unmark-key-to-fetch
|
||||||
(define-key map (kbd "u") #'epa-ks-unmark-key-to-fetch)
|
"x" #'epa-ks-do-key-to-fetch)
|
||||||
(define-key map (kbd "x") #'epa-ks-do-key-to-fetch)
|
|
||||||
map))
|
|
||||||
|
|
||||||
(define-derived-mode epa-ks-search-mode tabulated-list-mode "Keyserver"
|
(define-derived-mode epa-ks-search-mode tabulated-list-mode "Keyserver"
|
||||||
"Major mode for listing public key search results."
|
"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-suppress-error-buffer nil)
|
||||||
(defvar epa-last-coding-system-specified nil)
|
(defvar epa-last-coding-system-specified nil)
|
||||||
|
|
||||||
(defvar epa-key-list-mode-map
|
(defvar-keymap epa-key-list-mode-map
|
||||||
(let ((keymap (make-sparse-keymap)))
|
"RET" #'epa-show-key
|
||||||
(define-key keymap "\C-m" 'epa-show-key)
|
"TAB" #'forward-button
|
||||||
(define-key keymap [?\t] 'forward-button)
|
"<backtab>" #'backward-button
|
||||||
(define-key keymap [backtab] 'backward-button)
|
"m" #'epa-mark-key
|
||||||
(define-key keymap "m" 'epa-mark-key)
|
"u" #'epa-unmark-key
|
||||||
(define-key keymap "u" 'epa-unmark-key)
|
"d" #'epa-decrypt-file
|
||||||
(define-key keymap "d" 'epa-decrypt-file)
|
"v" #'epa-verify-file
|
||||||
(define-key keymap "v" 'epa-verify-file)
|
"s" #'epa-sign-file
|
||||||
(define-key keymap "s" 'epa-sign-file)
|
"e" #'epa-encrypt-file
|
||||||
(define-key keymap "e" 'epa-encrypt-file)
|
"r" #'epa-delete-keys
|
||||||
(define-key keymap "r" 'epa-delete-keys)
|
"i" #'epa-import-keys
|
||||||
(define-key keymap "i" 'epa-import-keys)
|
"o" #'epa-export-keys
|
||||||
(define-key keymap "o" 'epa-export-keys)
|
"g" #'revert-buffer
|
||||||
(define-key keymap "g" 'revert-buffer)
|
"n" #'next-line
|
||||||
(define-key keymap "n" 'next-line)
|
"p" #'previous-line
|
||||||
(define-key keymap "p" 'previous-line)
|
"SPC" #'scroll-up-command
|
||||||
(define-key keymap " " 'scroll-up-command)
|
"S-SPC" #'scroll-down-command
|
||||||
(define-key keymap [?\S-\ ] 'scroll-down-command)
|
"<delete>" #'scroll-down-command
|
||||||
(define-key keymap [delete] 'scroll-down-command)
|
"q" #'epa-exit-buffer)
|
||||||
(define-key keymap "q" 'epa-exit-buffer)
|
|
||||||
keymap))
|
|
||||||
|
|
||||||
(easy-menu-define epa-key-list-mode-menu epa-key-list-mode-map
|
(easy-menu-define epa-key-list-mode-menu epa-key-list-mode-map
|
||||||
"Menu for `epa-key-list-mode'."
|
"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
|
["Unmark Key" epa-unmark-key
|
||||||
:help "Unmark a key"]))
|
:help "Unmark a key"]))
|
||||||
|
|
||||||
(defvar epa-key-mode-map
|
(defvar-keymap epa-key-mode-map
|
||||||
(let ((keymap (make-sparse-keymap)))
|
"q" #'epa-exit-buffer)
|
||||||
(define-key keymap "q" 'epa-exit-buffer)
|
|
||||||
keymap))
|
|
||||||
|
|
||||||
(defvar epa-exit-buffer-function #'quit-window)
|
(defvar epa-exit-buffer-function #'quit-window)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user