tm 7.46.1.
authormorioka <morioka>
Mon, 9 Mar 1998 16:05:31 +0000 (16:05 +0000)
committermorioka <morioka>
Mon, 9 Mar 1998 16:05:31 +0000 (16:05 +0000)
22 files changed:
ChangeLog
Makefile
README.en
gnus/ChangeLog
gnus/Makefile
gnus/s-path
gnus/tm-gnus.el
gnus/tm-gnus3.el
gnus/tm-gnus4.el
gnus/tm-sgnus.el
inst-tm [new file with mode: 0644]
mh-e/ChangeLog
mh-e/Makefile
mh-e/mk-tmh
mh-e/tm-mh-e.el
mh-e/tmh-comp.el [new file with mode: 0644]
mh-e/tmh-els [new file with mode: 0644]
mime-setup.el.in [new file with mode: 0644]
tm-bbdb.el
tm-cfg [new file with mode: 0644]
tm-els [new file with mode: 0644]
tm-ew-e.el

index 1a0c186..0a2d4f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+Mon Mar  4 09:24:23 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tl: Version 7.14 was released.
+       * MEL: Version 3.3.1 was released.
+       * tm: Version 7.46.1 was released.
+       * tm/mh-e: Version 7.55 was released.
+       * tm/gnus: Version 7.49 was released.
+
+       * Makefile: Installer was changed.
+
+       * inst-tm: New file.
+
+       * tm-els: New file.
+
+       * tm-cfg: New file.
+
+       * tm-ew-e.el (mime/encode-field): check encoded result.
+
+Mon Mar 4 01:57:11 1996   KON-NO Yoichi <itokon@ssel.toshiba.co.jp>
+
+       * tm-bbdb.el: insert `(require 'tm-view)'.
+       (cf. [tm-ja:1646])      
+
+\f
 Wed Feb 28 13:13:27 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
 
        * tl: Version 7.13 was released.
index 03d5552..6bd3fd5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,21 @@
 #
-# $Id: Makefile,v 7.14 1996/01/18 10:27:43 morioka Exp morioka $
+# $Id: Makefile,v 7.16 1996/03/04 09:24:23 morioka Exp morioka $
 #
 
-include config.tm
+MAKE   = make
+CC     = gcc
+CFLAGS = -O2
+RM     = /bin/rm -f
+CP     = /bin/cp -p
+EMACS  = emacs
 
 BINS   = src/ol2 src/decode-b
 UTILS  = $(BINS)
 GOMI   = $(BINS) *.elc loadpath
-FLAGS   = -batch -q -no-site-file -l mk-tm
+FLAGS   = -batch -q -no-site-file
 
 TM_FILES = tm/README.en tm/ChangeLog \
-               tm/config.tm tm/Makefile tm/mk-tm \
+               tm/Makefile tm/inst-tm tm/tm-els tm/tm-cfg \
                tm/tm-mule.el tm/tm-nemacs.el tm/tm-orig.el tm/tm-def.el \
                tm/tm-eword.el tm/tm-ew-d.el tm/tm-ew-e.el \
                tm/tm-view.el tm/tm-parse.el \
@@ -20,7 +25,7 @@ TM_FILES = tm/README.en tm/ChangeLog \
                tm/tm-tar.el \
                tm/tm-bbdb.el \
                tm/tm-edit.el tm/signature.el \
-               tm/tm-setup.el tm/mime-setup.el \
+               tm/tm-setup.el tm/mime-setup.el.in \
                tm/sc-setup.el \
                tm/methods/tm* tm/methods/ChangeLog \
                tm/src/*.c \
@@ -30,84 +35,26 @@ TM_FILES = tm/README.en tm/ChangeLog \
 TM_MUA_FILES = tm/tm-rmail.el tm/tm-vm.el tm/tm-mail.el \
                tm/gnus/Makefile tm/gnus/*-path tm/gnus/mk-tgnus \
                tm/gnus/*.el tm/gnus/ChangeLog \
-               tm/mh-e/Makefile tm/mh-e/mk-tmh tm/mh-e/code-jp.ol \
-               tm/mh-e/*.el tm/mh-e/ChangeLog
+               tm/mh-e/Makefile tm/mh-e/mk-tmh tm/mh-e/tmh-els \
+               tm/mh-e/code-jp.ol tm/mh-e/*.el tm/mh-e/ChangeLog
 
-MEL_FILES = mel/*.el mel/Makefile mel/mk-mel mel/ChangeLog
+MEL_FILES = mel/*.el mel/Makefile mel/mk-mel mel/mel-els mel/ChangeLog
 
-TL_FILES = tl/README.en tl/Makefile tl/mk-tl tl/*.el tl/doc/*.texi \
-               tl/ChangeLog
+TL_FILES = tl/README.en tl/Makefile tl/mk-tl tl/tl-els tl/*.el \
+               tl/doc/*.texi tl/ChangeLog
 
 FILES  = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES)
 
-TARFILE = tm7.46.tar.gz
-
-
-18:
-       cd ../tl; PWD=`pwd` $(MAKE) elc EMACS=$(EMACS18)
-       cd ../mel; PWD=`pwd` $(MAKE) elc EMACS=$(EMACS18)
-       $(EMACS18) $(FLAGS) -f compile-tm
-       cd gnus; PWD=`pwd` $(MAKE) gnus3 EMACS=$(EMACS18)
-# If you use GNUS 4.*, please use following comment:
-#      cd gnus; PWD=`pwd` $(MAKE) gnus4 EMACS=$(EMACS18)
-       cd mh-e; PWD=`pwd` $(MAKE) elc EMACS=$(EMACS18)
-
-install-18:    18
-       cd ../tl; PWD=`pwd` \
-               $(MAKE) install-18 EMACS=$(EMACS18) TLDIR18=$(TLDIR18)
-       cd ../mel; PWD=`pwd` \
-               $(MAKE) install-18 EMACS=$(EMACS18) MELDIR18=$(MELDIR18)
-       $(EMACS18) $(FLAGS) -f install-tm $(TMDIR18)
-       cd gnus; PWD=`pwd` \
-               $(MAKE) install-18 EMACS=$(EMACS18) TMDIR18=$(TM_GNUS_DIR18)
-       cd mh-e; PWD=`pwd` \
-               $(MAKE) install-18 EMACS=$(EMACS18) TMDIR18=$(TMH_DIR18)
-
-
-xemacs:
-       cd ../tl; PWD=`pwd` $(MAKE) elc EMACS=$(XEMACS)
-       cd ../mel; PWD=`pwd` $(MAKE) elc EMACS=$(XEMACS)
-       $(XEMACS) $(FLAGS) -f compile-tm
-       cd gnus; PWD=`pwd` $(MAKE) gnus EMACS=$(XEMACS)
-       cd gnus; PWD=`pwd` $(MAKE) gnus5 EMACS=$(XEMACS)
-       cd gnus; PWD=`pwd` $(MAKE) sgnus EMACS=$(XEMACS)
-       cd mh-e; PWD=`pwd` $(MAKE) elc EMACS=$(XEMACS)
-
-install-xemacs:        xemacs
-       cd ../tl; PWD=`pwd` \
-               $(MAKE) install-19 EMACS=$(XEMACS) TLDIR19=$(TLDIR19)
-       cd ../mel; PWD=`pwd` \
-               $(MAKE) install-19 EMACS=$(XEMACS) MELDIR19=$(MELDIR19)
-       $(XEMACS) $(FLAGS) -f install-tm $(TMDIR19)
-       cd gnus; PWD=`pwd` \
-               $(MAKE) install-19 EMACS=$(XEMACS) TMDIR19=$(TM_GNUS_DIR19)
-       cd mh-e; PWD=`pwd` \
-               $(MAKE) install-19 EMACS=$(XEMACS) TMDIR19=$(TMH_DIR19)
-
-
-19_29:
-       cd ../tl; PWD=`pwd` $(MAKE) elc EMACS=$(EMACS19_29)
-       cd ../mel; PWD=`pwd` $(MAKE) elc EMACS=$(EMACS19_29)
-       $(EMACS19_29) $(FLAGS) -f compile-tm
-       cd gnus; PWD=`pwd` $(MAKE) gnus EMACS=$(EMACS19_29)
-#      cd gnus; PWD=`pwd` $(MAKE) gnus5 EMACS=$(EMACS19_29)
-       cd gnus; PWD=`pwd` $(MAKE) sgnus EMACS=$(EMACS19_29)
-       cd mh-e; PWD=`pwd` $(MAKE) elc EMACS=$(EMACS19_29)      
-
-install-19_29: 19_29
-       cd ../tl; PWD=`pwd` \
-               $(MAKE) install-19 EMACS=$(EMACS19_29) TLDIR19=$(TLDIR19_29)
-       cd ../mel; PWD=`pwd` \
-               $(MAKE) install-19 EMACS=$(EMACS19_29) MELDIR19=$(MELDIR19_29)
-       $(EMACS19_29) $(FLAGS) -f install-tm $(TMDIR19_29)
-       cd gnus; PWD=`pwd` \
-               $(MAKE) install-19_29 EMACS=$(EMACS19_29) \
-                       TMDIR19_29=$(TM_GNUS_DIR19_29)
-       cd mh-e; PWD=`pwd` \
-               $(MAKE) install-19 EMACS=$(EMACS19_29) TMDIR19=$(TMH_DIR19_29)
-
-
-all:   $(UTILS) $(DVI)
+TARFILE = tm7.46.1.tar.gz
+
+elc:
+       $(EMACS) $(FLAGS) -l inst-tm -f compile-tm
+
+install-elc:   elc
+       $(EMACS) $(FLAGS) -l inst-tm -f install-tm
+
+
+all:   $(UTILS) $(DVI) elc
 
 src/ol2:       src/ol2.c
        $(CC) $(CFLAGS) src/ol2.c -o src/ol2
@@ -126,9 +73,8 @@ ps:  ol2
        cd doc; $(MAKE) ps
 
 
-install:       $(UTILS) methods
-       $(CP) $(UTILS) $(bindir)
-       $(CP) methods/tm* $(bindir)
+install:       $(UTILS) methods install-elc
+       $(EMACS) $(FLAGS) -l inst-tm -f install-execs
 
 
 clean:
index 9a9569f..6e57f45 100644 (file)
--- a/README.en
+++ b/README.en
@@ -1,7 +1,7 @@
 [README for tm (English Version)]
 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
 and KOBAYASHI Shuhei <shuhei@cmpt01.phys.tohoku.ac.jp>
-$Id: README.en,v 7.11 1995/12/25 10:43:59 morioka Exp $
+$Id: README.en,v 7.14 1996/03/04 09:08:40 morioka Exp $
 
 1 What's tm?
 
@@ -69,84 +69,72 @@ $Id: README.en,v 7.11 1995/12/25 10:43:59 morioka Exp $
 
 4 Install
 
-4.1 tm/config.tm
+4.1 edit tm/tm-cfg (optional)
 
-  Please edit tm/config.tm file.
+  You can edit tm/tm-cfg file.
 
+  In default, tm is installed into your home directory. If you want to 
+install into /usr/local/, please modify the variable `PREFIX'.
 
-4.2 External methods
-
-  Please edit external methods in `tm/methods/' directory for your
-environment.
-
-       tm/methods/tm-au        for audio
-       tm/methods/tm-file      for file extraction
-       tm/methods/tm-image     for image
-       tm/methods/tm-mpeg      for MPEG
-       tm/methods/tm-plain     for plain text
-       tm/methods/tm-html      for HTML
-       tm/methods/tmdecode     decoder
-
-
-4.3 make
-
-  Run `make all'.
 
+4.2 tm-gnus (optional)
 
-4.4 install
+  If you use optional GNUS or Gnus, which is not included in Emacs
+distribution, you must edit following files before make.
 
-  Run `make install'.
-
-
-4.5 Emacs Lisp modules
-
-  Run `make install-18', if you use Emacs 18 (NEmacs, Mule 1.*).
+    If you use Emacs 18.* and GNUS 3.*, please edit tm/gnus/g3-path.
 
-  Run `make install-xemacs', if you use Emacs .. 19.28 (Mule 2.* based
-on), or XEmacs.
+    If you use Emacs 18.* and GNUS 4.*, please edit tm/gnus/g4-path.
 
-  Run `make install-19_29', if you use Emacs 19.29 or later (Mule 2.*
-based on).
+    If you use Gnus 5.0.*, please edit tm/gnus/g5-path.
 
-  Or copy *.el to your emacs lisp directory.
+    If you use September Gnus, please edit tm/gnus/s-path.
 
 
-5 tm-MUA
+4.3 edit external methods (optional)
 
-5.1 tm-gnus
+  You can edit external methods in `tm/methods/' directory for your
+environment.
 
-  If you use optional GNUS or Gnus, you must edit and make manually.
+       tm/methods/tm-au        for audio
+       tm/methods/tm-file      for file extraction
+       tm/methods/tm-image     for image
+       tm/methods/tm-mpeg      for MPEG
+       tm/methods/tm-plain     for plain text
+       tm/methods/tm-html      for HTML
+       tm/methods/tmdecode     decoder
 
-(1) Please edit tm/gnus/Makefile.
+  In default, tmdecode uses `mmencode' command. If you don't have
+metamail package, please modify tmdecode to use decode-b instead of
+mmencode.
 
-    If you use Emacs 18.* and GNUS 3.*, please edit tm/gnus/g3-path.
 
-    If you use Emacs 18.* and GNUS 4.*, please edit tm/gnus/g4-path.
+4.4 make
 
-    If you use Gnus 5.0.*, please edit tm/gnus/g5-path.
+  Run `make all'.
 
-    If you use September Gnus, please edit tm/gnus/s-path.
+  You can specify Emacs command name, for example if you want to use
+`mule' as Emacs command:
 
-(2) make
+       % make all EMACS=mule
 
-  Run `make gnus3', if you use GNUS 3.*.
 
-  Run `make gnus4', if you use GNUS 4.*.
+4.5 install
 
-  Run `make gnus5', if you use Gnus 5.0.*.
+  Run `make install'.
 
-  Run `make sgnus', if you use September Gnus.
+  You can specify Emacs command name, for example if you want to use
+`xemacs' as Emacs command:
 
-(3) install
+       % make all EMACS=xemacs
 
-  Run `make install-18', if you use Emacs 18.*.
 
-  Run `make install-19', if you use Emacs .. 19.28 or XEmacs.
+6 .emacs
 
-  Run `make install-19_29', if you use Emacs 19.29 or later.
+  Please insert (load "mime-setup") in ~/.emacs.
 
 
-5.1.1 automatic MIME preview support
+6.1 automatic MIME preview support
 
   tm-gnus provides automatic MIME preview feature for GNUS 3.15 or
 later, Gnus 5.0.*, Gnus 5.1, and September Gnus.
@@ -178,40 +166,15 @@ RFC 1522 encoded-word. So it is not necessary to reset
 `gnus-strict-mime'.
 
 
-5.2 tm-mh-e
-
-  If you use optional mh-e, you must edit and make manually.
-
-(1) Please edit mh-e/Makefile
-
-(2) make
+6.2 VM
 
-  Run `make elc'.
-
-(3) install
-
-  Run `make install-18', if you use Emacs 18.*.
-
-  Run `make install-19', if you use Emacs 19.*.
-
-5.3 VM
-
-  If you use VM, please edit `mk-tm'.
-
-
-6 .emacs
-
-  Please insert (load "mime-setup") in ~/.emacs.
-
-6.1 VM
-
-  If you use vm, please insert (require 'tm-vm) in ~/.vm.
+  If you use vm, please insert `(require 'tm-vm)' in ~/.vm.
 
   tm works well with BBDB: If you use VM, please insert
 (require 'tm-vm) *after* (bbdb-insinuate-vm).
 
 
-6.2 PGP
+6.3 PGP
 
   If you have PGP and Mailcrypt package, you can use PGP on
 MIME. Currently, 2 drafts (draft-elkins-pem-pgp-02.txt and
@@ -262,7 +225,7 @@ please insert following into ~/.emacs:
 ======================================================================
 
 
-6.3 setting sample for hilit19
+6.4 setting sample for hilit19
 
 ======================================================================
 (cond (window-system
@@ -301,7 +264,8 @@ please insert following into ~/.emacs:
        ))
 ======================================================================
 
-6.4 setting sample for browse
+
+6.5 setting sample for browse
 
   If you have browse-url.el (included in Gnus 5.*, September Gnus and
 Emacs 19.30 or later), you can use URL button in
index e75da0b..d86e914 100644 (file)
@@ -1,3 +1,21 @@
+Mon Mar  4 08:20:48 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm/gnus: Version 7.49 was released.
+
+       * tm-gnus3.el: fixed problem about BBDB.
+
+Mon Mar  4 08:18:09 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-gnus.el: BBDB setting codes were deleted.
+
+       * tm-sgnus.el, tm-gnus4.el, tm-gnus3.el:
+       BBDB setting codes moved from tm-gnus.el.
+
+Mon Mar  4 07:38:30 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-gnus.el: fixed problem in Emacs 18.
+
+\f
 Wed Feb 28 13:32:29 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
 
        * tm/gnus: Version 7.48 was released.
index 83fe8ce..fd440bf 100644 (file)
@@ -1,5 +1,5 @@
 #
-# $Id: Makefile,v 7.4 1996/01/18 10:28:57 morioka Exp morioka $
+# $Id: Makefile,v 7.5 1996/03/04 09:29:33 morioka Exp morioka $
 #
 
 # Please specify emacs executables:
@@ -26,9 +26,11 @@ TMDIR19    = $(DATADIR19)/$(EMACS_PREFIX)/site-lisp
 TMDIR19_29 = $(DATADIR19_29)/$(EMACS_PREFIX)/site-lisp
 
 
-FILES  = tm/gnus/*.el tm/doc/tm-gnus*.texi
+FILES  = tm/gnus/Makefile tm/gnus/*-path tm/gnus/mk-tgnus \
+               tm/gnus/*.el tm/gnus/ChangeLog tm/doc/tm-gnus*.texi 
 
-TARFILE = tm-gnus7.48.tar
+
+TARFILE = tm-gnus7.49.tar
 
 
 gnus:
index da6c53e..c8616ab 100644 (file)
@@ -9,7 +9,7 @@
 ;; please edit
 
 ;; It is relative style. Added path is searched from load-path.
-(add-path "sgnus-0.45/lisp/" 'all-paths)
+(add-path "sgnus-0.49/lisp/" 'all-paths)
 
 ;; It is absolute style.
 ;; (add-path "/usr/local/share/emacs/site-lisp/sgnus/lisp/")
index cafe43b..eadfb89 100644 (file)
@@ -9,7 +9,7 @@
 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Created: 1993/11/20 (obsolete mol's gnus-mime.el)
 ;;; Version:
-;;;    $Id: tm-gnus.el,v 7.18 1996/02/27 19:04:37 morioka Exp $
+;;;    $Id: tm-gnus.el,v 7.20 1996/03/04 08:18:09 morioka Exp $
 ;;; Keywords: news, MIME, multimedia, encoded-word, multilingual
 ;;;
 ;;; This file is part of tm (Tools for MIME).
     )))
 
 
-;;; @ for BBDB
-;;;
-
-(call-after-loaded
- 'bbdb
- (lambda ()
-   (require 'tm-bbdb)
-   ))
-
-(autoload 'tm-bbdb/update-record "tm-bbdb")
-
-(defun tm-gnus/bbdb-setup ()
-  (if (memq 'bbdb/gnus-update-record gnus-article-prepare-hook)
-      (progn
-       (remove-hook 'gnus-article-prepare-hook 'bbdb/gnus-update-record)
-       ;;(add-hook 'tm-gnus/article-prepare-hook 'bbdb/gnus-update-record)
-       (add-hook 'gnus-article-display-hook 'tm-bbdb/update-record)
-       )))
-
-(add-hook 'gnus-startup-hook 'tm-gnus/bbdb-setup t)
-
-(tm-gnus/bbdb-setup)
-
-
 ;;; @ end
 ;;;
 
index b58b92b..675b358 100644 (file)
@@ -7,7 +7,7 @@
 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Created: 1993/11/20
-;;; Version: $Revision: 7.5 $
+;;; Version: $Revision: 7.7 $
 ;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
 ;;;
 ;;; This file is part of tm (Tools for MIME).
@@ -46,7 +46,7 @@
 ;;;
 
 (defconst tm-gnus/RCS-ID
-  "$Id: tm-gnus3.el,v 7.5 1996/02/27 19:06:50 morioka Exp $")
+  "$Id: tm-gnus3.el,v 7.7 1996/03/04 08:20:48 morioka Exp $")
 
 (defconst tm-gnus/version
   (concat (get-version-string tm-gnus/RCS-ID) " for GNUS 3"))
@@ -222,6 +222,30 @@ With arg, turn MIME encoded-word processing on iff arg is positive."
          (function tm-gnus/decode-encoded-word-if-you-need) t)
 
 
+;;; @ for BBDB
+;;;
+
+(call-after-loaded
+ 'bbdb
+ (function
+  (lambda ()
+    (require 'tm-bbdb)
+    )))
+
+(autoload 'tm-bbdb/update-record "tm-bbdb")
+
+(defun tm-gnus/bbdb-setup ()
+  (if (memq 'bbdb/gnus-update-record gnus-Article-prepare-hook)
+      (progn
+       (remove-hook 'gnus-Article-prepare-hook 'bbdb/gnus-update-record)
+       (add-hook 'gnus-Article-prepare-hook 'tm-bbdb/update-record)
+       )))
+
+(add-hook 'gnus-startup-hook 'tm-gnus/bbdb-setup t)
+
+(tm-gnus/bbdb-setup)
+
+
 ;;; @ end
 ;;;
 
index 3a0d93d..7184732 100644 (file)
@@ -8,7 +8,7 @@
 ;;; modified by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Created: 1993/11/20 (merged tm-gnus5.el)
-;;; Version: $Revision: 7.17 $
+;;; Version: $Revision: 7.18 $
 ;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
 ;;;
 ;;; This file is part of tm (Tools for MIME).
@@ -37,7 +37,7 @@
 ;;;
 
 (defconst tm-gnus/RCS-ID
-  "$Id: tm-gnus4.el,v 7.17 1996/02/27 19:06:05 morioka Exp $")
+  "$Id: tm-gnus4.el,v 7.18 1996/03/04 08:16:42 morioka Exp $")
 
 (defconst tm-gnus/version
   (concat (get-version-string tm-gnus/RCS-ID) " for 3.15 .. 5.1.*"))
@@ -213,6 +213,31 @@ This variable is set to `gnus-show-mime'.")
 (setq gnus-show-mime t)
 
 
+;;; @ for BBDB
+;;;
+
+(call-after-loaded
+ 'bbdb
+ (function
+  (lambda ()
+    (require 'tm-bbdb)
+    )))
+
+(autoload 'tm-bbdb/update-record "tm-bbdb")
+
+(defun tm-gnus/bbdb-setup ()
+  (if (memq 'bbdb/gnus-update-record gnus-article-prepare-hook)
+      (progn
+       (remove-hook 'gnus-article-prepare-hook 'bbdb/gnus-update-record)
+       ;;(add-hook 'tm-gnus/article-prepare-hook 'bbdb/gnus-update-record)
+       (add-hook 'gnus-article-display-hook 'tm-bbdb/update-record)
+       )))
+
+(add-hook 'gnus-startup-hook 'tm-gnus/bbdb-setup t)
+
+(tm-gnus/bbdb-setup)
+
+
 ;;; @ end
 ;;;
 
index 7cc7848..6f3934a 100644 (file)
@@ -7,7 +7,7 @@
 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Created: 1995/09/24
-;;; Version: $Revision: 7.48 $
+;;; Version: $Revision: 7.49 $
 ;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
 ;;;
 ;;; This file is part of tm (Tools for MIME).
@@ -41,7 +41,7 @@
 ;;;
 
 (defconst tm-gnus/RCS-ID
-  "$Id: tm-sgnus.el,v 7.48 1996/02/27 19:05:14 morioka Exp $")
+  "$Id: tm-sgnus.el,v 7.49 1996/03/04 08:17:44 morioka Exp $")
 
 (defconst tm-gnus/version
   (concat (get-version-string tm-gnus/RCS-ID) " for September"))
@@ -339,6 +339,29 @@ This variable is set to `gnus-show-mime'.")
          ))))
 
 
+;;; @ for BBDB
+;;;
+
+(call-after-loaded
+ 'bbdb
+ (lambda ()
+   (require 'tm-bbdb)
+   ))
+
+(autoload 'tm-bbdb/update-record "tm-bbdb")
+
+(defun tm-gnus/bbdb-setup ()
+  (if (memq 'bbdb/gnus-update-record gnus-article-prepare-hook)
+      (progn
+       (remove-hook 'gnus-article-prepare-hook 'bbdb/gnus-update-record)
+       (add-hook 'gnus-article-display-hook 'tm-bbdb/update-record)
+       )))
+
+(add-hook 'gnus-startup-hook 'tm-gnus/bbdb-setup t)
+
+(tm-gnus/bbdb-setup)
+
+
 ;;; @ end
 ;;;
 
diff --git a/inst-tm b/inst-tm
new file mode 100644 (file)
index 0000000..9f58172
--- /dev/null
+++ b/inst-tm
@@ -0,0 +1,151 @@
+;;; -*-Emacs-Lisp-*-
+;;;
+;;; $Id: inst-tm,v 1.2 1996/03/04 09:39:25 morioka Exp $
+;;;
+
+(load-file "tm-cfg")
+(load-file "../tl/tl-els")
+(load-file "../mel/mel-els")
+(load-file "tm-els")
+(load-file "mh-e/tmh-els")
+
+(defun make-mime-setup (tl-path mel-path tm-path)
+  (let ((buf (find-file "mime-setup.el.in")))
+    (goto-char (point-min))
+    (re-search-forward "^;;; Code:" nil t)
+    (setq buffer-read-only nil)
+    (insert
+     (format
+      "
+
+\(let ((load-path
+       (cons \"%s\"
+             load-path)))
+  (require \'tl-misc)
+  )
+\(add-path \"%s\")
+\(add-path \"%s\")
+\(add-path \"%s\")"
+      tl-path tl-path mel-path tm-path))
+    (write-file "mime-setup.el")
+    ))
+
+(defun compile-el-files (path modules)
+  (mapcar (function
+          (lambda (module)
+            (setq module (expand-file-name module path))
+            (let ((el-file (concat module ".el"))
+                  (elc-file (concat module ".elc"))
+                  )
+              (if (file-newer-than-file-p el-file elc-file)
+                  (byte-compile-file el-file)
+                )
+              )))
+         modules))
+
+(defun compile-tm-gnus (type)
+  (erase-buffer)
+  (call-process SHELL
+               nil t t
+               "-c"
+               (format "cd gnus; PWD=`pwd` make %s EMACS=%s"
+                       type (car command-line-args))
+               )
+  (princ (buffer-string))
+  )
+
+(defun install-tm-gnus ()
+  (erase-buffer)
+  (call-process SHELL
+               nil t t
+               "-c"
+               (format
+                "cd gnus; PWD=`pwd` make install-19 EMACS=%s TMDIR19=%s"
+                (car command-line-args) TM_GNUS_DIR)
+               )
+  (princ (buffer-string))
+  )
+
+(defun compile-tm ()
+  (require 'tm-rich)
+  (require 'mel-u)
+  (require 'tm-edit)
+  (load "rmailsum")
+  (require 'tm-mh-e)
+  (make-mime-setup TL_DIR MEL_DIR TM_KERNEL_DIR)
+  (compile-el-files "../tl/"  tl-modules)
+  (compile-el-files "../mel/" mel-modules)
+  (compile-el-files "./"      tm-modules)
+  (compile-el-files "mh-e/"   tm-mh-e-modules)
+  (compile-tm-gnus "gnus")
+  (cond ((< emacs-major-version 19)
+        (compile-tm-gnus "gnus4")
+        )
+       ((< emacs-minor-version 30)
+        (compile-tm-gnus "gnus4")
+        (compile-tm-gnus "gnus5")
+        )
+       (t
+        (compile-tm-gnus "sgnus")
+        ))
+  (compile-el-files "./"      '("mime-setup"))
+  )
+
+(defun install-el-file (src dest file)
+  (let ((src-file (expand-file-name file src)))
+    (if (file-exists-p src-file)
+       (let ((full-path (expand-file-name file dest)))
+         (if (file-exists-p full-path)
+             (set-file-modes full-path el-file-mode)
+           )
+         (copy-file src-file full-path t t)
+         (princ (format "%s -> %s\n" file dest))
+         ))
+    ))
+
+(defun install-el-files (src dest &rest files)
+  (mapcar (function (lambda (file)
+                     (install-el-file src dest file)
+                     ))
+         files))
+
+(defun install-elc (src dest file)
+  (let ((src-file (expand-file-name file src)))
+    (if (file-exists-p src-file)
+       (let ((full-path (expand-file-name file dest)))
+         (copy-file src-file full-path t t)
+         (delete-file src-file)
+         (princ (format "%s -> %s\n" file dest))
+         ))
+    ))
+
+(defun install-elc-files (src dest &rest files)
+  (mapcar (function (lambda (file)
+                     (install-elc src dest file)
+                     ))
+         files))
+
+(defun install-el-and-elc-files (src dest el-files elc-files)
+  (if (not (file-exists-p dest))
+      (make-directory dest t)
+    )
+  (apply (function install-el-files)  src dest el-files)
+  (apply (function install-elc-files) src dest elc-files)
+  )
+
+(defun install-tm ()
+  (princ (format "%s\n" emacs-version))
+  (print TL_DIR)
+  (install-el-and-elc-files "../tl/" TL_DIR tl-el-files tl-elc-files)
+  (install-el-and-elc-files "../mel/" MEL_DIR mel-el-files mel-elc-files)
+  (install-el-and-elc-files "./" TM_KERNEL_DIR tm-el-files tm-elc-files)
+  (install-el-and-elc-files "mh-e/" TM_MHE_DIR
+                           tm-mh-e-el-files tm-mh-e-elc-files)
+  (install-tm-gnus)
+  (install-el-and-elc-files "./" SETUP_FILE_DIR setup-el-files setup-elc-files)
+  )
+
+(defun install-execs ()
+  (apply (function install-el-files) "src/" BIN_DIR BINS)
+  (apply (function install-el-files) "methods/" METHOD_DIR METHODS)
+  )
index a4d3990..916ccd2 100644 (file)
@@ -1,3 +1,31 @@
+Mon Mar  4 09:22:37 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm/mh-e: Version 7.55 was released.
+
+       * mk-tmh: use tmh-els file.
+
+Mon Mar  4 09:21:19 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tmh-els: New file.
+
+Thu Feb 29 15:23:53 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-mh-e.el (tm-mh-e/scroll-up-msg): New function.
+       (tm-mh-e/scroll-down-msg): New function.
+       (tm-mh-e/burst-multipart/digest): New function.
+
+       * tmh-comp.el: comments was modified.
+
+       * tmh-comp.el: Initial revision
+
+       * tm-mh-e.el: Functions about composing were separated to tmh-comp.el.
+
+Thu Feb 29 13:58:26 1996  OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
+
+       * tm-mh-e.el (tm-mh-e/extract-rejected-mail): New function
+       (cf. [tm-ja:1643])
+
+\f
 Wed Feb 28 13:27:54 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
 
        * tm/mh-e: Version 7.52 was released.
index e912bd9..13308ed 100644 (file)
@@ -24,7 +24,7 @@ TMDIR19       = $(HOME)/lib/emacs19/lisp
 
 
 FILES  = tm/mh-e/*.el tm/mh-e/Makefile tm/mh-e/mk-tmh tm/mh-e/*.ol
-TARFILE = tm-mh-e7.52.tar
+TARFILE = tm-mh-e7.55.tar
 
 
 elc:
index f4308e4..1df657b 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Emacs-Lisp-*-
 ;;;
-;;; $Id: mk-tmh,v 2.0 1995/12/25 05:48:21 morioka Exp morioka $
+;;; $Id: mk-tmh,v 3.0 1996/03/04 09:22:37 morioka Exp morioka $
 ;;;
 
 (setq load-path (append
 (require 'mh-e)
 (require 'emu)
 
-(setq tm-mh-e-modules
-      (append
-       '("tm-mh-e")
-       (if (not (boundp 'mh-e-version))
-          '("tm-mh-e3")
-        )
-       ))
-
-(setq tm-mh-e-el-files
-      (mapcar (function (lambda (module)
-                         (concat module ".el")
-                         ))
-             tm-mh-e-modules))
-
-(setq tm-mh-e-elc-files
-      (mapcar (function (lambda (module)
-                         (concat module ".elc")
-                         ))
-             tm-mh-e-modules))
+(load-file "tmh-els")
 
 (defun compile-tm-mh-e ()
   (require 'tm-mh-e)
index da145bb..551d900 100644 (file)
@@ -2,14 +2,14 @@
 ;;; tm-mh-e.el --- MIME extender for mh-e
 ;;;
 ;;; Copyright (C) 1995 Free Software Foundation, Inc.
-;;; Copyright (C) 1993,1994,1995 MORIOKA Tomohiko
+;;; 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.52 $
+;;; Version: $Revision: 7.55 $
 ;;; Keywords: mail, MH, MIME, multimedia, encoded-word, multilingual
 ;;;
 ;;; This file is part of tm (Tools for MIME).
@@ -47,7 +47,7 @@
 ;;;
 
 (defconst tm-mh-e/RCS-ID
-  "$Id: tm-mh-e.el,v 7.52 1996/02/27 16:25:19 morioka Exp $")
+  "$Id: tm-mh-e.el,v 7.55 1996/02/29 15:23:53 morioka Exp $")
 
 (defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID))
 
 (defvar tm-mh-e/decode-encoded-word t
   "*If non-nil, decode encoded-word when it is not MIME preview mode.")
 
-(defvar tm-mh-e/forwcomps "forwcomps"
-  "Name of file to be used as a skeleton for forwarding messages.
-Default is \"forwcomps\".  If not a complete path name, the file
-is searched for first in the user's MH directory, then in the
-system MH lib directory.")
-
 
 ;;; @ functions
 ;;;
@@ -226,6 +220,30 @@ With arg, turn MIME processing on if arg is positive."
     (mh-header-display)
     ))
 
+(defun tm-mh-e/scroll-up-msg (&optional arg)
+  (interactive)
+  (mh-page-msg (or arg 1))
+  )
+
+(defun tm-mh-e/scroll-down-msg (&optional arg)
+  (interactive)
+  (mh-page-msg (- (or arg 1)))
+  )
+
+(defun tm-mh-e/burst-multipart/digest ()
+  "Burst apart the current message, which should be a multipart/digest.
+The message is replaced by its table of contents and the letters from the
+digest are inserted into the folder after that message."
+  (interactive)
+  (let ((digest (mh-get-msg-num t)))
+    (mh-process-or-undo-commands mh-current-folder)
+    (mh-set-folder-modified-p t)               ; lock folder while bursting
+    (message "Bursting digest...")
+    (mh-exec-cmd "mhn" "-store" mh-current-folder digest)
+    (mh-scan-folder mh-current-folder (format "%d-last" mh-first-msg-num))
+    (message "Bursting digest...done")
+    ))
+
 
 ;;; @ for tm-view
 ;;;
@@ -233,6 +251,10 @@ With arg, turn MIME processing on if arg is positive."
 (fset 'tm-mh-e/code-convert-region-to-emacs
       (symbol-function 'mime/code-convert-region-to-emacs))
 
+(set-alist 'mime-viewer/code-converter-alist
+          'mh-show-mode
+          (function tm-mh-e/code-convert-region-to-emacs))
+
 (defun tm-mh-e/content-header-filter ()
   (goto-char (point-min))
   (mime-preview/cut-header)
@@ -241,6 +263,10 @@ With arg, turn MIME processing on if arg is positive."
   (mime/decode-message-header)
   )
 
+(set-alist 'mime-viewer/content-header-filter-alist
+          'mh-show-mode
+          (function tm-mh-e/content-header-filter))
+
 (defun tm-mh-e/quitting-method ()
   (let ((win (get-buffer-window
              mime/output-buffer-name))
@@ -259,6 +285,10 @@ With arg, turn MIME processing on if arg is positive."
     (mh-show (mh-get-msg-num t))
     ))
 
+(set-alist 'mime-viewer/quitting-method-alist
+          'mh-show-mode
+          (function tm-mh-e/quitting-method))
+
 (defun tm-mh-e/set-window-configuration ()
   (save-excursion
     (set-buffer mh-show-buffer)
@@ -269,7 +299,7 @@ With arg, turn MIME processing on if arg is positive."
 (add-hook 'mh-show-hook 'tm-mh-e/set-window-configuration)
 
 
-;;; @ for tm-partial
+;;; @@ for tm-partial
 ;;;
 
 (call-after-loaded
@@ -297,355 +327,67 @@ With arg, turn MIME processing on if arg is positive."
     )))
 
 
-;;; @ for tm-edit
+;;; @ set up
 ;;;
 
-(defun tm-mh-e::make-message (folder number)
-  (vector folder number)
-  )
-
-(defun tm-mh-e::message/folder (message)
-  (elt message 0)
-  )
-
-(defun tm-mh-e::message/number (message)
-  (elt message 1)
-  )
-
-(defun tm-mh-e::message/file-name (message)
-  (expand-file-name
-   (tm-mh-e::message/number message)
-   (mh-expand-file-name (tm-mh-e::message/folder message))
-   ))
-
-;;; modified by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
-;;;    1995/11/14 (cf. [tm-ja:1096])
-(defun tm-mh-e/prompt-for-message (prompt folder &optional default)
-  (let* ((files
-         (directory-files (mh-expand-file-name folder) nil "^[0-9]+$")
-         )
-        (folder-buf (get-buffer folder))
-        (default
-          (if folder-buf
-              (save-excursion
-                (set-buffer folder-buf)
-                (let* ((show-buffer (get-buffer mh-show-buffer))
-                       (show-buffer-file-name
-                        (buffer-file-name show-buffer)))
-                  (if show-buffer-file-name
-                      (file-name-nondirectory show-buffer-file-name)))))))
-    (if (or (null default)
-           (not (string-match "^[0-9]+$" default)))
-       (setq default
-             (if (and (string= folder mh-sent-from-folder)
-                      mh-sent-from-msg)
-                 (int-to-string mh-sent-from-msg)
-               (save-excursion
-                 (let (cur-msg)
-                   (if (and
-                        (= 0 (mh-exec-cmd-quiet nil "pick" folder "cur"))
-                        (set-buffer mh-temp-buffer)
-                        (setq cur-msg (buffer-string))
-                        (string-match "^[0-9]+$" cur-msg))
-                       (substring cur-msg 0 (match-end 0))
-                     (car files)))))))
-    (completing-read prompt
-                    (let ((i 0))
-                      (mapcar (function
-                               (lambda (file)
-                                 (setq i (+ i 1))
-                                 (list file i)
-                                 ))
-                              files)
-                      ) nil nil default)
-    ))
+(define-key mh-folder-mode-map "v" (function tm-mh-e/view-message))
+(define-key mh-folder-mode-map "\et" (function tm-mh-e/toggle-decoding-mode))
+(define-key mh-folder-mode-map "." (function tm-mh-e/show))
+(define-key mh-folder-mode-map "," (function tm-mh-e/header-display))
+(define-key mh-folder-mode-map "\e," (function tm-mh-e/raw-display))
+(define-key mh-folder-mode-map "\r" (function tm-mh-e/scroll-up-msg))
+(define-key mh-folder-mode-map "\e\r" (function tm-mh-e/scroll-down-msg))
+(define-key mh-folder-mode-map "\C-c\C-b"
+  (function tm-mh-e/burst-multipart/digest))
 
-(defun tm-mh-e/query-message (&optional message)
-  (let (folder number)
-    (if message
-       (progn
-         (setq folder (tm-mh-e::message/folder message))
-         (setq number (tm-mh-e::message/number message))
-         ))
-    (or (stringp folder)
-       (setq folder (mh-prompt-for-folder
-                     "Message from"
-                     (if (and (stringp mh-sent-from-folder)
-                              (string-match "^\\+" mh-sent-from-folder))
-                         mh-sent-from-folder "+inbox")
-                     nil)))
-    (setq number
-         (if (numberp number)
-             (number-to-string number)
-           (tm-mh-e/prompt-for-message "Message number: " folder)
-           ))
-    (tm-mh-e::make-message folder number)
-    ))
-;;; end
-
-;;; by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
-;;;    1995/11/14 (cf. [tm-ja:1099])
-(defun tm-mh-e/forward (to cc &optional msg-or-seq)
-  "Forward a message or message sequence as MIME message/rfc822.
-Defaults to displayed message. If optional prefix argument provided,
-then prompt for the message sequence. See also documentation for
-`\\[mh-send]' function."
-  (interactive (progn
-                (require 'mh-comp)
-                (list (mh-read-address "To: ")
-                      (mh-read-address "Cc: ")
-                      (if current-prefix-arg
-                          (mh-read-seq-default "Forward" t)
-                        (mh-get-msg-num t)
-                        ))))
-  (or msg-or-seq
-      (setq msg-or-seq (mh-get-msg-num t)))
-  (let* ((folder mh-current-folder)
-        (config (current-window-configuration))
-        ;; uses "draft" for compatibility with forw.
-        ;; forw always leaves file in "draft" since it doesn't have -draft
-        (draft-name (expand-file-name "draft" mh-user-path))
-        (draft (cond ((or (not (file-exists-p draft-name))
-                          (y-or-n-p "The file `draft' exists.  Discard it? "))
-                      (mh-exec-cmd "comp"
-                                   "-noedit" "-nowhatnowproc"
-                                   "-form" tm-mh-e/forwcomps
-                                   "-nodraftfolder")
-                      (prog1
-                          (mh-read-draft "" draft-name t)
-                        (mh-insert-fields "To:" to "Cc:" cc)
-                        (set-buffer-modified-p nil)))
-                     (t
-                      (mh-read-draft "" draft-name nil)))))
-    (require 'tm-edit)
-    (let ((msubtype "digest")
-         orig-from orig-subject multipart-flag
-         (tag-regexp
-          (concat "^"
-                  (regexp-quote (mime-make-tag "message" "rfc822"))))
-         )
-      (goto-char (point-min))
-      (save-excursion
-       (save-restriction
-         (goto-char (point-max))
-         (if (not (bolp)) (insert "\n"))
-         (let ((beg (point)))
-           (narrow-to-region beg beg)
-           (mh-exec-cmd-output "pick" nil folder msg-or-seq)
-           (if (> (count-lines (point) (point-max)) 1)
-               (setq multipart-flag t)
-             )
-           (while (re-search-forward "^\\([0-9]+\\)\n" nil t)
-             (let ((forw-msg
-                    (buffer-substring (match-beginning 1) (match-end 1)))
-                   (beg (match-beginning 0))
-                   (end (match-end 0))
-                   )
-               (save-restriction
-                 (narrow-to-region beg end)
-                 ;; modified for Emacs 18
-                 (delete-region beg end)
-                 (insert-file-contents
-                  (mh-expand-file-name forw-msg
-                                       (mh-expand-file-name folder))
+(defun tm-mh-e/summary-before-quit ()
+  (let ((buf (get-buffer mh-show-buffer)))
+    (if buf
+       (let ((the-buf (current-buffer)))
+         (switch-to-buffer buf)
+         (if (and mime::article/preview-buffer
+                  (setq buf (get-buffer mime::article/preview-buffer))
                   )
-                 (save-excursion
-                   (push-mark (point-max))
-                   (mime-editor/inserted-message-filter))
-                 (goto-char (point-max))
-                 )
-               (save-excursion
-                 (goto-char beg)
-                 (mime-editor/insert-tag "message" "rfc822")
-                 )))
-           (delete-region (point) (point-max))
-           (if multipart-flag
-               (mime-editor/enclose-region "digest" beg (point))
-             ))))
-      (re-search-forward tag-regexp)
-      (forward-line 1)
-      (save-restriction
-       (narrow-to-region (point) (point-max))
-       (setq orig-from (mh-get-header-field "From:"))
-       (setq orig-subject (mh-get-header-field "Subject:")))
-      (let ((forw-subject
-            (mh-forwarded-letter-subject orig-from orig-subject)))
-       (mh-insert-fields "Subject:" forw-subject)
-       (goto-char (point-min))
-       (re-search-forward tag-regexp)
-       (forward-line -1)
-       (delete-other-windows)
-       (if (numberp msg-or-seq)
-           (mh-add-msgs-to-seq msg-or-seq 'forwarded t)
-         (mh-add-msgs-to-seq (mh-seq-to-msgs msg-or-seq) 'forwarded t))
-       (mh-compose-and-send-mail draft "" folder msg-or-seq
-                                 to forw-subject cc
-                                 mh-note-forw "Forwarded:"
-                                 config)))))
-;;; end
-
-(defun tm-mh-e/insert-message (&optional message)
-  ;; always ignores message
-  (let ((article-buffer
-        (if (not (and (stringp mh-sent-from-folder)
-                      (numberp mh-sent-from-msg)
-                      ))
-            (cond ((and (boundp 'gnus-original-article-buffer)
-                        (bufferp mh-sent-from-folder)
-                        (get-buffer gnus-original-article-buffer)
-                        )
-                   gnus-original-article-buffer)
-                  ((and (boundp 'gnus-article-buffer)
-                        (get-buffer gnus-article-buffer)
-                        (bufferp mh-sent-from-folder)
-                        )
-                   (save-excursion
-                     (set-buffer gnus-article-buffer)
-                     (if (eq major-mode 'mime/viewer-mode)
-                         mime::preview/article-buffer
-                       (current-buffer)
-                       )))
-                  ))))
-    (if (null article-buffer)
-       (tm-mh-e/insert-mail
-        (tm-mh-e::make-message mh-sent-from-folder mh-sent-from-msg)
-        )
-      (insert-buffer article-buffer)
-      (mime-editor/inserted-message-filter)
-      )
-    ))
+             (progn
+               (switch-to-buffer the-buf)
+               (kill-buffer buf)
+               )
+           (switch-to-buffer the-buf)
+           )
+         ))))
 
-(defun tm-mh-e/insert-mail (&optional message)
-  (save-excursion
-    (save-restriction
-      (let ((message-file
-            (tm-mh-e::message/file-name (tm-mh-e/query-message message))))
-       (narrow-to-region (point) (point))
-       (insert-file-contents message-file)
-       (push-mark (point-max))
-       (mime-editor/inserted-message-filter)
-    ))))
+(add-hook 'mh-before-quit-hook (function tm-mh-e/summary-before-quit))
+            
 
-(call-after-loaded
- 'tm-edit
- (function
-  (lambda ()
-    (set-alist
-     'mime-editor/message-inserter-alist
-     'mh-letter-mode (function tm-mh-e/insert-message))
-    (set-alist
-     'mime-editor/mail-inserter-alist
-     'mh-letter-mode (function tm-mh-e/insert-mail))
-    (set-alist
-     'mime-editor/mail-inserter-alist
-     'news-reply-mode (function tm-mh-e/insert-mail))
-    )))
+;;; @@ for tmh-comp.el
+;;;
 
-(defun tm-mh-e/insert-letter (verbatim)
-  "Interface to mh-insert-letter."
-  (interactive "P")
-  (let*
-      ((folder (mh-prompt-for-folder
-               "Message from"
-               (if (and (stringp mh-sent-from-folder)
-                        (string-match "^\\+" mh-sent-from-folder))
-                   mh-sent-from-folder "+inbox")
-               nil))
-       (number (tm-mh-e/prompt-for-message "Message number: " folder)))
-    (mh-insert-letter folder number verbatim)))
-
-(defun tm-mh-e/yank-cur-msg ()
-  "Interface to mh-yank-cur-msg."
-  (interactive)
-  (let ((mh-sent-from-folder mh-sent-from-folder)
-       (mh-sent-from-msg mh-sent-from-msg))
-    (if (not (stringp mh-sent-from-folder))
-       (cond ((and (boundp 'gnus-article-buffer)
-                   (get-buffer gnus-article-buffer)
-                   (bufferp mh-sent-from-folder)
-                   ) ; might be called from GNUS
-              (if (boundp 'gnus-article-copy) ; might be sgnus
-                  (save-excursion
-                    (gnus-copy-article-buffer)
-                    (setq mh-sent-from-folder gnus-article-copy)
-                    (set-buffer mh-sent-from-folder)
-                    (setq mh-show-buffer gnus-article-copy))
-                (save-excursion
-                  (setq mh-sent-from-folder gnus-article-buffer)
-                  (set-buffer gnus-article-buffer)
-                  (setq mh-show-buffer (current-buffer)))))
-             (t
-              (error "There is no current message"))))
-    (mh-yank-cur-msg)))
-
-(autoload 'mh-read-draft "mh-comp")
-(autoload 'mime/edit-again "tm-edit")
-
-(defun tm-mh-e/edit-again (msg)
-  (interactive (list (mh-get-msg-num t)))
-  (catch 'tag
-    (let* ((from-folder mh-current-folder)
-          (config (current-window-configuration))
-          code-conversion
-          (draft
-           (cond ((and mh-draft-folder (equal from-folder mh-draft-folder))
-                  (let ((name (format "draft-%d" msg)))
-                    (if (get-buffer name)
-                        (throw 'tag (pop-to-buffer name))
-                      )
-                    (let ((file-coding-system-for-read *noconv*)
-                          (filename
-                           (mh-msg-filename msg mh-draft-folder)
-                           ))
-                      (set-buffer (get-buffer-create name))
-                      (insert-file-contents filename)
-                      (setq buffer-file-name filename)
-                      (setq code-conversion t)
-                      )
-                    (pop-to-buffer name)
-                    (if (re-search-forward "\\(^$\\|^-+$\\)" nil t)
-                        (replace-match "")
-                        )
-                    name))
-                 (t
-                  (prog1
-                      (let ((file-coding-system-for-read *noconv*))
-                        (mh-read-draft "clean-up" (mh-msg-filename msg) nil)
-                        )
-                    (setq code-conversion t)
-                    ))))
-          )
-      (goto-char (point-min))
-      (mh-clean-msg-header (point-min) mh-new-draft-cleaned-headers nil)
-      (if code-conversion
-         (let ((cs (code-detect-region (point-min)(point-max))))
-           (set-file-coding-system
-            (if (listp cs)
-                (car cs)
-              cs))
-           ))
-      (save-buffer)
-      (mime/edit-again code-conversion t t)
-      (goto-char (point-min))
-      (mh-compose-and-send-mail draft "" from-folder nil nil nil nil nil nil
-                               config)
-      )))
+(autoload 'tm-mh-e/edit-again "tmh-comp"
+  "Clean-up a draft or a message previously sent and make it resendable." t)
+(autoload 'tm-mh-e/extract-rejected-mail "tmh-comp"
+  "Extract a letter returned by the mail system and make it re-editable." t)
+(autoload 'tm-mh-e/forward "tmh-comp"
+  "Forward a message or message sequence by MIME style." t)
 
 (call-after-loaded
  'mime-setup
  (function
   (lambda ()
     (substitute-key-definition
+     'mh-edit-again 'tm-mh-e/edit-again mh-folder-mode-map)
+    (substitute-key-definition
+     'mh-extract-rejected-mail 'tm-mh-e/extract-rejected-mail
+     mh-folder-mode-map)
+    (substitute-key-definition
      'mh-forward 'tm-mh-e/forward mh-folder-mode-map)
+
     (call-after-loaded
      'mh-comp
      (function
       (lambda ()
-       (substitute-key-definition
-        'mh-yank-cur-msg 'tm-mh-e/yank-cur-msg mh-letter-mode-map)
-       )))
-    (substitute-key-definition
-     'mh-edit-again 'tm-mh-e/edit-again mh-folder-mode-map)
+       (require 'tmh-comp)
+       ))
+     'mh-letter-mode-hook)
     )))
 
 
@@ -660,56 +402,6 @@ then prompt for the message sequence. See also documentation for
     )))
 
 
-;;; @ set up
-;;;
-
-(define-key mh-folder-mode-map "v" (function tm-mh-e/view-message))
-(define-key mh-folder-mode-map "\et" (function tm-mh-e/toggle-decoding-mode))
-(define-key mh-folder-mode-map "." (function tm-mh-e/show))
-(define-key mh-folder-mode-map "," (function tm-mh-e/header-display))
-(define-key mh-folder-mode-map "\e," (function tm-mh-e/raw-display))
-(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)
-             )))
-
-(defun tm-mh-e/summary-before-quit ()
-  (let ((buf (get-buffer mh-show-buffer)))
-    (if buf
-       (let ((the-buf (current-buffer)))
-         (switch-to-buffer buf)
-         (if (and mime::article/preview-buffer
-                  (setq buf (get-buffer mime::article/preview-buffer))
-                  )
-             (progn
-               (switch-to-buffer the-buf)
-               (kill-buffer buf)
-               )
-           (switch-to-buffer the-buf)
-           )
-         ))))
-
-(add-hook 'mh-before-quit-hook (function tm-mh-e/summary-before-quit))
-            
-(set-alist 'mime-viewer/quitting-method-alist
-          'mh-show-mode
-          (function tm-mh-e/quitting-method))
-
-(set-alist 'mime-viewer/content-header-filter-alist
-          'mh-show-mode
-          (function tm-mh-e/content-header-filter))
-
-(set-alist 'mime-viewer/code-converter-alist
-          'mh-show-mode
-          (function tm-mh-e/code-convert-region-to-emacs))
-
-
 ;;; @ end
 ;;;
 
diff --git a/mh-e/tmh-comp.el b/mh-e/tmh-comp.el
new file mode 100644 (file)
index 0000000..6a8ce6e
--- /dev/null
@@ -0,0 +1,443 @@
+;;;
+;;; tm-mh-e.el --- tm-mh-e functions for composing messages
+;;;
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1993 .. 1996 MORIOKA Tomohiko
+;;; Copyright (C) 1995,1996 OKABE Yasuo
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;;         OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
+;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Created: 1996/2/29 (separated from tm-mh-e.el)
+;;; Version:
+;;;    $Id: tmh-comp.el,v 2.0 1996/02/29 15:11:19 morioka Exp $
+;;; 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.
+;;;
+;;; Code:
+
+(require 'mh-comp)
+(require 'tm-edit)
+
+
+;;; @ variable
+;;;
+
+(defvar tm-mh-e/forwcomps "forwcomps"
+  "Name of file to be used as a skeleton for forwarding messages.
+Default is \"forwcomps\".  If not a complete path name, the file
+is searched for first in the user's MH directory, then in the
+system MH lib directory.")
+
+
+;;; @ for tm-edit
+;;;
+
+(defun tm-mh-e::make-message (folder number)
+  (vector folder number)
+  )
+
+(defun tm-mh-e::message/folder (message)
+  (elt message 0)
+  )
+
+(defun tm-mh-e::message/number (message)
+  (elt message 1)
+  )
+
+(defun tm-mh-e::message/file-name (message)
+  (expand-file-name
+   (tm-mh-e::message/number message)
+   (mh-expand-file-name (tm-mh-e::message/folder message))
+   ))
+
+;;; modified by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
+;;;    1995/11/14 (cf. [tm-ja:1096])
+(defun tm-mh-e/prompt-for-message (prompt folder &optional default)
+  (let* ((files
+         (directory-files (mh-expand-file-name folder) nil "^[0-9]+$")
+         )
+        (folder-buf (get-buffer folder))
+        (default
+          (if folder-buf
+              (save-excursion
+                (set-buffer folder-buf)
+                (let* ((show-buffer (get-buffer mh-show-buffer))
+                       (show-buffer-file-name
+                        (buffer-file-name show-buffer)))
+                  (if show-buffer-file-name
+                      (file-name-nondirectory show-buffer-file-name)))))))
+    (if (or (null default)
+           (not (string-match "^[0-9]+$" default)))
+       (setq default
+             (if (and (string= folder mh-sent-from-folder)
+                      mh-sent-from-msg)
+                 (int-to-string mh-sent-from-msg)
+               (save-excursion
+                 (let (cur-msg)
+                   (if (and
+                        (= 0 (mh-exec-cmd-quiet nil "pick" folder "cur"))
+                        (set-buffer mh-temp-buffer)
+                        (setq cur-msg (buffer-string))
+                        (string-match "^[0-9]+$" cur-msg))
+                       (substring cur-msg 0 (match-end 0))
+                     (car files)))))))
+    (completing-read prompt
+                    (let ((i 0))
+                      (mapcar (function
+                               (lambda (file)
+                                 (setq i (+ i 1))
+                                 (list file i)
+                                 ))
+                              files)
+                      ) nil nil default)
+    ))
+
+;;; modified by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
+;;;    1995/11/14 (cf. [tm-ja:1096])
+(defun tm-mh-e/query-message (&optional message)
+  (let (folder number)
+    (if message
+       (progn
+         (setq folder (tm-mh-e::message/folder message))
+         (setq number (tm-mh-e::message/number message))
+         ))
+    (or (stringp folder)
+       (setq folder (mh-prompt-for-folder
+                     "Message from"
+                     (if (and (stringp mh-sent-from-folder)
+                              (string-match "^\\+" mh-sent-from-folder))
+                         mh-sent-from-folder "+inbox")
+                     nil)))
+    (setq number
+         (if (numberp number)
+             (number-to-string number)
+           (tm-mh-e/prompt-for-message "Message number: " folder)
+           ))
+    (tm-mh-e::make-message folder number)
+    ))
+
+(defun tm-mh-e/insert-message (&optional message)
+  ;; always ignores message
+  (let ((article-buffer
+        (if (not (and (stringp mh-sent-from-folder)
+                      (numberp mh-sent-from-msg)
+                      ))
+            (cond ((and (boundp 'gnus-original-article-buffer)
+                        (bufferp mh-sent-from-folder)
+                        (get-buffer gnus-original-article-buffer)
+                        )
+                   gnus-original-article-buffer)
+                  ((and (boundp 'gnus-article-buffer)
+                        (get-buffer gnus-article-buffer)
+                        (bufferp mh-sent-from-folder)
+                        )
+                   (save-excursion
+                     (set-buffer gnus-article-buffer)
+                     (if (eq major-mode 'mime/viewer-mode)
+                         mime::preview/article-buffer
+                       (current-buffer)
+                       )))
+                  ))))
+    (if (null article-buffer)
+       (tm-mh-e/insert-mail
+        (tm-mh-e::make-message mh-sent-from-folder mh-sent-from-msg)
+        )
+      (insert-buffer article-buffer)
+      (mime-editor/inserted-message-filter)
+      )
+    ))
+
+(defun tm-mh-e/insert-mail (&optional message)
+  (save-excursion
+    (save-restriction
+      (let ((message-file
+            (tm-mh-e::message/file-name (tm-mh-e/query-message message))))
+       (narrow-to-region (point) (point))
+       (insert-file-contents message-file)
+       (push-mark (point-max))
+       (mime-editor/inserted-message-filter)
+    ))))
+
+(set-alist 'mime-editor/message-inserter-alist
+          'mh-letter-mode (function tm-mh-e/insert-message))
+(set-alist 'mime-editor/mail-inserter-alist
+          'mh-letter-mode (function tm-mh-e/insert-mail))
+(set-alist 'mime-editor/mail-inserter-alist
+          'news-reply-mode (function tm-mh-e/insert-mail))
+
+
+;;; @ commands using tm-edit features
+;;;
+
+(defun tm-mh-e/edit-again (msg)
+  "Clean-up a draft or a message previously sent and make it resendable.
+Default is the current message.
+The variable mh-new-draft-cleaned-headers specifies the headers to remove.
+See also documentation for `\\[mh-send]' function."
+  (interactive (list (mh-get-msg-num t)))
+  (catch 'tag
+    (let* ((from-folder mh-current-folder)
+          (config (current-window-configuration))
+          code-conversion
+          (draft
+           (cond ((and mh-draft-folder (equal from-folder mh-draft-folder))
+                  (let ((name (format "draft-%d" msg)))
+                    (if (get-buffer name)
+                        (throw 'tag (pop-to-buffer name))
+                      )
+                    (let ((file-coding-system-for-read *noconv*)
+                          (filename
+                           (mh-msg-filename msg mh-draft-folder)
+                           ))
+                      (set-buffer (get-buffer-create name))
+                      (insert-file-contents filename)
+                      (setq buffer-file-name filename)
+                      (setq code-conversion t)
+                      )
+                    (pop-to-buffer name)
+                    (if (re-search-forward "\\(^$\\|^-+$\\)" nil t)
+                        (replace-match "")
+                        )
+                    name))
+                 (t
+                  (prog1
+                      (let ((file-coding-system-for-read *noconv*))
+                        (mh-read-draft "clean-up" (mh-msg-filename msg) nil)
+                        )
+                    (setq code-conversion t)
+                    ))))
+          )
+      (goto-char (point-min))
+      (mh-clean-msg-header (point-min) mh-new-draft-cleaned-headers nil)
+      (if code-conversion
+         (let ((cs (code-detect-region (point-min)(point-max))))
+           (set-file-coding-system
+            (if (listp cs)
+                (car cs)
+              cs))
+           ))
+      (save-buffer)
+      (mime/edit-again code-conversion t t)
+      (goto-char (point-min))
+      (mh-compose-and-send-mail draft "" from-folder nil nil nil nil nil nil
+                               config)
+      )))
+
+;;; by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
+;;;    1996/2/29 (cf. [tm-ja:1643])
+(defun tm-mh-e/extract-rejected-mail (msg)
+  "Extract a letter returned by the mail system and make it re-editable.
+Default is the current message.  The variable mh-new-draft-cleaned-headers
+gives the headers to clean out of the original message."
+  (interactive (list (mh-get-msg-num t)))
+  (let ((from-folder mh-current-folder)
+       (config (current-window-configuration))
+       (draft (mh-read-draft "extraction" (mh-msg-filename msg) nil)))
+    (setq buffer-read-only nil)
+    (goto-char (point-min))
+    (cond 
+     ((and
+       (re-search-forward
+       (concat "^\\($\\|[Cc]ontent-[Tt]ype:[ \t]+multipart/\\)") nil t)
+       (not (bolp))
+       (re-search-forward "boundary=\"\\([^\"]+\\)\"" nil t))
+      (let ((case-fold-search t)
+           (boundary (buffer-substring (match-beginning 1) (match-end 1))))
+       (cond
+        ((re-search-forward
+          (concat "^--" boundary "\n"
+                  "content-type:[ \t]+"
+                  "\\(message/rfc822\\|text/rfc822-headers\\)\n"
+                  "\\(.+\n\\)*\n") nil t)
+         (delete-region (point-min) (point))
+         (mh-clean-msg-header (point-min) mh-new-draft-cleaned-headers nil)
+         (search-forward
+          (concat "\n--" boundary "--\n") nil t)
+         (delete-region (match-beginning 0) (point-max)))
+        (t
+         (message "Seems no message/rfc822 part.")))))
+     ((re-search-forward mh-rejected-letter-start nil t)
+      (skip-chars-forward " \t\n")
+      (delete-region (point-min) (point))
+      (mh-clean-msg-header (point-min) mh-new-draft-cleaned-headers nil))
+     (t
+      (message "Does not appear to be a rejected letter.")))
+    (goto-char (point-min))
+    (if (re-search-forward "^-+$" nil t)
+       (replace-match "")
+      )
+    (mime/edit-again nil t t)
+    (goto-char (point-min))
+    (set-buffer-modified-p nil)
+    (mh-compose-and-send-mail draft "" from-folder msg
+                             (mh-get-header-field "To:")
+                             (mh-get-header-field "From:")
+                             (mh-get-header-field "Cc:")
+                             nil nil config)))
+
+;;; by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
+;;;    1995/11/14 (cf. [tm-ja:1099])
+(defun tm-mh-e/forward (to cc &optional msg-or-seq)
+  "Forward a message or message sequence as MIME message/rfc822.
+Defaults to displayed message. If optional prefix argument provided,
+then prompt for the message sequence. See also documentation for
+`\\[mh-send]' function."
+  (interactive (progn
+                (require 'mh-comp)
+                (list (mh-read-address "To: ")
+                      (mh-read-address "Cc: ")
+                      (if current-prefix-arg
+                          (mh-read-seq-default "Forward" t)
+                        (mh-get-msg-num t)
+                        ))))
+  (or msg-or-seq
+      (setq msg-or-seq (mh-get-msg-num t)))
+  (let* ((folder mh-current-folder)
+        (config (current-window-configuration))
+        ;; uses "draft" for compatibility with forw.
+        ;; forw always leaves file in "draft" since it doesn't have -draft
+        (draft-name (expand-file-name "draft" mh-user-path))
+        (draft (cond ((or (not (file-exists-p draft-name))
+                          (y-or-n-p "The file `draft' exists.  Discard it? "))
+                      (mh-exec-cmd "comp"
+                                   "-noedit" "-nowhatnowproc"
+                                   "-form" tm-mh-e/forwcomps
+                                   "-nodraftfolder")
+                      (prog1
+                          (mh-read-draft "" draft-name t)
+                        (mh-insert-fields "To:" to "Cc:" cc)
+                        (set-buffer-modified-p nil)))
+                     (t
+                      (mh-read-draft "" draft-name nil)))))
+    (require 'tm-edit)
+    (let ((msubtype "digest")
+         orig-from orig-subject multipart-flag
+         (tag-regexp
+          (concat "^"
+                  (regexp-quote (mime-make-tag "message" "rfc822"))))
+         )
+      (goto-char (point-min))
+      (save-excursion
+       (save-restriction
+         (goto-char (point-max))
+         (if (not (bolp)) (insert "\n"))
+         (let ((beg (point)))
+           (narrow-to-region beg beg)
+           (mh-exec-cmd-output "pick" nil folder msg-or-seq)
+           (if (> (count-lines (point) (point-max)) 1)
+               (setq multipart-flag t)
+             )
+           (while (re-search-forward "^\\([0-9]+\\)\n" nil t)
+             (let ((forw-msg
+                    (buffer-substring (match-beginning 1) (match-end 1)))
+                   (beg (match-beginning 0))
+                   (end (match-end 0))
+                   )
+               (save-restriction
+                 (narrow-to-region beg end)
+                 ;; modified for Emacs 18
+                 (delete-region beg end)
+                 (insert-file-contents
+                  (mh-expand-file-name forw-msg
+                                       (mh-expand-file-name folder))
+                  )
+                 (save-excursion
+                   (push-mark (point-max))
+                   (mime-editor/inserted-message-filter))
+                 (goto-char (point-max))
+                 )
+               (save-excursion
+                 (goto-char beg)
+                 (mime-editor/insert-tag "message" "rfc822")
+                 )))
+           (delete-region (point) (point-max))
+           (if multipart-flag
+               (mime-editor/enclose-region "digest" beg (point))
+             ))))
+      (re-search-forward tag-regexp)
+      (forward-line 1)
+      (save-restriction
+       (narrow-to-region (point) (point-max))
+       (setq orig-from (mh-get-header-field "From:"))
+       (setq orig-subject (mh-get-header-field "Subject:")))
+      (let ((forw-subject
+            (mh-forwarded-letter-subject orig-from orig-subject)))
+       (mh-insert-fields "Subject:" forw-subject)
+       (goto-char (point-min))
+       (re-search-forward tag-regexp)
+       (forward-line -1)
+       (delete-other-windows)
+       (if (numberp msg-or-seq)
+           (mh-add-msgs-to-seq msg-or-seq 'forwarded t)
+         (mh-add-msgs-to-seq (mh-seq-to-msgs msg-or-seq) 'forwarded t))
+       (mh-compose-and-send-mail draft "" folder msg-or-seq
+                                 to forw-subject cc
+                                 mh-note-forw "Forwarded:"
+                                 config)))))
+
+(defun tm-mh-e/insert-letter (verbatim)
+  "Interface to mh-insert-letter."
+  (interactive "P")
+  (let*
+      ((folder (mh-prompt-for-folder
+               "Message from"
+               (if (and (stringp mh-sent-from-folder)
+                        (string-match "^\\+" mh-sent-from-folder))
+                   mh-sent-from-folder "+inbox")
+               nil))
+       (number (tm-mh-e/prompt-for-message "Message number: " folder)))
+    (mh-insert-letter folder number verbatim)))
+
+(defun tm-mh-e/yank-cur-msg ()
+  "Interface to mh-yank-cur-msg."
+  (interactive)
+  (let ((mh-sent-from-folder mh-sent-from-folder)
+       (mh-sent-from-msg mh-sent-from-msg))
+    (if (not (stringp mh-sent-from-folder))
+       (cond ((and (boundp 'gnus-article-buffer)
+                   (get-buffer gnus-article-buffer)
+                   (bufferp mh-sent-from-folder)
+                   ) ; might be called from GNUS
+              (if (boundp 'gnus-article-copy) ; might be sgnus
+                  (save-excursion
+                    (gnus-copy-article-buffer)
+                    (setq mh-sent-from-folder gnus-article-copy)
+                    (set-buffer mh-sent-from-folder)
+                    (setq mh-show-buffer gnus-article-copy))
+                (save-excursion
+                  (setq mh-sent-from-folder gnus-article-buffer)
+                  (set-buffer gnus-article-buffer)
+                  (setq mh-show-buffer (current-buffer)))))
+             (t
+              (error "There is no current message"))))
+    (mh-yank-cur-msg)))
+
+(substitute-key-definition
+ 'mh-yank-cur-msg 'tm-mh-e/yank-cur-msg mh-letter-mode-map)
+(substitute-key-definition
+ 'mh-insert-letter 'tm-mh-e/insert-letter mh-letter-mode-map)
+
+
+;;; @ end
+;;;
+
+(provide 'tmh-comp)
+(require 'tm-mh-e)
+
+;;; tmh-comp.el ends here
diff --git a/mh-e/tmh-els b/mh-e/tmh-els
new file mode 100644 (file)
index 0000000..4aa438e
--- /dev/null
@@ -0,0 +1,26 @@
+;;; -*-Emacs-Lisp-*-
+;;;
+;;; $Id: tmh-els,v 1.1 1996/03/04 09:21:19 morioka Exp $
+;;;
+
+(require 'mh-e)
+
+(setq tm-mh-e-modules
+      (append
+       '("tm-mh-e" "tmh-comp")
+       (if (not (boundp 'mh-e-version))
+          '("tm-mh-e3")
+        )
+       ))
+
+(setq tm-mh-e-el-files
+      (mapcar (function (lambda (module)
+                         (concat module ".el")
+                         ))
+             tm-mh-e-modules))
+
+(setq tm-mh-e-elc-files
+      (mapcar (function (lambda (module)
+                         (concat module ".elc")
+                         ))
+             tm-mh-e-modules))
diff --git a/mime-setup.el.in b/mime-setup.el.in
new file mode 100644 (file)
index 0000000..816c708
--- /dev/null
@@ -0,0 +1,134 @@
+;;;
+;;; mime-setup.el --- setup file for tm viewer and composer.
+;;;
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Version:
+;;;    $Id: mime-setup.el,v 7.14 1996/02/14 09:15:36 morioka Exp $
+;;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word
+;;;
+;;; 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.
+;;;
+;;; Code:
+
+(require 'tm-setup)
+
+(autoload 'mime/editor-mode "tm-edit"
+  "Minor mode for editing MIME message." t)
+(autoload 'mime/decode-message-header "tm-ew-d"
+  "Decode MIME encoded-words in message header." t)
+
+(defun mime-setup-decode-message-header ()
+  (save-excursion
+    (save-restriction
+      (goto-char (point-min))
+      (narrow-to-region
+       (point-min)
+       (if (re-search-forward
+           (concat "^" (regexp-quote mail-header-separator) "$")
+           nil t)
+          (match-beginning 0)
+        (point-max)
+        ))
+      (mime/decode-message-header)
+      (set-buffer-modified-p nil)
+      )))
+
+(add-hook 'mime/editor-mode-hook 'mime-setup-decode-message-header)
+
+
+;;; @ variables
+;;;
+
+(defvar mime-setup-use-sc nil)
+(defvar mime-setup-use-signature t)
+(defvar mime-setup-default-signature-key "\C-c\C-s")
+(defvar mime-setup-signature-key-alist '((mail-mode . "\C-c\C-w")))
+
+
+;;; @ for signature
+;;;
+
+(defun mime-setup-set-signature-key ()
+  (let ((key (or (cdr (assq major-mode mime-setup-signature-key-alist))
+                mime-setup-default-signature-key)))
+    (define-key (current-local-map) key (function insert-signature))
+    ))
+
+(if mime-setup-use-signature
+    (progn
+      (autoload 'insert-signature "signature" "Insert signature" t)
+      (add-hook 'mime/editor-mode-hook 'mime-setup-set-signature-key)
+      (setq gnus-signature-file nil)
+      (setq mail-signature nil)
+      ))
+
+
+;;; @ about SuperCite
+;;;
+
+(if mime-setup-use-sc
+    (require 'sc-setup)
+  )
+
+
+;;; @ for RMAIL and VM
+;;;
+
+(add-hook 'mail-setup-hook 'mime/decode-message-header)
+(add-hook 'mail-setup-hook 'mime/editor-mode 'append)
+(add-hook 'mail-send-hook  'mime-editor/maybe-translate)
+
+
+;;; @ for mh-e
+;;;
+
+(defun mime-setup-mh-draft-setting ()
+  (mime/editor-mode)
+  (make-local-variable 'mail-header-separator)
+  (setq mail-header-separator "--------")
+  (save-excursion
+    (goto-char (point-min))
+    (setq buffer-read-only nil)
+    (if (re-search-forward "^-*$" nil t)
+       (progn
+         (replace-match mail-header-separator)
+         (set-buffer-modified-p (buffer-modified-p))
+         ))
+    ))
+
+(add-hook 'mh-letter-mode-hook 'mime-setup-mh-draft-setting t)
+(add-hook 'mh-before-send-letter-hook 'mime-editor/maybe-translate)
+
+
+;;; @ for GNUS
+;;;
+
+(add-hook 'news-reply-mode-hook 'mime/editor-mode)
+(add-hook 'news-inews-hook      'mime-editor/maybe-translate)
+
+
+;;; @ end
+;;;
+
+(provide 'mime-setup)
+
+(run-hooks 'mime-setup-load-hook)
+
+;;; mime-setup.el ends here
index cb5a679..dc20bfe 100644 (file)
@@ -5,7 +5,7 @@
 ;;;
 ;;; Author: KOBAYASHI Shuhei <shuhei@cmpt01.phys.tohoku.ac.jp>
 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;;; Version: $Id: tm-bbdb.el,v 5.0 1996/02/23 17:44:53 morioka Exp $
+;;; Version: $Id: tm-bbdb.el,v 6.0 1996/03/04 11:58:55 morioka Exp $
 ;;; Keywords: mail, news, MIME, multimedia, multilingual, BBDB
 ;;;
 ;;; This file is part of tm (Tools for MIME).
@@ -29,6 +29,7 @@
 (require 'bbdb)
 (require 'tl-822)
 (require 'tm-ew-d)
+(require 'tm-view)
 
 
 ;;; @ mail-extr
diff --git a/tm-cfg b/tm-cfg
new file mode 100644 (file)
index 0000000..a562f2f
--- /dev/null
+++ b/tm-cfg
@@ -0,0 +1,88 @@
+;;; -*-Emacs-Lisp-*-
+;;;
+;;; $Id: tm-cfg,v 1.1 1996/03/04 08:37:01 morioka Exp morioka $
+;;;
+
+(setq load-path (append
+                (mapcar (function
+                         (lambda (path)
+                           (expand-file-name path (getenv "PWD"))
+                           ))
+                        '("." "../tl/" "../mel/" "mh-e/")
+                        )
+                load-path))
+
+(require 'tl-misc)
+
+
+;; Please specify VM path.
+(add-path "vm-5.95beta/" 'all-paths)
+
+;; Please specify Mailcrypt path.
+(add-path "mailcrypt-3.4/" 'all-paths)
+
+;; Please specify BBDB path.
+(add-path "bbdb-1.50/" 'all-paths)
+
+;; Please specify shell command path.
+(setq SHELL "/bin/sh")
+
+;; Please specify install path prefix.
+(setq PREFIX "~/")
+;;(setq PREFIX "/usr/local/")
+
+(setq EMACS_PREFIX
+      (cond ((boundp 'NEMACS) "nemacs/")
+           ((boundp 'MULE)   "mule/")
+           ((string-match "XEmacs" emacs-version) "xemacs/")
+           (t "emacs/")
+           ))
+
+(setq DATA_PREFIX
+      (if (or (< emacs-major-version 19)
+             (< emacs-minor-version 29)
+             )
+         "lib/"
+       "share/"))
+
+(setq DATADIR (expand-file-name DATA_PREFIX PREFIX))
+
+(setq LISP_PREFIX
+      (if (>= emacs-major-version 19)
+         "site-lisp/"
+       "local.lisp/"))
+
+(setq EMACS_DATADIR (expand-file-name EMACS_PREFIX DATADIR))
+
+(setq LISPDIR (expand-file-name LISP_PREFIX EMACS_DATADIR))
+
+
+;; Please specify mime-setup.{el|elc} install path.
+(setq SETUP_FILE_DIR LISPDIR)
+
+
+(setq TM_PREFIX "")
+
+(setq TM_LISPDIR (expand-file-name TM_PREFIX LISPDIR))
+
+(setq TL_DIR (expand-file-name "tl/" TM_LISPDIR))
+(setq MEL_DIR (expand-file-name "mel/" TM_LISPDIR))
+(setq TM_KERNEL_DIR (expand-file-name "tm/" TM_LISPDIR))
+(setq TM_MHE_DIR TM_KERNEL_DIR)
+(setq TM_GNUS_DIR TM_KERNEL_DIR)
+
+
+(setq el-file-mode (+ (* 64 6)(* 8 4) 4))
+
+
+(setq BINS '("src/ol2" "src/decode-b"))
+(setq METHODS
+      '("tm-au" "tm-file" "tm-html" "tm-image" "tm-mpeg" "tm-plain"
+       "tmdecode"))
+
+
+;; Please specify binary path.
+(setq BIN_DIR (expand-file-name "bin/" PREFIX))
+
+;; Please specify binary path.
+(setq METHOD_DIR BIN_DIR)
diff --git a/tm-els b/tm-els
new file mode 100644 (file)
index 0000000..8537e0f
--- /dev/null
+++ b/tm-els
@@ -0,0 +1,99 @@
+;;; -*-Emacs-Lisp-*-
+;;;
+;;; $Id: tm-els,v 1.2 1996/03/04 08:57:38 morioka Exp $
+;;;
+
+(require 'tl-misc)
+
+(setq tm-modules
+      (cons
+       (cond ((boundp 'NEMACS)
+             "tm-nemacs"
+             )
+            ((boundp 'MULE)
+             "tm-mule"
+             )
+            (t
+             "tm-orig"
+             ))
+       '("signature"
+        "tm-def"
+        "tm-ew-d" "tm-parse" "tm-view" "tm-play" "tm-partial"
+        "tm-rich"
+        "tm-latex" "tm-html" "tm-tar" "tm-file"
+        "tm-ew-e"
+        "tm-edit"
+        "tm-rmail" "tm-mail"
+        "tm-setup"
+        )))
+
+(setq tm-uncompile-el-files '("sc-setup.el"))
+
+(if (file-installed-p "ange-ftp.el")
+    (setq tm-modules (append tm-modules '("tm-ftp")))
+  (setq tm-uncompile-el-files
+       (append tm-uncompile-el-files '("tm-ftp.el")))
+  )
+
+(if (file-installed-p "vm.elc")
+    (setq tm-modules (append tm-modules '("tm-vm")))
+  (setq tm-uncompile-el-files
+       (append tm-uncompile-el-files '("tm-vm.el")))
+  )
+
+(if (file-installed-p "mailcrypt.el")
+    (setq tm-modules (append tm-modules '("tm-pgp")))
+  (setq tm-uncompile-el-files
+       (append tm-uncompile-el-files '("tm-pgp.el")))
+  )
+
+(if (file-installed-p "bbdb.el")
+    (setq tm-modules (append tm-modules '("tm-bbdb")))
+  (setq tm-uncompile-el-files
+       (append tm-uncompile-el-files '("tm-bbdb.el")))
+  )
+
+(if (and (file-exists-p "tm-evs.el")
+        (or (boundp 'MULE)
+            (boundp 'NEMACS))
+        )
+    (setq tm-modules (append tm-modules '("tm-evs")))
+  )
+
+(if (string-match "XEmacs" emacs-version)
+    (setq tm-modules (append tm-modules '("tm-image")))
+  (if (boundp 'MULE)
+      (if (file-installed-p "bitmap.el")
+         (setq tm-modules (append tm-modules '("tm-image")))
+       (setq tm-uncompile-el-files
+             (append tm-uncompile-el-files '("tm-image.el")))
+       )))
+
+(setq tm-el-files
+      (append
+       (mapcar (function (lambda (module)
+                          (concat module ".el")
+                          ))
+              tm-modules)
+       tm-uncompile-el-files))
+
+(setq tm-elc-files
+      (mapcar (function (lambda (module)
+                         (concat module ".elc")
+                         ))
+             tm-modules))
+
+
+(setq setup-modules '("mime-setup"))
+
+(setq setup-el-files
+      (mapcar (function (lambda (module)
+                         (concat module ".el")
+                         ))
+             setup-modules))
+
+(setq setup-elc-files
+      (mapcar (function (lambda (module)
+                         (concat module ".elc")
+                         ))
+             setup-modules))
index 7c554ce..56c6449 100644 (file)
@@ -6,7 +6,7 @@
 ;;; Copyright (C) 1993 .. 1996 MORIOKA Tomohiko
 ;;;
 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;;; Version: $Revision: 7.12 $
+;;; Version: $Revision: 7.13 $
 ;;; Keywords: mail, news, MIME, RFC 1522, multilingual, encoded-word
 ;;;
 ;;; This file is part of tm (Tools for MIME).
@@ -36,7 +36,7 @@
 ;;;
 
 (defconst tm-ew-e/RCS-ID
-  "$Id: tm-ew-e.el,v 7.12 1996/01/11 18:31:43 morioka Exp $")
+  "$Id: tm-ew-e.el,v 7.13 1996/03/04 08:55:23 morioka Exp $")
 (defconst mime-eword/encoder-version (get-version-string tm-ew-e/RCS-ID))
 
 
 (defun mime/encode-field (str)
   (setq str (rfc822/unfolding-string str))
   (let ((ret (string-match rfc822/field-top-regexp str)))
-    (if ret
-       (let ((field-name (substring str 0 (match-end 1)))
-             (field-body (eliminate-top-spaces
-                          (substring str (match-end 0))))
-             fname)
-         (concat field-name ": "
-                 (cond ((string= field-body "") "")
-                       ((member (setq fname (downcase field-name))
-                                '("reply-to" "from" "sender"
-                                  "resent-reply-to" "resent-from"
-                                  "resent-sender" "to" "resent-to"
-                                  "cc" "resent-cc"
-                                  "bcc" "resent-bcc" "dcc")
-                                )
-                        (car (tm-eword::encode-address-list
-                              (+ (length field-name) 1) field-body))
-                        )
-                       (t
-                        (catch 'tag
-                          (let ((r mime/no-encoding-header-fields) fn)
-                            (while r
-                              (setq fn (car r))
-                              (if (string= (downcase fn) fname)
-                                  (throw 'tag field-body)
-                                )
-                              (setq r (cdr r))
-                              ))
-                          (car (tm-eword::encode-string
-                                (+ (length field-name) 1) field-body))
-                          ))
-                       ))
-         )
-      str)))
+    (or (if ret
+           (let ((field-name (substring str 0 (match-end 1)))
+                 (field-body (eliminate-top-spaces
+                              (substring str (match-end 0))))
+                 fname)
+             (if (setq ret
+                       (cond ((string= field-body "") "")
+                             ((member (setq fname (downcase field-name))
+                                      '("reply-to" "from" "sender"
+                                        "resent-reply-to" "resent-from"
+                                        "resent-sender" "to" "resent-to"
+                                        "cc" "resent-cc"
+                                        "bcc" "resent-bcc" "dcc")
+                                      )
+                              (car (tm-eword::encode-address-list
+                                    (+ (length field-name) 1) field-body))
+                              )
+                             (t
+                              (catch 'tag
+                                (let ((r mime/no-encoding-header-fields)
+                                      fn)
+                                  (while r
+                                    (setq fn (car r))
+                                    (if (string= (downcase fn) fname)
+                                        (throw 'tag field-body)
+                                      )
+                                    (setq r (cdr r))
+                                    ))
+                                (car (tm-eword::encode-string
+                                      (+ (length field-name) 1) field-body))
+                                ))
+                             ))
+                 (concat field-name ": " ret)
+               )))
+       (tm-eword::encode-string 0 str)
+       )))
 
 (defun mime/exist-encoded-word-in-subject ()
   (let ((str (rfc822/get-field-body "Subject")))