* epa.el (epa-key-list-mode-map): Bind revert-buffer instead of
authorueno <ueno>
Sat, 24 Mar 2007 09:35:00 +0000 (09:35 +0000)
committerueno <ueno>
Sat, 24 Mar 2007 09:35:00 +0000 (09:35 +0000)
epa-list-keys.
(epa-key-list-mode): Set revert-buffer-function to epa--revert-buffer.
(epa--revert-buffer): New function.

ChangeLog
epa.el

index a11bcfe..c9d58c1 100644 (file)
--- 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 (file)
--- 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)