# HG changeset patch # User Katsumi Yamaoka # Date 1289948702 0 # Node ID 88b67190d0b297d4c6a804985e7277b9726b5d00 # Parent 8e4172d91b560029cddc9822628e917f0d4197d7 mml2015-epg-sign: Use From header. mml2015.el (mml2015-epg-sign): New variable 'sender' is (message-options-get 'message-sender) and append it to mml2015-signers. If mm-sign-option is not 'guided, mml2015-signers and sender sign the mail. diff -r 8e4172d91b56 -r 88b67190d0b2 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Tue Nov 16 16:47:43 2010 -0500 +++ b/lisp/gnus/ChangeLog Tue Nov 16 23:05:02 2010 +0000 @@ -1,3 +1,7 @@ +2010-11-16 Daniel Dehennin + + * mml2015.el (mml2015-epg-sign): Use From header. + 2010-11-15 Lars Magne Ingebrigtsen * gnus-html.el (gnus-html-wash-images): Register a displayer. diff -r 8e4172d91b56 -r 88b67190d0b2 lisp/gnus/mml2015.el --- a/lisp/gnus/mml2015.el Tue Nov 16 16:47:43 2010 -0500 +++ b/lisp/gnus/mml2015.el Tue Nov 16 23:05:02 2010 +0000 @@ -941,6 +941,7 @@ (let* ((inhibit-redisplay t) (context (epg-make-context)) (boundary (mml-compute-boundary cont)) + (sender (message-options-get 'message-sender)) signer-key (signers (or (message-options-get 'mml2015-epg-signers) @@ -950,8 +951,8 @@ (epa-select-keys context "\ Select keys for signing. If no one is selected, default secret key is used. " - mml2015-signers t) - (if mml2015-signers + (cons sender mml2015-signers) t) + (if (or sender mml2015-signers) (delq nil (mapcar (lambda (signer) @@ -965,7 +966,7 @@ signer))) (error "No secret key for %s" signer)) signer-key) - mml2015-signers))))))) + (cons sender mml2015-signers)))))))) signature micalg) (epg-context-set-armor context t) (epg-context-set-textmode context t) @@ -1008,6 +1009,7 @@ (let ((inhibit-redisplay t) (context (epg-make-context)) (config (epg-configuration)) + (sender (message-options-get 'message-sender)) (recipients (message-options-get 'mml2015-epg-recipients)) cipher signers (boundary (mml-compute-boundary cont)) @@ -1025,9 +1027,9 @@ (read-string "Recipients: "))) "[ \f\t\n\r\v,]+")))) (when mml2015-encrypt-to-self - (unless mml2015-signers - (error "mml2015-signers not set")) - (setq recipients (nconc recipients mml2015-signers))) + (unless (or sender mml2015-signers) + (error "Message sender and mml2015-signers not set")) + (setq recipients (nconc recipients (cons sender mml2015-signers)))) (if (eq mm-encrypt-option 'guided) (setq recipients (epa-select-keys context "\ @@ -1060,8 +1062,8 @@ (epa-select-keys context "\ Select keys for signing. If no one is selected, default secret key is used. " - mml2015-signers t) - (if mml2015-signers + (cons mml2015-signers) t) + (if (or sender mml2015-signers) (delq nil (mapcar (lambda (signer) @@ -1075,7 +1077,7 @@ signer))) (error "No secret key for %s" signer)) signer-key) - mml2015-signers))))))) + (cons mml2015-signers)))))))) (epg-context-set-signers context signers)) (epg-context-set-armor context t) (epg-context-set-textmode context t)