From 69de3ec61f1d6b2cea9d614c8f273dd01cc8bf64 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 17 Sep 2012 05:49:55 -0400 Subject: Fix bug when a name has no key. --- lisp/epa-mail.el | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) (limited to 'lisp/epa-mail.el') diff --git a/lisp/epa-mail.el b/lisp/epa-mail.el index be5b849651c..a16fa5abdd4 100644 --- a/lisp/epa-mail.el +++ b/lisp/epa-mail.el @@ -170,24 +170,26 @@ Don't use this command in Lisp programs!" If no one is selected, symmetric encryption will be performed. " recipients) (if recipients - (mapcar - (lambda (recipient) - (setq recipient-key - (epa-mail--find-usable-key - (epg-list-keys - (epg-make-context epa-protocol) - (if (string-match "@" recipient) - (concat "<" recipient ">") - recipient)) - 'encrypt)) - (unless (or recipient-key - (y-or-n-p - (format - "No public key for %s; skip it? " - recipient))) - (error "No public key for %s" recipient)) - recipient-key) - recipients))) + (apply + 'nconc + (mapcar + (lambda (recipient) + (setq recipient-key + (epa-mail--find-usable-key + (epg-list-keys + (epg-make-context epa-protocol) + (if (string-match "@" recipient) + (concat "<" recipient ">") + recipient)) + 'encrypt)) + (unless (or recipient-key + (y-or-n-p + (format + "No public key for %s; skip it? " + recipient))) + (error "No public key for %s" recipient)) + (if recipient-key (list recipient-key))) + recipients)))) (setq sign (if verbose (y-or-n-p "Sign? "))) (if sign (epa-select-keys context -- cgit v1.2.1