From f6bd0eadee727a0f6bcc41422182a2fe59ff0867 Mon Sep 17 00:00:00 2001 From: morioka Date: Sun, 28 Jun 1998 22:26:19 +0000 Subject: [PATCH] (mime-view-message/rfc822): New implementation. --- mime-play.el | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/mime-play.el b/mime-play.el index f9834bd..875b12f 100644 --- a/mime-play.el +++ b/mime-play.el @@ -403,25 +403,20 @@ It is registered to variable `mime-preview-quitting-method-alist'." (pop-to-buffer mother) )) -(defun mime-view-message/rfc822 (entity cal) - (let* ((beg (mime-entity-point-min entity)) - (end (mime-entity-point-max entity)) - (cnum (mime-raw-point-to-entity-number beg)) - (new-name (format "%s-%s" (buffer-name) cnum)) +(defun mime-view-message/rfc822 (entity situation) + (let* ((new-name + (format "%s-%s" (buffer-name) (mime-entity-number entity))) (mother mime-preview-buffer) - (representation-type (mime-entity-representation-type entity)) - str) - (setq str (buffer-substring beg end)) - (switch-to-buffer new-name) + (children (car (mime-entity-children entity)))) + (set-buffer (get-buffer-create new-name)) (erase-buffer) - (insert str) - (goto-char (point-min)) - (if (re-search-forward "^\n" nil t) - (delete-region (point-min) (match-end 0)) - ) + (insert-buffer-substring (mime-entity-buffer children) + (mime-entity-point-min children) + (mime-entity-point-max children)) + (setq mime-message-structure children) (setq major-mode 'mime-show-message-mode) - (setq mime-raw-representation-type representation-type) - (mime-view-mode mother) + (mime-view-buffer (current-buffer) nil mother + nil (mime-entity-representation-type entity)) )) -- 1.7.10.4