(provide 'tm-mh-e)
-;;; @ version
-;;;
-(defconst tm-mh-e/RCS-ID
- "$Id: tm-mh-e.el,v 2.2 1994/07/25 16:13:03 morioka Exp $")
-
-(defconst tm-mh-e/version
- (and (string-match "[0-9][0-9.]*" tm-mh-e/RCS-ID)
- (substring tm-mh-e/RCS-ID (match-beginning 0)(match-end 0))
- ))
-
;;; @ require modules
;;;
+(require 'tl-str)
(require 'tm-misc)
(require 'mh-e)
(if (not (boundp 'mh-e-version))
(require 'tm-mh-e3)
)
+(autoload 'mime/viewer-mode "tm-view" "View MIME message." t)
+
+
+;;; @ version
+;;;
+(defconst tm-mh-e/RCS-ID
+ "$Id: tm-mh-e.el,v 5.3 1994/10/25 09:06:36 morioka Exp $")
+
+(defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID))
;;; @ MIME header decoding mode
;;; @ MIME body players
;;;
-(defun tm-mh-e/play-message (arg)
+(defun tm-mh-e/view-message (arg)
"MIME decode and play this message."
(interactive "P")
(mh-invalidate-show-buffer)
- (let ((mime/body-decoding-mode "play"))
- (mh-show-msg (mh-get-msg-num t))
- )
- (mime/show-body-decoded-result)
- )
-
-(defun tm-mh-e/extract-message (arg)
- "MIME decode and extract files from this message."
- (interactive "P")
- (mh-invalidate-show-buffer)
- (let ((mime/body-decoding-mode "extract"))
- (mh-show-msg (mh-get-msg-num t))
- )
- (mime/show-body-decoded-result)
- )
-
-(defun tm-mh-e/print-message (arg)
- "MIME decode and extract files from this message."
- (interactive "P")
- (mh-invalidate-show-buffer)
- (let ((mime/body-decoding-mode "print"))
- (mh-show-msg (mh-get-msg-num t))
- )
- (mime/show-body-decoded-result)
+ (mh-show-msg (mh-get-msg-num t))
+ (pop-to-buffer mh-show-buffer t)
+ (mime/viewer-mode)
)
;;; @ set up
;;;
+
+(defun tm-mh-e/decode-message-header ()
+ (make-local-variable 'minor-mode-alist)
+ (mime/add-header-decoding-mode-to-mode-line)
+ (let ((buffer-read-only nil))
+ (mime/decode-message-header-if-you-need)
+ (set-buffer-modified-p nil)
+ ))
(add-hook 'mh-show-mode-hook
- (function
- (lambda ()
- (make-local-variable 'minor-mode-alist)
- (mime/add-header-decoding-mode-to-mode-line)
- (let ((buffer-read-only nil))
- (if mime/header-decoding-mode
- (mime/decode-message-header)
- )
- (if mime/body-decoding-mode
- (funcall mime/body-decoding-method)
- )
- (set-buffer-modified-p nil)
- ))))
+ (function tm-mh-e/decode-message-header))
(define-key mh-folder-mode-map "\et" 'tm-mh-e/toggle-header-decoding-mode)
-(define-key mh-folder-mode-map "v" 'tm-mh-e/play-message)
-(define-key mh-folder-mode-map "e" 'tm-mh-e/extract-message)
-(define-key mh-folder-mode-map "\C-cp" 'tm-mh-e/print-message)
+(define-key mh-folder-mode-map "v" 'tm-mh-e/view-message)
+(define-key mh-folder-mode-map "\r"
+ (function (lambda ()
+ (interactive)
+ (scroll-other-window 1)
+ )))
+(define-key mh-folder-mode-map "\e\r"
+ (function (lambda ()
+ (interactive)
+ (scroll-other-window -1)
+ )))