From: morioka Date: Wed, 10 Jun 1998 17:15:52 +0000 (+0000) Subject: (mime-view-display-message): Move point to top of body; run X-Git-Tag: remi-1_6_0~21 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ace6daf6f37b19c5c4dd10d9542a97be65e29e03;p=elisp%2Fsemi.git (mime-view-display-message): Move point to top of body; run `mime-view-mode-hook'. (mime-view-mode): Don't move point; don't run `mime-view-mode-hook'. --- diff --git a/mime-view.el b/mime-view.el index b494a2e..55b643a 100644 --- a/mime-view.el +++ b/mime-view.el @@ -1077,6 +1077,14 @@ The compressed face will be piped to this command.") (set-buffer raw-buffer) ) (switch-to-buffer (setq mime-preview-buffer preview-buffer)) + (let ((point + (next-single-property-change (point-min) 'mime-view-entity))) + (if point + (goto-char point) + (goto-char (point-min)) + (search-forward "\n\n" nil t) + )) + (run-hooks 'mime-view-mode-hook) ) (defun mime-view-mode (&optional mother ctl encoding raw-buffer obuf @@ -1106,26 +1114,13 @@ button-2 Move to point under the mouse cursor " (interactive) (mime-maybe-hide-echo-buffer) - (let ((message - (save-excursion - (if raw-buffer - (set-buffer raw-buffer) - ) - (or mime-view-redisplay - (setq mime-raw-message-info (mime-parse-message ctl encoding)) - )))) - (prog1 - (mime-view-display-message message obuf mother - default-keymap-or-function) - (let ((point - (next-single-property-change (point-min) 'mime-view-entity))) - (if point - (goto-char point) - (goto-char (point-min)) - (search-forward "\n\n" nil t) - )) - (run-hooks 'mime-view-mode-hook) - ))) + (mime-view-display-message + (save-excursion + (if raw-buffer (set-buffer raw-buffer)) + (or mime-view-redisplay + (setq mime-raw-message-info (mime-parse-message ctl encoding)) + )) + obuf mother default-keymap-or-function)) ;;; @@ playing