* epa.el (epa-select-keys): Don't set inhibit-quit when
authorueno <ueno>
Wed, 26 Apr 2006 01:46:50 +0000 (01:46 +0000)
committerueno <ueno>
Wed, 26 Apr 2006 01:46:50 +0000 (01:46 +0000)
recursive-edit is called.

ChangeLog
epa.el

index fcd9e65..2b43d8f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-04-26  Daiki Ueno  <ueno@unixuser.org>
+
+       * epa.el (epa-select-keys): Don't set inhibit-quit when
+       recursive-edit is called.
+
 2006-04-25  Daiki Ueno  <ueno@unixuser.org>
 
        * epg.el (epg-process-sentinel): New function; set 'error if gpg
diff --git a/epa.el b/epa.el
index c4f8700..01a290d 100644 (file)
--- a/epa.el
+++ b/epa.el
          (if key
              (list key))))))
 
-(defun epa-select-keys (context prompt &optional names mode)
+(defun epa-select-keys (context prompt &optional names secret)
+  "Display a user's keyring and ask him to select keys.
+CONTEXT is an epg-context.
+PROMPT is a string to prompt with.
+NAMES is a list of strings to be matched with keys.  If it is nil, all
+the keys are listed.
+If SECRET is non-nil, list secret keys instead of public keys."
   (save-excursion
     (unless (and epa-keys-buffer
                 (buffer-live-p epa-keys-buffer))
       (if names
          (while names
            (setq point (point))
-           (epa-list-keys-1 context (car names) mode)
+           (epa-list-keys-1 context (car names) secret)
            (goto-char point)
            (epa-mark)
            (goto-char (point-max))
            (setq names (cdr names)))
-       (epa-list-keys-1 context nil mode))
+       (epa-list-keys-1 context nil secret))
       (epa-keys-mode)
       (setq epa-exit-buffer-function #'abort-recursive-edit)
       (goto-char (point-min))
-      (pop-to-buffer (current-buffer))
-      (unwind-protect
+      (pop-to-buffer (current-buffer)))
+    (unwind-protect
          (progn
            (recursive-edit)
            (epa-marked-keys))
        (if (get-buffer-window epa-keys-buffer)
            (delete-window (get-buffer-window epa-keys-buffer)))
-       (kill-buffer epa-keys-buffer)))))
+       (kill-buffer epa-keys-buffer))))
 
 (defun epa-show-key (key)
   (let* ((primary-sub-key (car (epg-key-sub-key-list key)))