tm 7.72.
[elisp/tm.git] / mh-e / tm-mh-e.el
index cb56498..7c71725 100644 (file)
@@ -9,7 +9,7 @@
 ;;; modified by YAMAOKA Katsumi <yamaoka@ga.sony.co.jp>
 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Created: 1993/11/21 (obsolete mh-e-mime.el)
-;;; Version: $Revision: 7.57 $
+;;; Version: $Revision: 7.64 $
 ;;; Keywords: mail, MH, MIME, multimedia, encoded-word, multilingual
 ;;;
 ;;; This file is part of tm (Tools for MIME).
@@ -33,9 +33,9 @@
 (require 'tl-str)
 (require 'tl-misc)
 (require 'mh-e)
-(if (not (boundp 'mh-e-version))
+(or (featurep 'mh-utils)
     (require 'tm-mh-e3)
-  )
+    )
 (require 'tm-view)
 
 (or (fboundp 'mh-get-header-field)
@@ -50,7 +50,7 @@
 ;;;
 
 (defconst tm-mh-e/RCS-ID
-  "$Id: tm-mh-e.el,v 7.57 1996/03/25 11:57:17 morioka Exp $")
+  "$Id: tm-mh-e.el,v 7.64 1996/07/14 15:08:16 morioka Exp $")
 
 (defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID))
 
 ;;; @ functions
 ;;;
 
-(if (not (fboundp 'tm-mh-e/original-mh-display-msg))
-    (fset 'tm-mh-e/original-mh-display-msg
-         (symbol-function 'mh-display-msg))
-  )
+;; (if (not (fboundp 'tm-mh-e/original-mh-display-msg))
+;;     (fset 'tm-mh-e/original-mh-display-msg
+;;           (symbol-function 'mh-display-msg))
+;;   )
 
 (defun mh-display-msg (msg-num folder &optional show-buffer mode)
   (or mode
@@ -251,18 +251,17 @@ digest are inserted into the folder after that message."
 ;;; @ for tm-view
 ;;;
 
-(fset 'tm-mh-e/code-convert-region-to-emacs
-      (symbol-function 'mime/code-convert-region-to-emacs))
+(fset 'tm-mh-e/charset-decode-region
+      (symbol-function 'mime-charset-decode-region))
 
 (set-alist 'mime-viewer/code-converter-alist
           'mh-show-mode
-          (function tm-mh-e/code-convert-region-to-emacs))
+          (function tm-mh-e/charset-decode-region))
 
 (defun tm-mh-e/content-header-filter ()
   (goto-char (point-min))
   (mime-preview/cut-header)
-  (tm-mh-e/code-convert-region-to-emacs (point-min)(point-max)
-                                       mime/default-coding-system)
+  (tm-mh-e/charset-decode-region (point-min)(point-max) default-mime-charset)
   (mime/decode-message-header)
   )
 
@@ -291,15 +290,27 @@ digest are inserted into the folder after that message."
 (set-alist 'mime-viewer/quitting-method-alist
           'mh-show-mode
           (function tm-mh-e/quitting-method))
+(set-alist 'mime-viewer/show-summary-method
+          'mh-show-mode
+          (function tm-mh-e/quitting-method))
 
-;; (defun tm-mh-e/set-window-configuration ()
-;;   (save-excursion
-;;     (set-buffer mh-show-buffer)
-;;     (setq mime::preview/original-window-configuration
-;;           (current-window-configuration))
-;;     ))
-
-;; (add-hook 'mh-show-hook 'tm-mh-e/set-window-configuration)
+(defun tm-mh-e/following-method (buf)
+  (save-excursion
+    (set-buffer buf)
+    (goto-char (point-max))
+    (setq mh-show-buffer buf)
+    (apply (function mh-send)
+          (rfc822/get-field-bodies '("To" "cc" "Subject") ""))
+    (setq mh-sent-from-folder buf)
+    (setq mh-sent-from-msg 1)
+    (let ((last (point)))
+      (mh-yank-cur-msg)
+      (goto-char last)
+      )))
+
+(set-alist 'mime-viewer/following-method-alist
+          'mh-show-mode
+          (function tm-mh-e/following-method))
 
 
 ;;; @@ for tm-partial