From: Lars Ingebrigtsen Date: Fri, 12 Feb 2016 04:57:13 +0000 (+1100) Subject: Don't use mm-with-unibyte-current-buffer in mml2015 X-Git-Tag: emacs-26.0.90~2627 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2ffc32f50543fcd866b9dd97c28f964492835bb9;p=emacs.git 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. --- 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"))