(let ((filename
(or (mime-entity-filename entity)
(let ((subj
- (or (mime-read-field 'Content-Description entity)
- (mime-read-field 'Subject entity))))
+ (or (mime-entity-read-field entity 'Content-Description)
+ (mime-entity-read-field entity 'Subject))))
(if (and subj
(or (string-match mime-view-file-name-regexp-1 subj)
(string-match mime-view-file-name-regexp-2 subj)))
(defun mime-view-message/rfc822 (entity situation)
(let* ((new-name
(format "%s-%s" (buffer-name) (mime-entity-number entity)))
+ (new-pbuf (get-buffer-create new-name))
(mother (current-buffer))
(children (car (mime-entity-children entity))))
- (set-buffer (get-buffer-create new-name))
- (erase-buffer)
- (mime-insert-entity children)
- (setq mime-message-structure children)
- (setq major-mode 'mime-show-message-mode)
- (mime-view-buffer (current-buffer) nil mother
- nil (if (mime-entity-cooked-p entity) 'cooked))
- ))
+ (with-current-buffer new-pbuf
+ (erase-buffer))
+ (mime-display-entity
+ children nil
+ (list (assq 'major-mode
+ (get-text-property (point)
+ 'mime-view-situation)))
+ new-pbuf)))
;;; @ message/partial