Synch to No Gnus 200509270216.
authoryamaoka <yamaoka>
Tue, 27 Sep 2005 02:17:07 +0000 (02:17 +0000)
committeryamaoka <yamaoka>
Tue, 27 Sep 2005 02:17:07 +0000 (02:17 +0000)
lisp/ChangeLog
lisp/gnus-art.el
lisp/mm-decode.el
lisp/mm-uu.el
lisp/mm-view.el

index 3001c31..fc0483f 100644 (file)
@@ -1,3 +1,17 @@
+2005-09-27  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-mime-display-single): Don't modify text if it
+       has been decoded.
+
+       * mm-decode.el (mm-automatic-display): Add text/verbatim.
+       (mm-insert-part): Don't modify text if it has been decoded.
+
+       * mm-uu.el (mm-uu-verbatim-marks-extract): Say text has been
+       decoded.
+
+       * mm-view.el (mm-inline-text): Don't strip text props unless
+       decoding enriched or richtext parts.
+
 2005-09-25  Romain Francoise  <romain@orebokech.com>
 
        * gnus-agent.el (gnus-agent-expire-group, gnus-agent-expire):
index b7ba845..ea47716 100644 (file)
@@ -5356,14 +5356,17 @@ If displaying \"text/html\" is discouraged \(see
              (forward-line -1)
              (setq beg (point)))
            (gnus-article-insert-newline)
-           (mm-insert-inline handle
-                             (let ((charset
-                                    (mail-content-type-get
-                                     (mm-handle-type handle) 'charset)))
-                               (if (eq charset 'gnus-decoded)
-                                   (mm-get-part handle)
-                                 (mm-decode-string (mm-get-part handle)
-                                                   charset))))
+           (mm-insert-inline
+            handle
+            (let ((charset (mail-content-type-get (mm-handle-type handle)
+                                                  'charset)))
+              (cond ((not charset)
+                     (mm-string-as-multibyte (mm-get-part handle)))
+                    ((eq charset 'gnus-decoded)
+                     (with-current-buffer (mm-handle-buffer handle)
+                       (buffer-string)))
+                    (t
+                     (mm-decode-string (mm-get-part handle) charset)))))
            (goto-char (point-max))))
          ;; Do highlighting.
          (save-excursion
index 3b48733..bc75be5 100644 (file)
@@ -291,7 +291,7 @@ when selecting a different article."
   :group 'mime-display)
 
 (defcustom mm-automatic-display
-  '("text/plain" "text/enriched" "text/richtext" "text/html"
+  '("text/plain" "text/enriched" "text/richtext" "text/html" "text/verbatim"
     "text/x-vcard" "image/.*" "message/delivery-status" "multipart/.*"
     "message/rfc822" "text/x-patch" "text/dns" "application/pgp-signature"
     "application/emacs-lisp" "application/x-emacs-lisp"
@@ -1051,10 +1051,16 @@ external if displayed external."
 
 (defun mm-insert-part (handle)
   "Insert the contents of HANDLE in the current buffer."
-  (save-excursion
-    (insert (if (mm-multibyte-p)
-               (mm-string-as-multibyte (mm-get-part handle))
-             (mm-get-part handle)))))
+  (let ((charset (mail-content-type-get (mm-handle-type handle) 'charset)))
+    (save-excursion
+      (insert
+       (cond ((eq charset 'gnus-decoded)
+             (with-current-buffer (mm-handle-buffer handle)
+               (buffer-string)))
+            ((mm-multibyte-p)
+             (mm-string-as-multibyte (mm-get-part handle)))
+            (t
+             (mm-get-part handle)))))))
 
 (defun mm-file-name-delete-whitespace (file-name)
   "Remove all whitespace characters from FILE-NAME."
index a75efda..d4410d7 100644 (file)
@@ -289,7 +289,7 @@ apply the face `mm-uu-extract'."
     (progn (goto-char start-point) (forward-line) (point))
     (progn (goto-char end-point) (forward-line -1) (point))
     t)
-   '("text/verbatim")))
+   '("text/verbatim" (charset . gnus-decoded))))
 
 (defun mm-uu-emacs-sources-extract ()
   (mm-make-handle (mm-uu-copy-to-buffer start-point end-point)
index 123f1a7..ed1ff3c 100644 (file)
        (goto-char (point-max))))
     (save-restriction
       (narrow-to-region b (point))
-      (set-text-properties (point-min) (point-max) nil)
       (when (or (equal type "enriched")
                (equal type "richtext"))
+       (set-text-properties (point-min) (point-max) nil)
        (ignore-errors
          (enriched-decode (point-min) (point-max))))
       (mm-handle-set-undisplayer