]> code.delx.au - gnu-emacs/blobdiff - lisp/gnus/mm-bodies.el
*** empty log message ***
[gnu-emacs] / lisp / gnus / mm-bodies.el
index 50de732eca72cdc95a6c33fbf2d18a52970e0062..7871ca9f25357a329badf6e7976afdee0a66b9df 100644 (file)
@@ -1,7 +1,7 @@
 ;;; mm-bodies.el --- Functions for decoding MIME things
 
 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;;     MORIOKA Tomohiko <morioka@jaist.ac.jp>
@@ -226,6 +226,7 @@ If TYPE is `text/plain' CRLF->LF translation may occur."
         (message "Error while decoding: %s" error)
         nil))
     (when (and
+          type
           (memq encoding '(base64 x-uuencode x-uue x-binhex x-yenc))
           (string-match "\\`text/" type))
       (goto-char (point-min))
@@ -247,7 +248,8 @@ decoding.  If it is nil, default to `mail-parse-charset'."
   (save-excursion
     (when encoding
       (mm-decode-content-transfer-encoding encoding type))
-    (when (featurep 'mule)  ; Fixme: Wrong test for unibyte session.
+    (when (and (featurep 'mule) ;; Fixme: Wrong test for unibyte session.
+              (not (eq charset 'gnus-decoded)))
       (let ((coding-system (mm-charset-to-coding-system charset)))
        (if (and (not coding-system)
                 (listp mail-parse-ignored-charsets)
@@ -260,8 +262,7 @@ decoding.  If it is nil, default to `mail-parse-charset'."
                   ;;in XEmacs
                   (mm-multibyte-p)
                   (or (not (eq coding-system 'ascii))
-                      (setq coding-system mail-parse-charset))
-                  (not (eq coding-system 'gnus-decoded)))
+                      (setq coding-system mail-parse-charset)))
          (mm-decode-coding-region (point-min) (point-max)
                                   coding-system))
        (setq buffer-file-coding-system