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

lisp/gnus/mml1991.el

index bb5c940f1737242e007c5307527a4d5a9c9ec275..6db81be05f33890e50d7e2d0fae8eee0fabbb69b 100644 (file)
@@ -200,17 +200,20 @@ Whether the passphrase is cached at all is controlled by
       (pop-to-buffer pgg-errors-buffer)
       (error "Encrypt error"))
     (delete-region (point-min) (point-max))
-    (mm-with-unibyte-current-buffer
-      (insert-buffer-substring pgg-output-buffer)
-      (goto-char (point-min))
-      (while (re-search-forward "\r+$" nil t)
-       (replace-match "" t t))
-      (when cte
-       (mm-encode-content-transfer-encoding cte))
-      (goto-char (point-min))
-      (when headers
-       (insert headers))
-      (insert "\n"))
+    (insert
+     (with-temp-buffer
+       (set-buffer-multibyte nil)
+       (insert-buffer-substring pgg-output-buffer)
+       (goto-char (point-min))
+       (while (re-search-forward "\r+$" nil t)
+        (replace-match "" t t))
+       (when cte
+        (mm-encode-content-transfer-encoding cte))
+       (goto-char (point-min))
+       (when headers
+        (insert headers))
+       (insert "\n")
+       (buffer-string)))
     t))
 
 (defun mml1991-pgg-encrypt (cont &optional sign)