Mercurial > emacs
diff lisp/gnus/smime.el @ 111501:5b30cfe2d392
Make mm-dissect-buffer pass sender's mail address to smime-decrypt-region.
mm-decode.el (mm-dissect-buffer): Pass sender's mail address to smime-decrypt-region using function argument.
mm-decode.el (mm-possibly-verify-or-decrypt, mm-dissect-multipart): Relay it.
mm-view.el (mm-view-pkcs7, mm-view-pkcs7-decrypt): Relay it.
smime.el (smime-decrypt-region): Catch it.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Thu, 11 Nov 2010 23:51:05 +0000 |
parents | 300c16876a2f |
children | 517aef519a81 |
line wrap: on
line diff
--- a/lisp/gnus/smime.el Thu Nov 11 17:24:03 2010 -0500 +++ b/lisp/gnus/smime.el Thu Nov 11 23:51:05 2010 +0000 @@ -426,11 +426,7 @@ (insert-buffer-substring smime-details-buffer) nil)) -;; TODO: fix this properly by giving it a prefix. -(if (featurep 'xemacs) - (defvar from)) - -(defun smime-decrypt-region (b e keyfile) +(defun smime-decrypt-region (b e keyfile &optional from) "Decrypt S/MIME message in region between B and E with key in KEYFILE. On success, replaces region with decrypted data and return non-nil. Any details (stderr on success, stdout and stderr on error) are left @@ -454,8 +450,7 @@ (delete-file tmpfile))) (progn (delete-region b e) - (when (boundp 'from) - ;; `from' is dynamically bound in mm-dissect. + (when from (insert "From: " from "\n")) (insert-buffer-substring buffer) (kill-buffer buffer)