From: morioka Date: Sun, 28 Jun 1998 22:26:19 +0000 (+0000) Subject: (mime-view-message/rfc822): New implementation. X-Git-Tag: remi-1_8_1~19 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f6bd0eadee727a0f6bcc41422182a2fe59ff0867;p=elisp%2Fsemi.git (mime-view-message/rfc822): New implementation. --- 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)) ))