(gnus-uu-digest-mail-forward): Make it work even in the case where neither a
[gnus] / lisp / mm-bodies.el
index 102d5e9..2bcb7a9 100644 (file)
@@ -225,6 +225,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,10 @@ decoding.  If it is nil, default to `mail-parse-charset'."
     (when encoding
       (mm-decode-content-transfer-encoding encoding type))
     (when (featurep 'mule)  ; Fixme: Wrong test for unibyte session.
-      (let ((coding-system (mm-charset-to-coding-system charset)))
+      (let ((coding-system (mm-charset-to-coding-system
+                           ;; Allow overwrite using
+                           ;; `mm-charset-override-alist'.
+                           charset nil t)))
        (if (and (not coding-system)
                 (listp mail-parse-ignored-charsets)
                 (memq 'gnus-unknown mail-parse-ignored-charsets))
@@ -279,7 +283,11 @@ decoding.  If it is nil, default to `mail-parse-charset'."
     (setq charset mail-parse-charset))
   (or
    (when (featurep 'mule)
-     (let ((coding-system (mm-charset-to-coding-system charset)))
+     (let ((coding-system (mm-charset-to-coding-system
+                          charset
+                          ;; Allow overwrite using
+                          ;; `mm-charset-override-alist'.
+                          nil t)))
        (if (and (not coding-system)
                (listp mail-parse-ignored-charsets)
                (memq 'gnus-unknown mail-parse-ignored-charsets))