]> 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:52:43 +0000 (15:52 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 12 Feb 2016 04:52:43 +0000 (15:52 +1100)
* lisp/gnus/mml1991.el (mml1991-epg-sign): Don't use
mm-with-unibyte-current.

lisp/gnus/mml1991.el

index 6db81be05f33890e50d7e2d0fae8eee0fabbb69b..140f7201d80195bddb48d4460e13f79afb8428b0 100644 (file)
@@ -283,17 +283,20 @@ Whether the passphrase is cached at all is controlled by
     (let* ((pair (mml-secure-epg-sign 'OpenPGP 'clear))
           (signature (car pair)))
       (delete-region (point-min) (point-max))
-      (mm-with-unibyte-current-buffer
-       (insert signature)
-       (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 signature)
+        (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-epg-encrypt (cont &optional sign)