From f6b5adc914b9c6fd4f3fc796d05834d074a3ba63 Mon Sep 17 00:00:00 2001 From: ueno Date: Sat, 24 Mar 2007 09:35:00 +0000 Subject: [PATCH] * epa.el (epa-key-list-mode-map): Bind revert-buffer instead of epa-list-keys. (epa-key-list-mode): Set revert-buffer-function to epa--revert-buffer. (epa--revert-buffer): New function. --- ChangeLog | 4 ++++ epa.el | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index a11bcfe..c9d58c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ * epa.el (epa-select-keys): Simplified; don't select the first matching key. + (epa-key-list-mode-map): Bind revert-buffer instead of + epa-list-keys. + (epa-key-list-mode): Set revert-buffer-function to epa--revert-buffer. + (epa--revert-buffer): New function. * epg.el (epg--list-keys-1): Accept a list of strings as NAME argument. diff --git a/epa.el b/epa.el index 45f1959..e8bb328 100644 --- a/epa.el +++ b/epa.el @@ -186,6 +186,7 @@ the separate window." (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) @@ -268,6 +269,8 @@ the separate window." ;; if buffer-file-name is not set. (font-lock-set-defaults) (make-local-variable 'epa-exit-buffer-function) + (make-local-variable 'revert-buffer-function) + (setq revert-buffer-function 'epa--revert-buffer) (run-hooks 'epa-key-list-mode-hook)) (defun epa-key-mode () @@ -403,6 +406,9 @@ If ARG is non-nil, mark the current line." (list nil))) (epa--list-keys name t)) +(defun epa--revert-buffer () + (epa--list-keys epa-list-keys-arguments)) + (defun epa--marked-keys () (or (save-excursion (set-buffer epa-keys-buffer) -- 1.7.10.4