2006-07-28 Daiki Ueno <ueno@unixuser.org>
+ * mml2015.el (mml2015-encrypt-to-self): New user option.
+ (mml2015-epg-encrypt): Append mml2015-signers to recipients list if
+ mml2015-epg-encrypt is set.
+
+ * mml1991.el (mml1991-encrypt-to-self): New variable.
+ (mml1991-epg-encrypt): Append mml1991-signers to recipients list if
+ mml1991-epg-encrypt is set.
+
* mml2015.el (mml2015-signers): New user option.
(mml2015-epg-sign): Reflect the value of mml2015-signers.
(mml2015-epg-encrypt): Allow to select signing keys.
`mml1991-cache-passphrase'.")
(defvar mml1991-signers nil
- "A list of key ID which will be used to sign a message.")
+ "A list of your own key ID which will be used to sign a message.")
+
+(defvar mml1991-encrypt-to-self nil
+ "If t, add your own key ID to recipient list when encryption.")
;;; mailcrypt wrapper
(split-string
(message-options-get 'message-recipients)
"[ \f\t\n\r\v,]+"))))
+ (if mml1991-encrypt-to-self
+ (setq recipients
+ (nconc recipients
+ (mapcar (lambda (name)
+ (car (epg-list-keys context name)))
+ mml1991-signers))))
(when sign
(if mml1991-verbose
(setq signers (epa-select-keys context "Select keys for signing.
:type 'integer)
(defcustom mml2015-signers nil
- "A list of key ID which will be used to sign a message."
+ "A list of your own key ID which will be used to sign a message."
:group 'mime-security
:type '(repeat (string :tag "Key ID")))
+(defcustom mml2015-encrypt-to-self nil
+ "If t, add your own key ID to recipient list when encryption."
+ :group 'mime-security
+ :type 'boolean)
+
;;; mailcrypt wrapper
(eval-and-compile
(split-string
(message-options-get 'message-recipients)
"[ \f\t\n\r\v,]+"))))
+ (if mml2015-encrypt-to-self
+ (setq recipients
+ (nconc recipients
+ (mapcar (lambda (name)
+ (car (epg-list-keys context name)))
+ mml2015-signers))))
(when sign
(if mml2015-verbose
(setq signers (epa-select-keys context "Select keys for signing.
If no one is selected, default secret key is used. "
- mml2015-signers t))
+ mml2015-signers t))
(setq signers (mapcar (lambda (name)
(car (epg-list-keys context name t)))
(or mml2015-signers