This commit was generated by cvs2svn to compensate for changes in r524,
[elisp/tm.git] / mh-e / tm-mh-e.el
index e9114a3..c3f2b14 100644 (file)
@@ -1,53 +1,54 @@
-;;;
-;;; tm-mh-e.el --- MIME extender for mh-e
-;;;
-;;; Copyright (C) 1995 Free Software Foundation, Inc.
-;;; Copyright (C) 1993 .. 1996 MORIOKA Tomohiko
-;;;
-;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;;;         OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
-;;; 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.56 $
-;;; Keywords: mail, MH, MIME, multimedia, encoded-word, multilingual
-;;;
-;;; This file is part of tm (Tools for MIME).
-;;;
-;;; This program is free software; you can redistribute it and/or
-;;; modify it under the terms of the GNU General Public License as
-;;; published by the Free Software Foundation; either version 2, or
-;;; (at your option) any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;;; General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with This program.  If not, write to the Free Software
-;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-;;;
+;;; tm-mh-e.el --- MIME extension for mh-e
+
+;; Copyright (C) 1995,1996 Free Software Foundation, Inc.
+
+;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;         OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
+;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;; Created: 1993/11/21 (obsolete mh-e-mime.el)
+;; Version: $Revision: 7.68 $
+;; Keywords: mail, MH, MIME, multimedia, encoded-word, multilingual
+
+;; This file is part of tm (Tools for MIME).
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with This program; see the file COPYING.  If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
 ;;; Code:
 
 (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)
     (defalias 'mh-get-header-field 'mh-get-field)
     )
+(or (boundp 'mh-temp-buffer)
+    (defconst mh-temp-buffer " *mh-temp*")
+    )
 
 
 ;;; @ version
 ;;;
 
 (defconst tm-mh-e/RCS-ID
-  "$Id: tm-mh-e.el,v 7.56 1996/03/06 02:03:17 morioka Exp $")
+  "$Id: tm-mh-e.el,v 7.68 1996/08/31 15:15:12 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
@@ -248,18 +249,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/decode-charset-buffer
+      (symbol-function 'mime-charset/decode-buffer))
 
 (set-alist 'mime-viewer/code-converter-alist
           'mh-show-mode
-          (function tm-mh-e/code-convert-region-to-emacs))
+          (function tm-mh-e/decode-charset-buffer))
 
 (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/decode-charset-buffer default-mime-charset)
   (mime/decode-message-header)
   )
 
@@ -288,15 +288,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)
+          (std11-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