From: ueno Date: Wed, 26 Apr 2006 01:46:50 +0000 (+0000) Subject: * epa.el (epa-select-keys): Don't set inhibit-quit when X-Git-Tag: epg-0_0_1~18 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6415ee8bae42edf6dc5dde5c1de257d8584b6856;p=elisp%2Fepg.git * epa.el (epa-select-keys): Don't set inhibit-quit when recursive-edit is called. --- diff --git a/ChangeLog b/ChangeLog index fcd9e65..2b43d8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-04-26 Daiki Ueno + + * epa.el (epa-select-keys): Don't set inhibit-quit when + recursive-edit is called. + 2006-04-25 Daiki Ueno * epg.el (epg-process-sentinel): New function; set 'error if gpg diff --git a/epa.el b/epa.el index c4f8700..01a290d 100644 --- a/epa.el +++ b/epa.el @@ -313,7 +313,13 @@ (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)) @@ -340,23 +346,23 @@ (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)))