(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))))