From 2ffc32f50543fcd866b9dd97c28f964492835bb9 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 12 Feb 2016 15:57:13 +1100 Subject: [PATCH] Don't use mm-with-unibyte-current-buffer in mml2015 * lisp/gnus/mml2015.el (mml2015-mailcrypt-encrypt): Don't use mm-with-unibyte-current-buffer. --- lisp/gnus/mml2015.el | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el index 60fddedf899..ca9b3777c35 100644 --- a/lisp/gnus/mml2015.el +++ b/lisp/gnus/mml2015.el @@ -487,14 +487,17 @@ If set, it overrides the setting of `mml2015-sign-with-sender'." (or (y-or-n-p "Sign the message? ") 'not)))) 'never))) - (mm-with-unibyte-current-buffer - (mc-encrypt-generic - (or (message-options-get 'message-recipients) - (message-options-set 'message-recipients - (mc-cleanup-recipient-headers - (read-string "Recipients: ")))) - nil nil nil - (message-options-get 'message-sender)))) + (insert + (with-temp-buffer + (set-buffer-multibyte nil) + (mc-encrypt-generic + (or (message-options-get 'message-recipients) + (message-options-set 'message-recipients + (mc-cleanup-recipient-headers + (read-string "Recipients: ")))) + nil nil nil + (message-options-get 'message-sender)) + (buffer-string)))) (goto-char (point-min)) (unless (looking-at "-----BEGIN PGP MESSAGE-----") (error "Fail to encrypt the message")) -- 2.39.2