From: ueno Date: Fri, 5 Jan 2007 00:28:23 +0000 (+0000) Subject: * epa.el (epa-encrypt-mail): Ask a user whether to skip a X-Git-Tag: epg-0_0_10~19 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca6ded8296b46a09a3de03e07a75414e72e3c315;p=elisp%2Fepg.git * epa.el (epa-encrypt-mail): Ask a user whether to skip a recipient whose public key is not available. --- diff --git a/ChangeLog b/ChangeLog index 25edac7..e4424b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-01-05 Daiki Ueno + + * epa.el (epa-encrypt-mail): Ask a user whether to skip a + recipient whose public key is not available. + 2007-01-04 Daiki Ueno * epa.el (epa-decrypt-mail): Renamed from epa-decrypt. diff --git a/epa.el b/epa.el index 579e9a3..d5d8298 100644 --- a/epa.el +++ b/epa.el @@ -1050,7 +1050,7 @@ Don't use this command in Lisp programs!" (save-excursion (let ((verbose current-prefix-arg) (context (epg-make-context epa-protocol)) - recipients) + recipients recipient-keys) (goto-char (point-min)) (when (epa--mail-mode-p) (save-restriction @@ -1082,14 +1082,21 @@ Don't use this command in Lisp programs!" If no one is selected, symmetric encryption will be performed. " recipients) (if recipients - (delq nil - (apply #'nconc - (mapcar - (lambda (recipient) + (apply #'nconc + (mapcar + (lambda (recipient) + (setq recipient-keys (epg-list-keys (epg-make-context epa-protocol) (concat "<" recipient ">"))) - recipients))))) + (unless (or recipient-keys + (y-or-n-p + (format + "No public key for %s; skip it? " + recipient))) + (error "No public key for %s" recipient)) + recipient-keys) + recipients)))) (setq sign (if verbose (y-or-n-p "Sign? "))) (if sign (epa-select-keys context