Synch to No Gnus 200506091113.
[elisp/gnus.git-] / lisp / mm-view.el
index c76789b..0d74f22 100644 (file)
       (when (or (equal type "enriched")
                (equal type "richtext"))
        (ignore-errors
-         (enriched-decode (point-min) (point-max))))
+         ;; Turn off `adaptive-fill-mode' that may cause an error
+         ;; as the case may be.
+         (let ((adaptive-fill-mode nil))
+           (enriched-decode (point-min) (point-max)))))
       (mm-handle-set-undisplayer
        handle
        `(lambda ()
     (unless (eq charset 'gnus-decoded)
       (mm-with-unibyte-buffer
        (mm-insert-part handle)
-       (mm-decompress-buffer (mail-content-type-get
-                              (mm-handle-disposition handle)
-                              'filename)
-                             t)
+       (mm-decompress-buffer
+        (or (mail-content-type-get (mm-handle-disposition handle) 'name)
+            (mail-content-type-get (mm-handle-disposition handle) 'filename))
+        t t)
        (unless charset
          (setq coding-system (mm-find-buffer-file-coding-system)))
        (setq text (buffer-string))))