(cond
((wl-region-exists-p)
(wl-mime-preview-follow-current-region))
- ((get-text-property (point-min) 'mime-view-entity)
- (mime-preview-follow-current-entity))
+ ((not (wl-message-mime-analysis-p
+ (wl-message-buffer-display-type)))
+ (wl-mime-preview-follow-no-mime
+ (wl-message-buffer-display-type)))
(t
- (wl-mime-preview-follow-no-mime)))))
+ (mime-preview-follow-current-entity)))))
(error "No message."))))
;; modified mime-preview-follow-current-entity from mime-view.el
-(defun wl-mime-preview-follow-no-mime ()
+(defun wl-mime-preview-follow-no-mime (display-type)
"Write follow message to current message, without mime.
It calls following-method selected from variable
`mime-preview-following-method-alist'."
(interactive)
(let* ((mode (mime-preview-original-major-mode 'recursive))
(new-name (format "%s-no-mime" (buffer-name)))
- new-buf beg end
+ new-buf min beg end
(entity (get-text-property (point-min) 'elmo-as-is-entity))
(the-buf (current-buffer))
fields)
(save-excursion
(goto-char (point-min))
- (setq beg (re-search-forward "^$" nil t)
+ (setq min (point-min)
+ beg (re-search-forward "^$" nil t)
end (point-max)))
(save-excursion
(set-buffer (setq new-buf (get-buffer-create new-name)))
(insert-buffer-substring the-buf beg end)
(goto-char (point-min))
;; Insert all headers.
- (mime-insert-header entity)
+ (let ((elmo-mime-display-header-analysis
+ (wl-message-mime-analysis-p display-type 'header)))
+ (elmo-mime-insert-sorted-header entity))
(let ((f (cdr (assq mode mime-preview-following-method-alist))))
(if (functionp f)
(funcall f new-buf)
(when wl-highlight-body-too
(wl-highlight-body))
(run-hooks 'wl-draft-preview-message-hook))
- (make-local-variable 'kill-buffer-hook)
+ (make-local-hook 'kill-buffer-hook)
(add-hook 'kill-buffer-hook
(lambda ()
(when (get-buffer-window
(delete-window))
(when (get-buffer wl-draft-preview-attributes-buffer-name)
(kill-buffer (get-buffer
- wl-draft-preview-attributes-buffer-name)))))
+ wl-draft-preview-attributes-buffer-name))))
+ nil t)
(if (not wl-draft-preview-attributes)
(message (concat "Recipients: "
(cdr (assq 'recipients attribute-list))))