X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tm-mh-e.el;h=0628ab3420c6d5e4bae0fd2deadd8b50cbf48134;hb=b2f9be34c30c62efd88d28749e357d8b30c01f1b;hp=b503f242a61d705a26776806a5d04f436a28f3d6;hpb=6f60f010f0797bb67af3aa0bf0f202b61ad7b72d;p=elisp%2Ftm.git diff --git a/tm-mh-e.el b/tm-mh-e.el index b503f24..0628ab3 100644 --- a/tm-mh-e.el +++ b/tm-mh-e.el @@ -6,25 +6,24 @@ (provide 'tm-mh-e) -;;; @ version -;;; -(defconst tm-mh-e/RCS-ID - "$Id: tm-mh-e.el,v 3.1 1994/08/31 05:32:24 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/view-mode "tm-view" "View MIME message." t) +(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 @@ -50,23 +49,22 @@ With arg, turn MIME processing on if arg is positive." (mh-invalidate-show-buffer) (mh-show-msg (mh-get-msg-num t)) (pop-to-buffer mh-show-buffer t) - (mime/view-mode) + (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) - ) - (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/view-message)