(default-situation
(cdr (assq 'childrens-situation situation))))
(while children
- (mime-view-display-entity (car children)
- (save-excursion
- (set-buffer (mime-entity-buffer entity))
- mime-raw-message-info)
- (current-buffer)
- default-situation)
+ (mime-display-entity (car children) nil default-situation)
(setq children (cdr children))
)))
(while children
(let ((child (car children))
(situation (car situations)))
- (mime-view-display-entity child
- (save-excursion
- (set-buffer (mime-entity-buffer child))
- mime-raw-message-info)
- (current-buffer)
- default-situation
- (if (= i p)
- situation
- (del-alist 'body-presentation-method
- (copy-alist situation))))
+ (mime-display-entity child (if (= i p)
+ situation
+ (del-alist 'body-presentation-method
+ (copy-alist situation))))
)
(setq children (cdr children)
situations (cdr situations)
;;; @ buffer setup
;;;
-(defun mime-view-display-entity (entity message-info obuf
- default-situation
- &optional situation)
+(defun mime-display-entity (entity &optional situation
+ default-situation preview-buffer)
+ (or preview-buffer
+ (setq preview-buffer (current-buffer)))
(let* ((raw-buffer (mime-entity-buffer entity))
(start (mime-entity-point-min entity))
(end (mime-entity-point-max entity))
- end-of-header e nb ne subj)
+ e nb ne subj)
(set-buffer raw-buffer)
(goto-char start)
- (setq end-of-header (if (re-search-forward "^$" nil t)
- (1+ (match-end 0))
- end))
- (if (> end-of-header end)
- (setq end-of-header end)
- )
(save-restriction
(narrow-to-region start end)
(setq subj (eword-decode-string (mime-raw-get-subject entity)))
(body-presentation-method
(cdr (assq 'body-presentation-method situation)))
(children (mime-entity-children entity)))
- (set-buffer obuf)
+ (set-buffer preview-buffer)
(setq nb (point))
(narrow-to-region nb nb)
(or button-is-invisible
(let ((body-filter (cdr (assq 'body-filter situation))))
(save-restriction
(narrow-to-region (point-max)(point-max))
- (insert-buffer-substring raw-buffer end-of-header end)
+ (insert-buffer-substring
+ raw-buffer (mime-entity-body-start entity) end)
(funcall body-filter situation)
)))
(children)
(defvar mime-view-redisplay nil)
-(defun mime-view-display-message (message &optional preview-buffer
- mother default-keymap-or-function)
+(defun mime-display-message (message &optional preview-buffer
+ mother default-keymap-or-function)
(mime-maybe-hide-echo-buffer)
(let ((win-conf (current-window-configuration))
(raw-buffer (mime-entity-buffer message)))
(setq mime-preview-original-window-configuration win-conf)
(setq major-mode 'mime-view-mode)
(setq mode-name "MIME-View")
- (mime-view-display-entity message message
- preview-buffer
- '((entity-button . invisible)
- (header . visible)
- ))
+ (mime-display-entity message nil
+ '((entity-button . invisible)
+ (header . visible))
+ preview-buffer)
(mime-view-define-keymap default-keymap-or-function)
(let ((point
(next-single-property-change (point-min) 'mime-view-entity)))
(defun mime-view-buffer (&optional raw-buffer preview-buffer mother
default-keymap-or-function)
(interactive)
- (mime-view-display-message
+ (mime-display-message
(save-excursion
(if raw-buffer (set-buffer raw-buffer))
(mime-parse-message)
and decode current content as `play mode'
"
(interactive)
- (mime-view-display-message
+ (mime-display-message
(save-excursion
(if raw-buffer (set-buffer raw-buffer))
(or mime-view-redisplay