From: ueno Date: Sat, 6 Nov 1999 18:47:42 +0000 (+0000) Subject: * pgg-gpg.el, pgg-pgp.el, pgg-pgp5.el (encrypt-region): Add X-Git-Tag: emiko-1_13_7~37 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d8de713667456872b20cd30140df04899dec4af4;p=elisp%2Fsemi.git * pgg-gpg.el, pgg-pgp.el, pgg-pgp5.el (encrypt-region): Add sender's user id to the recipients list if `pgg-encrypt-for-me' is specified. * pgg-def.el (pgg-encrypt-for-me): New user option. --- diff --git a/pgg-def.el b/pgg-def.el index 8473f43..ea956c8 100644 --- a/pgg-def.el +++ b/pgg-def.el @@ -46,6 +46,11 @@ :group 'pgg :type 'string) +(defcustom pgg-encrypt-for-me nil + "Encrypt all outgoing messages with user's public key." + :group 'pgg + :type 'boolean) + (defvar pgg-status-buffer " *PGG status*") (defvar pgg-errors-buffer " *PGG errors*") (defvar pgg-output-buffer " *PGG output*") diff --git a/pgg-gpg.el b/pgg-gpg.el index 6f10611..60493bd 100644 --- a/pgg-gpg.el +++ b/pgg-gpg.el @@ -157,7 +157,10 @@ (mapcar (lambda (rcpt) (list "--remote-user" (concat "\"" rcpt "\""))) - recipients)))))) + (append recipients + (if pgg-encrypt-for-me + (list pgg-gpg-user-id))))))) + )) (pgg-as-lbt start end 'CRLF (pgg-gpg-process-region start end nil pgg-gpg-program args) ) diff --git a/pgg-pgp.el b/pgg-pgp.el index 448fd30..1a5e7b8 100644 --- a/pgg-pgp.el +++ b/pgg-pgp.el @@ -147,7 +147,10 @@ "+language=us" "-fate" ,@(if recipients (mapcar (lambda (rcpt) (concat "\"" rcpt "\"")) - recipients))))) + (append recipients + (if pgg-encrypt-for-me + (list pgg-pgp-user-id)))))) + )) (pgg-pgp-process-region start end nil pgg-pgp-program args) (pgg-process-when-success nil) diff --git a/pgg-pgp5.el b/pgg-pgp5.el index 4ca4b16..3252be2 100644 --- a/pgg-pgp5.el +++ b/pgg-pgp5.el @@ -160,7 +160,10 @@ (mapcar (lambda (rcpt) (list "-r" (concat "\"" rcpt "\""))) - recipients)))))) + (append recipients + (if pgg-encrypt-for-me + (list pgg-pgp5-user-id))))))) + )) (pgg-pgp5-process-region start end nil pgg-pgp5-pgpe-program args) (pgg-process-when-success nil)