changeset 70338:f5a6154fa9f2

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-257 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 98) - Update from CVS
author Miles Bader <miles@gnu.org>
date Tue, 02 May 2006 05:25:20 +0000
parents 75313660a170
children 24d59f7263b8
files lisp/gnus/ChangeLog lisp/gnus/mm-uu.el lisp/gnus/mml2015.el
diffstat 3 files changed, 22 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Tue May 02 01:47:57 2006 +0000
+++ b/lisp/gnus/ChangeLog	Tue May 02 05:25:20 2006 +0000
@@ -1,3 +1,11 @@
+2006-04-28  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mm-uu.el (mm-uu-pgp-encrypted-extract-1): Assume buffer is made
+	unibyte after clear-decrypt function runs.
+
+	* mml2015.el (mml2015-pgg-clear-decrypt): Treat data which pgg
+	returns as a unibyte string.
+
 2006-04-27  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* lpath.el: Don't fbind string-as-multibyte for XEmacs.
--- a/lisp/gnus/mm-uu.el	Tue May 02 01:47:57 2006 +0000
+++ b/lisp/gnus/mm-uu.el	Tue May 02 05:25:20 2006 +0000
@@ -436,11 +436,18 @@
 			"OK")))
 	  (progn
 	    ;; Decode charset.
-	    (when (and (or charset
-			   (setq charset gnus-newsgroup-charset))
-		       (setq charset (mm-charset-to-coding-system charset))
-		       (not (eq charset 'ascii)))
-	      (mm-decode-coding-region (point-min) (point-max) charset))
+	    (if (and (or charset
+			 (setq charset gnus-newsgroup-charset))
+		     (setq charset (mm-charset-to-coding-system charset))
+		     (not (eq charset 'ascii)))
+		;; Assume that buffer's multibyteness is turned off.
+		;; See `mml2015-pgg-clear-decrypt'.
+		(insert (mm-decode-coding-string (prog1
+						     (buffer-string)
+						   (erase-buffer)
+						   (mm-enable-multibyte))
+						 charset))
+	      (mm-enable-multibyte))
 	    (list (mm-make-handle buf mm-uu-text-plain-type)))
 	(list (mm-make-handle buf '("application/pgp-encrypted")))))))
 
--- a/lisp/gnus/mml2015.el	Tue May 02 01:47:57 2006 +0000
+++ b/lisp/gnus/mml2015.el	Tue May 02 05:25:20 2006 +0000
@@ -707,6 +707,8 @@
 	     (buffer-string))))
 	(progn
 	  (erase-buffer)
+	  ;; Treat data which pgg returns as a unibyte string.
+	  (mm-disable-multibyte)
 	  (insert-buffer-substring pgg-output-buffer)
 	  (goto-char (point-min))
 	  (while (search-forward "\r\n" nil t)