* pgg-gpg.el, pgg-pgp.el, pgg-pgp5.el (encrypt-region): Add
authorueno <ueno>
Sat, 6 Nov 1999 18:47:42 +0000 (18:47 +0000)
committerueno <ueno>
Sat, 6 Nov 1999 18:47:42 +0000 (18:47 +0000)
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.

pgg-def.el
pgg-gpg.el
pgg-pgp.el
pgg-pgp5.el

index 8473f43..ea956c8 100644 (file)
   :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*")
index 6f10611..60493bd 100644 (file)
                         (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)
       )
index 448fd30..1a5e7b8 100644 (file)
            "+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)
index 4ca4b16..3252be2 100644 (file)
                         (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)