changeset 69949:d0312c3f2374

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 83) - Update from CVS
author Miles Bader <miles@gnu.org>
date Wed, 12 Apr 2006 05:23:27 +0000
parents 6b919f4beee5
children 4f5b486af1b5 24cf4bf418dc
files lisp/gnus/ChangeLog lisp/gnus/gnus-art.el lisp/gnus/gnus-uu.el lisp/gnus/mm-decode.el lisp/gnus/mm-extern.el
diffstat 5 files changed, 60 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Wed Apr 12 05:11:12 2006 +0000
+++ b/lisp/gnus/ChangeLog	Wed Apr 12 05:23:27 2006 +0000
@@ -1,3 +1,24 @@
+2006-04-12  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* gnus-art.el (gnus-mime-view-part-as-charset): Ignore charset
+	that the part specifies.
+
+	* mm-decode.el (mm-display-part): Work with external parts and
+	usual parts similarly.
+
+	* mm-extern.el (mm-inline-external-body): Use mm-display-part
+	instead of gnus-display-mime.
+
+	* gnus-uu.el (gnus-uu-save-article): Put mml tags instead of part
+	tag to summarized topics part in order to encode non-ASCII text.
+
+2006-04-12  Kenichi Handa  <handa@m17n.org>
+
+	* rfc2231.el (rfc2231-decode-encoded-string): Work on unibyte
+	buffer and then decode the buffer text if necessary.
+	(rfc2231-encode-string): Be sure to work on multibyte buffer at
+	first, and after mm-encode-body, change the buffer to unibyte.
+
 2006-04-11  Reiner Steib  <Reiner.Steib@gmx.de>
 
 	* gnus-art.el (gnus-button-valid-localpart-regexp): Exclude `@'.
--- a/lisp/gnus/gnus-art.el	Wed Apr 12 05:11:12 2006 +0000
+++ b/lisp/gnus/gnus-art.el	Wed Apr 12 05:23:27 2006 +0000
@@ -4477,19 +4477,29 @@
 specified charset."
   (interactive (list nil current-prefix-arg))
   (gnus-article-check-buffer)
-  (let* ((handle (or handle (get-text-property (point) 'gnus-data)))
-	 contents charset
-	 (b (point))
-	 (inhibit-read-only t))
+  (let ((handle (or handle (get-text-property (point) 'gnus-data)))
+	(fun (get-text-property (point) 'gnus-callback))
+	(gnus-newsgroup-ignored-charsets 'gnus-all)
+	gnus-newsgroup-charset type charset)
     (when handle
       (if (mm-handle-undisplayer handle)
 	  (mm-remove-part handle))
-      (let ((gnus-newsgroup-charset
-	     (or (cdr (assq arg
-			    gnus-summary-show-article-charset-alist))
-		 (mm-read-coding-system "Charset: ")))
-	  (gnus-newsgroup-ignored-charsets 'gnus-all))
-	(gnus-article-press-button)))))
+      (when fun
+	(setq gnus-newsgroup-charset
+	      (or (cdr (assq arg gnus-summary-show-article-charset-alist))
+		  (mm-read-coding-system "Charset: ")))
+	;; Strip the charset parameter from `handle'.
+	(setq type (mm-handle-type
+		    (if (equal (mm-handle-media-type handle)
+			       "message/external-body")
+			(progn
+			  (unless (mm-handle-cache handle)
+			    (mm-extern-cache-contents handle))
+			  (mm-handle-cache handle))
+		      handle))
+	      charset (assq 'charset (cdr type)))
+	(delq charset type)
+	(funcall fun handle)))))
 
 (defun gnus-mime-view-part-externally (&optional handle)
   "View the MIME part under point with an external viewer."
--- a/lisp/gnus/gnus-uu.el	Wed Apr 12 05:11:12 2006 +0000
+++ b/lisp/gnus/gnus-uu.el	Wed Apr 12 05:23:27 2006 +0000
@@ -839,7 +839,9 @@
 		       "Date: %s\nFrom: %s\nSubject: %s Digest\n\n"
 		       (message-make-date) name name))
 	      (when (and message-forward-as-mime gnus-uu-digest-buffer)
-		(insert "<#part type=message/rfc822>\nSubject: Topics\n\n"))
+		(insert
+		 "<#mml type=message/rfc822>\nSubject: Topics\n\n<#/mml>\n")
+		(forward-line -1))
 	      (insert "Topics:\n")))
 	(when (not (eq in-state 'end))
 	  (setq state (list 'middle))))
--- a/lisp/gnus/mm-decode.el	Wed Apr 12 05:11:12 2006 +0000
+++ b/lisp/gnus/mm-decode.el	Wed Apr 12 05:23:27 2006 +0000
@@ -672,7 +672,14 @@
     (mailcap-parse-mailcaps)
     (if (mm-handle-displayed-p handle)
 	(mm-remove-part handle)
-      (let* ((type (mm-handle-media-type handle))
+      (let* ((ehandle (if (equal (mm-handle-media-type handle)
+				 "message/external-body")
+			  (progn
+			    (unless (mm-handle-cache handle)
+			      (mm-extern-cache-contents handle))
+			    (mm-handle-cache handle))
+			handle))
+	     (type (mm-handle-media-type ehandle))
 	     (method (mailcap-mime-info type))
 	     (filename (or (mail-content-type-get
 			    (mm-handle-disposition handle) 'filename)
@@ -680,8 +687,8 @@
 			    (mm-handle-type handle) 'name)
 			   "<file>"))
 	     (external mm-enable-external))
-	(if (and (mm-inlinable-p handle)
-		 (mm-inlined-p handle))
+	(if (and (mm-inlinable-p ehandle)
+		 (mm-inlined-p ehandle))
 	    (progn
 	      (forward-line 1)
 	      (mm-display-inline handle)
@@ -689,7 +696,7 @@
 	  (when (or method
 		    (not no-default))
 	    (if (and (not method)
-		     (equal "text" (car (split-string type))))
+		     (equal "text" (car (split-string type "/"))))
 		(progn
 		  (forward-line 1)
 		  (mm-insert-inline handle (mm-get-part handle))
--- a/lisp/gnus/mm-extern.el	Wed Apr 12 05:11:12 2006 +0000
+++ b/lisp/gnus/mm-extern.el	Wed Apr 12 05:23:27 2006 +0000
@@ -157,25 +157,11 @@
     (save-excursion
       (save-restriction
 	(narrow-to-region (point) (point))
-	(let* ((type (regexp-quote
-		      (mm-handle-media-type (mm-handle-cache handle))))
-	       ;; Force the part to be displayed (but if there is no
-	       ;; method to display, a user will be prompted to save).
-	       ;; See `gnus-mime-display-single'.
-	       (mm-inline-override-types nil)
-	       (mm-attachment-override-types
-		(cons type mm-attachment-override-types))
-	       (mm-automatic-display (cons type mm-automatic-display))
-	       (mm-automatic-external-display
-		(cons type mm-automatic-external-display))
-	       ;; Suppress adding of button to the cached part.
-	       (gnus-inhibit-mime-unbuttonizing nil))
-	  (gnus-display-mime (mm-handle-cache handle)))
-	;; Move undisplayer added to the cached handle to the parent.
-	(mm-handle-set-undisplayer
-	 handle
-	 (mm-handle-undisplayer (mm-handle-cache handle)))
-	(mm-handle-set-undisplayer (mm-handle-cache handle) nil)))))
+	(mm-display-part (mm-handle-cache handle))))
+    ;; Move undisplayer added to the cached handle to the parent.
+    (mm-handle-set-undisplayer
+     handle (mm-handle-undisplayer (mm-handle-cache handle)))
+    (mm-handle-set-undisplayer (mm-handle-cache handle) nil)))
 
 (provide 'mm-extern)