From 37b972cabe9ec1ee753b80ed367c2e7190f6a2c1 Mon Sep 17 00:00:00 2001 From: morioka Date: Wed, 10 Jun 1998 15:46:51 +0000 Subject: [PATCH] (mime-view-display-message): Add new optional argument `mother'; set to `mime-mother-buffer'. (mime-view-mode): Modify for `mime-view-display-message'. --- mime-view.el | 63 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/mime-view.el b/mime-view.el index 39c1cdd..ae87bbb 100644 --- a/mime-view.el +++ b/mime-view.el @@ -908,33 +908,6 @@ The compressed face will be piped to this command.") )) ))) -(defun mime-view-display-message (message &optional preview-buffer) - (let ((win-conf (current-window-configuration)) - (raw-buffer (mime-entity-buffer message))) - (or preview-buffer - (setq preview-buffer - (concat "*Preview-" (buffer-name raw-buffer) "*"))) - (let ((inhibit-read-only t)) - (set-buffer (get-buffer-create preview-buffer)) - (widen) - (erase-buffer) - (setq mime-raw-buffer raw-buffer) - (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) - )) - (set-buffer-modified-p nil) - ) - (setq buffer-read-only t) - (set-buffer raw-buffer) - ) - (switch-to-buffer (setq mime-preview-buffer preview-buffer)) - ) - ;;; @ MIME viewer mode ;;; @@ -1074,6 +1047,36 @@ The compressed face will be piped to this command.") (defvar mime-view-redisplay nil) +(defun mime-view-display-message (message &optional preview-buffer mother) + (let ((win-conf (current-window-configuration)) + (raw-buffer (mime-entity-buffer message))) + (or preview-buffer + (setq preview-buffer + (concat "*Preview-" (buffer-name raw-buffer) "*"))) + (let ((inhibit-read-only t)) + (set-buffer (get-buffer-create preview-buffer)) + (widen) + (erase-buffer) + (setq mime-raw-buffer raw-buffer) + (if mother + (setq mime-mother-buffer mother) + ) + (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) + )) + (set-buffer-modified-p nil) + ) + (setq buffer-read-only t) + (set-buffer raw-buffer) + ) + (switch-to-buffer (setq mime-preview-buffer preview-buffer)) + ) + (defun mime-view-mode (&optional mother ctl encoding raw-buffer obuf default-keymap-or-function) "Major mode for viewing MIME message. @@ -1110,11 +1113,7 @@ button-2 Move to point under the mouse cursor (setq mime-raw-message-info (mime-parse-message ctl encoding)) )))) (prog1 - (mime-view-display-message message obuf) - (if mother - (progn - (setq mime-mother-buffer mother) - )) + (mime-view-display-message message obuf mother) (mime-view-define-keymap default-keymap-or-function) (let ((point (next-single-property-change (point-min) 'mime-view-entity))) -- 1.7.10.4