changeset 111181:6585f38b9f1d

Make epa-mail-encrypt handle local-part only recipients. * epa-mail.el (epa-mail-encrypt): Handle local-part only recipients (Bug#7280).
author Daiki Ueno <ueno@unixuser.org>
date Tue, 26 Oct 2010 10:02:08 +0900
parents 2009890b5ebf
children d6dad5b04eb8
files lisp/ChangeLog lisp/epa-mail.el
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Oct 25 22:02:00 2010 +0000
+++ b/lisp/ChangeLog	Tue Oct 26 10:02:08 2010 +0900
@@ -1,3 +1,8 @@
+2010-10-26  Daiki Ueno  <ueno@unixuser.org>
+
+	* epa-mail.el (epa-mail-encrypt): Handle local-part only
+	recipients (Bug#7280).
+
 2010-10-25  Glenn Morris  <rgm@gnu.org>
 
 	* term/common-win.el (x-handle-switch): Simplify with pop.
--- a/lisp/epa-mail.el	Mon Oct 25 22:02:00 2010 +0000
+++ b/lisp/epa-mail.el	Tue Oct 26 10:02:08 2010 +0900
@@ -154,7 +154,9 @@
 			    (epa-mail--find-usable-key
 			     (epg-list-keys
 			      (epg-make-context epa-protocol)
-			      (concat "<" recipient ">"))
+			      (if (string-match "@" recipient)
+				  (concat "<" recipient ">")
+				recipient))
 			     'encrypt))
 		      (unless (or recipient-key
 				  (y-or-n-p