]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't use mm-with-unibyte-current-buffer in mml2015
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 12 Feb 2016 04:57:13 +0000 (15:57 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 12 Feb 2016 04:57:13 +0000 (15:57 +1100)
* lisp/gnus/mml2015.el (mml2015-mailcrypt-encrypt): Don't use
mm-with-unibyte-current-buffer.

lisp/gnus/mml2015.el

index 60fddedf899a5847af68ada0fcc96be5b7fe7bb9..ca9b3777c35948475c165674c895d77310a65647 100644 (file)
@@ -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"))