+#
+# $Id: Makefile,v 1.4 1995/01/13 00:13:17 morioka Exp $
+#
+
+# Please specify emacs executables:
+# NEMACS = for NEMACS (or NEpoch)
+# MULE1 = for Mule 1.* (based on Emacs 18.*)
+# ORIG19 = for Emacs 19.* (FSF original or XEmacs)
+# MULE2 = for MULE 2.* (based on Emacs 19.*)
+
+ NEMACS = nemacs
+ MULE1 = mule
+ ORIG19 = emacs19
+ MULE2 = mule2
+
+# Please specfy Emacs Lisp install directory:
+# TMDIR18 = for Emacs 18.* (NEMACS, NEpoch or MULE 1)
+# TMDIR19 = for Emacs 19.* (FSF original, XEmacs or MULE 2)
+
+ TMDIR18 = /usr/local/lib/emacs/local.lisp/tm
+ TMDIR19 = /usr/local/lib/mule/site-lisp
+
+ TLSRCDIR = ../tl
+
+
bindir = $(HOME)/bin
CC = gcc
CFLAGS = -O
UTILS = ol2 decode-b
GOMI = $(UTILS) *.elc
-FILES = README.eng Makefile Makefile.18 Makefile.19 Makefile.o19 \
- *.el *.c methods \
- doc/Makefile doc/*.pln doc/*.ol doc/*.tex doc/*.texi
+FILES = tm/README.eng tm/Makefile tm/Makefile.bc \
+ tm/*.el tm/*.c tm/methods \
+ tm/doc/Makefile tm/doc/*.pln tm/doc/*.ol tm/doc/*.tex tm/doc/*.texi \
+ tm/gnus/Makefile tm/gnus/Makefile.bc tm/gnus/*.el \
+ tm/mh-e/Makefile tm/mh-e/Makefile.bc tm/mh-e/*.el \
+ tl/README.eng tl/Makefile tl/Makefile.bc tl/*.el tl/doc/*.texi
-TARFILE = tm5.21.5.tar
+TARFILE = tm5.21.6.tar
-all: $(UTILS) $(DVI)
+
+nemacs:
+ make -f Makefile.bc all \
+ EMACS=$(NEMACS) EMACS_TYPE=nemacs TLSRCDIR=$(TLSRCDIR)
+
+install-nemacs: nemacs
+ make -f Makefile.bc install TMDIR=$(TMDIR18) EMACS_TYPE=nemacs
-18:
- make -f Makefile.18
+mule1:
+ make -f Makefile.bc all \
+ EMACS=$(MULE1) EMACS_TYPE=mule TLSRCDIR=$(TLSRCDIR)
-19:
- make -f Makefile.19
+install-mule1: mule1
+ make -f Makefile.bc install TMDIR=$(TMDIR18) EMACS_TYPE=mule
-o19:
- make -f Makefile.o19
+
+orig19:
+ make -f Makefile.bc all \
+ EMACS=$(ORIG19) EMACS_TYPE=orig TLSRCDIR=$(TLSRCDIR)
+install-orig19: orig19
+ make -f Makefile.bc install TMDIR=$(TMDIR19) EMACS_TYPE=orig
+
+
+mule2:
+ make -f Makefile.bc all \
+ EMACS=$(MULE2) EMACS_TYPE=mule TLSRCDIR=$(TLSRCDIR)
+
+install-mule2: mule2
+ make -f Makefile.bc install TMDIR=$(TMDIR19) EMACS_TYPE=mule
+
+
+all: $(UTILS) $(DVI)
ol2: ol2.c
$(CC) $(CFLAGS) ol2.c -o ol2
cp -p $(UTILS) $(bindir)
cp -p methods/* $(bindir)
-install-18:
- make -f Makefile.18 install
-
-install-19:
- make -f Makefile.19 install
-
-install-o19:
- make -f Makefile.o19 install
-
clean:
-rm $(GOMI)
- (cd doc; make clean)
+ -(cd doc; make clean)
-tar: $(FILES)
+tar:
(cd doc; make tex)
- tar cvf $(TARFILE) $(FILES)
- gzip -9 $(TARFILE)
+ (cd ..; tar cvf $(TARFILE) $(FILES); gzip -9 $(TARFILE))
--- /dev/null
+#
+# $Id: Makefile.bc,v 1.1 1995/01/12 16:27:01 morioka Exp $
+#
+
+TMMEL = tm-view.el tm-rmail.el tm-comp.el
+TMMELC = ${TMMEL:el=elc}
+
+TM_EL = signature.el \
+ tiny-mime.el tm-misc.el tm-$(EMACS_TYPE).el $(TMMEL) tm-rich.el
+TM_ELC = ${TM_EL:el=elc}
+ALL_EL = $(TM_EL) tm-setup.el mime-setup.el
+
+.SUFFIXES: .el .elc
+
+.el.elc:
+ $(EMACS) -batch -q . -f batch-byte-compile $<
+
+
+all: $(TM_ELC)
+
+signature.elc: signature.el
+ $(EMACS) -batch -q . -l $(TLSRCDIR)/tl-header.el \
+ -f batch-byte-compile $<
+
+tiny-mime.elc: tiny-mime.el
+ $(EMACS) -batch -q . \
+ -l $(TLSRCDIR)/tl-str.el -l $(TLSRCDIR)/tl-header.el \
+ -f batch-byte-compile $<
+
+tm-misc.elc: tm-misc.el
+ $(EMACS) -batch -q . \
+ -l $(TLSRCDIR)/tl-str.el -l $(TLSRCDIR)/tl-list.el \
+ -l $(TLSRCDIR)/tl-header.el \
+ -l $(TLSRCDIR)/tl-$(EMACS_TYPE).el \
+ -l tm-$(EMACS_TYPE).el -l tiny-mime.el \
+ -f batch-byte-compile $<
+
+tm-$(EMACS_TYPE).elc: tm-$(EMACS_TYPE).el
+ $(EMACS) -batch -q . -l $(TLSRCDIR)/tl-$(EMACS_TYPE).el \
+ -f batch-byte-compile $<
+
+$(TMMELC):
+ $(EMACS) -batch -q . \
+ -l $(TLSRCDIR)/tl-str.el -l $(TLSRCDIR)/tl-list.el \
+ -l $(TLSRCDIR)/tl-header.el \
+ -l $(TLSRCDIR)/tl-$(EMACS_TYPE).el \
+ -l tm-$(EMACS_TYPE).el -l tiny-mime.el -l tm-misc.el \
+ -f batch-byte-compile $<
+
+tm-rich.elc: tm-rich.el
+ $(EMACS) -batch -q . \
+ -l $(TLSRCDIR)/tl-str.el -l $(TLSRCDIR)/tl-list.el \
+ -l $(TLSRCDIR)/tl-header.el \
+ -l $(TLSRCDIR)/tl-$(EMACS_TYPE).el \
+ -l tm-$(EMACS_TYPE).el -l tiny-mime.el -l tm-misc.el \
+ -l tm-view.el \
+ -f batch-byte-compile $<
+
+
+install:
+ -(cd $(TMDIR); chmod +w $(ALL_EL))
+ cp -p $(ALL_EL) $(TMDIR)
+ mv $(TM_ELC) $(TMDIR)
+
+
+clean:
+ -rm *.elc
[README for tm (English Version)]
by MORIOKA Tomohiko <morioka@jaist.ac.jp>
-1994/12/6
+$Id: README.eng,v 1.1 1995/01/12 17:23:45 morioka Exp $
1 What's tm?
4 Install
+4.0 install tl
+
+Tm uses Emacs Lisp library ``tl'', so, at first, you install
+tl. Please read tl/README.eng.
+
+
4.1 Makefile
- Edit Makefiles for your environment. In this package, there are
-following Makefiles:
+ Please edit Makefile.
+
+4.1.1 specify Emacs executables
+
+ Please specify Emacs executable file name.
- Makefile : main Makefile
- Makefile.18 : Makefile for Emacs 18 (NEmacs, Mule 1.x)
- Makefile.19 : Makefile for Emacs 19 and Mule 2.x
- Makefile.o19 : Makefile for original Emacs 19 (XEmacs)
+ NEMACS = for NEMACS (or NEpoch)
+ MULE1 = for Mule 1.* (based on Emacs 18.*)
+ ORIG19 = for Emacs 19.* (FSF original or XEmacs)
+ MULE2 = for MULE 2.* (based on Emacs 19.*)
+
+4.1.2 specify Emacs Lisp install path
+
+ Please specify Emacs Lisp install path.
+
+ TLDIR18 = for Emacs 18.* (NEMACS, NEpoch or MULE 1)
+ TLDIR19 = for Emacs 19.* (FSF original, XEmacs or MULE 2)
4.2 External methods
4.5 Emacs Lisp modules
- Run `make install-18', if you use Emacs 18 (NEmacs, Mule 1.x).
+ Run `make install-nemacs', if you use NEmacs.
+
+ Run `make install-mule1', if you use Mule 1.* (based on Emacs 18.*).
- Run `make install-19', if you use Emacs 19 and Mule 2.x.
+ Run `make install-orig19', if you use Original Emacs 19.* or XEmacs.
- Run `make install-o19', if you use Emacs 19 or XEmacs.
+ Run `make install-mule2', if you use Mule 2.* (based on Emacs 19.*).
Or copy *.el to your emacs lisp directory.
+5 tm-MUA
+
+5.1 tm-gnus
+
+(1) Please edit gnus/Makefile
+
+(2) make
+
+ Run `make nemacs', if you use NEmacs.
+
+ Run `make mule1', if you use Mule 1.* (based on Emacs 18.*).
+
+ Run `make orig19', if you use Original Emacs 19.* or XEmacs.
+
+ Run `make mule2', if you use Mule 2.* (based on Emacs 19.*).
+
+(3) install
+
+ Run `make install-18', if you use Emacs 18.*.
+
+ Run `make install-19', if you use Emacs 19.*.
+
+
+5.1 tm-mh-e
+
+(1) Please edit mh-e/Makefile
+
+(2) make
+
+ Run `make nemacs', if you use NEmacs.
+
+ Run `make mule1', if you use Mule 1.* (based on Emacs 18.*).
+
+ Run `make orig19', if you use Original Emacs 19.* or XEmacs.
+
+ Run `make mule2', if you use Mule 2.* (based on Emacs 19.*).
+
+(3) install
+
+ Run `make install-18', if you use Emacs 18.*.
+
+ Run `make install-19', if you use Emacs 19.*.
+
+
+5.2 tm-rmail or tm-vm
+
+ Please copy tm-rmail.el or tm-vm.el to Emacs Lisp install path.
+
+
5 .emacs
Please insert (load "mime-setup") or (load "tm-setup") in .emacs. If
--- /dev/null
+#
+# $Id: Makefile,v 1.3 1995/01/10 12:35:29 morioka Exp $
+#
+
+# Please specify emacs executables:
+# NEMACS = for NEMACS (or NEpoch)
+# MULE1 = for Mule 1.* (based on Emacs 18.*)
+# ORIG19 = for Emacs 19.* (FSF original or XEmacs)
+# MULE2 = for MULE 2.* (based on Emacs 19.*)
+
+ NEMACS = nemacs
+ MULE1 = mule
+ ORIG19 = emacs19
+ MULE2 = mule2
+
+
+# Please specfy Emacs Lisp install directory:
+# TMDIR18 = for Emacs 18.* (NEMACS, NEpoch or MULE 1)
+# TMDIR19 = for Emacs 19.* (FSF original, XEmacs or MULE 2)
+
+ TMDIR18 = /usr/local/lib/emacs/local.lisp/tm
+ TMDIR19 = /usr/local/lib/mule/site-lisp
+
+ TMSRCDIR = ..
+ TLSRCDIR = ../../tl
+
+
+nemacs:
+ make -f Makefile.bc tm-gnus.elc \
+ EMACS=$(NEMACS) EMACS_TYPE=nemacs \
+ TLDIR=$(TLSRCDIR) TMDIR=$(TMSRCDIR)
+
+mule1:
+ make -f Makefile.bc tm-gnus.elc \
+ EMACS=$(MULE1) EMACS_TYPE=mule \
+ TLDIR=$(TLSRCDIR) TMDIR=$(TMSRCDIR)
+
+install-18:
+ -chmod +w $(TMDIR18)/tm-gnus*.el
+ cp -p tm-gnus*.el $(TMDIR18)
+ mv tm-gnus*.elc $(TMDIR18)
+
+
+orig19:
+ make -f Makefile.bc gnus4 \
+ EMACS=$(ORIG19) EMACS_TYPE=orig \
+ TLDIR=$(TLSRCDIR) TMDIR=$(TMSRCDIR)
+
+mule2:
+ make -f Makefile.bc gnus4 \
+ EMACS=$(MULE2) EMACS_TYPE=mule \
+ TLDIR=$(TLSRCDIR) TMDIR=$(TMSRCDIR)
+
+install-19:
+ -chmod +w $(TMDIR19)/tm-gnus*.el
+ cp -p tm-gnus*.el $(TMDIR19)
+ mv tm-gnus*.elc $(TMDIR19)
+
+
+clean:
+ -rm *.elc
--- /dev/null
+#
+# $Id: Makefile.bc,v 1.1 1995/01/10 12:05:54 morioka Exp $
+#
+
+.SUFFIXES: .el .elc
+
+.el.elc:
+ $(EMACS) -batch -q . -f batch-byte-compile $<
+
+
+gnus3: tm-gnus.elc tm-gnus3.elc
+
+gnus4: tm-gnus.elc tm-gnus4.elc
+
+
+tm-gnus.elc: tm-gnus.el
+ $(EMACS) -batch -q . -l $(TLDIR)/tl-str.el -l $(TLDIR)/tl-list.el \
+ -l $(TLDIR)/tl-header.el -l $(TLDIR)/tl-$(EMACS_TYPE).el \
+ -l $(TMDIR)/tm-$(EMACS_TYPE).el -l $(TMDIR)/tiny-mime.el \
+ -l $(TMDIR)/tm-misc.el -l gnus \
+ -f batch-byte-compile $<
+
+tm-gnus4.elc: tm-gnus4.el
+ $(EMACS) -batch -q . -l $(TLDIR)/tl-str.el -l $(TLDIR)/tl-list.el \
+ -l $(TLDIR)/tl-header.el -l $(TLDIR)/tl-$(EMACS_TYPE).el \
+ -l $(TMDIR)/tm-$(EMACS_TYPE).el -l $(TMDIR)/tiny-mime.el \
+ -l $(TMDIR)/tm-misc.el -l gnus -l tm-gnus.el \
+ -f batch-byte-compile $<
+
+tm-gnus3.elc: tm-gnus3.el
+ $(EMACS) -batch -q . -l $(TLDIR)/tl-str.el -l $(TLDIR)/tl-list.el \
+ -l $(TLDIR)/tl-header.el -l $(TLDIR)/tl-$(EMACS_TYPE).el \
+ -l $(TMDIR)/tm-$(EMACS_TYPE).el -l $(TMDIR)/tiny-mime.el \
+ -l $(TMDIR)/tm-misc.el -l gnus -l tm-gnus.el \
+ -f batch-byte-compile $<
--- /dev/null
+;;;
+;;; A MIME extension for GNUS
+;;;
+;;; by Morioka Tomohiko, 1993/11/20
+;;;
+
+(provide 'tm-gnus)
+
+
+;;; @ require modules
+;;;
+(require 'tm-misc)
+(require 'tl-str)
+(require 'gnus)
+
+
+;;; @ version
+;;;
+(defconst tm-gnus/RCS-ID
+ "$Id: tm-gnus.el,v 5.1 1994/10/25 07:17:51 morioka Exp $")
+
+(defconst tm-gnus/version (get-version-string tm-gnus/RCS-ID))
+
+
+;;; @ variables
+;;;
+(defvar tm-gnus/startup-hook nil)
+
+
+;;; @ to decode subjects in mode-line
+;;;
+;; This function imported from gnus.el.
+;;
+;; New implementation in gnus 3.14.3
+;;
+(defun tm-gnus/article-set-mode-line ()
+ "Set Article mode line string.
+If you don't like it, define your own gnus-article-set-mode-line."
+ (let ((maxlen 15) ;Maximum subject length
+ (subject
+ (if gnus-current-headers
+ (mime/decode-string (nntp-header-subject gnus-current-headers))
+ "")
+ ))
+ ;; The value must be a string to escape %-constructs because of subject.
+ (setq mode-line-buffer-identification
+ (format "GNUS: %s%s %s%s%s"
+ gnus-newsgroup-name
+ (if gnus-current-article
+ (format "/%d" gnus-current-article) "")
+ (rightful-boundary-short-string subject
+ (min (string-width subject)
+ maxlen))
+ (if (> (string-width subject) maxlen) "..." "")
+ (make-string (max 0 (- 17 (string-width subject))) ? )
+ )))
+ (set-buffer-modified-p t))
+
+
+;;; @ to decode subjects in Summary buffer
+;;;
+(defun tm-gnus/decode-summary-subjects ()
+ (mapcar (function
+ (lambda (header)
+ (nntp-set-header-subject
+ header
+ (mime/decode-string (gnus-header-subject header))
+ )))
+ gnus-newsgroup-headers)
+ )
+
+
+;;; @ change MIME header decoding mode, decoding or non decoding.
+;;;
+
+(defun tm-gnus/set-mime-header-decoding-mode (arg)
+ "Set MIME header processing.
+With arg, turn MIME processing on iff arg is positive."
+ (setq mime/header-decoding-mode arg)
+ (setq gnus-have-all-headers (not gnus-have-all-headers))
+ (gnus-summary-select-article (not gnus-have-all-headers) t)
+ )
+
+(defun tm-gnus/toggle-mime-header-decoding-mode ()
+ "Toggle MIME header processing.
+With arg, turn MIME processing on iff arg is positive."
+ (interactive)
+ (tm-gnus/set-mime-header-decoding-mode (not mime/header-decoding-mode))
+ )
+
+;;; @ set up
+;;;
+(if (string-match "^GNUS [0-3]" gnus-version)
+ (require 'tm-gnus3)
+ (require 'tm-gnus4)
+ )
+
+(run-hooks 'tm-gnus/startup-hook)
--- /dev/null
+;;;
+;;; $Id: tm-gnus3.el,v 5.4 1994/10/25 08:29:17 morioka Exp $
+;;;
+
+(provide 'tm-gnus3)
+
+(require 'tm-gnus)
+(require 'tm-view)
+(require 'tl-list)
+
+(setq mime/go-to-top-node-method-alist
+ (put-alist 'gnus-Article-mode
+ (if (string-match (regexp-quote "3.14.4") gnus-version)
+ (function
+ (lambda ()
+ (mime/exit-view-mode)
+ (delete-other-windows)
+ (gnus-Article-show-summary)
+ ))
+ (function
+ (lambda ()
+ (mime/exit-view-mode)
+ (delete-other-windows)
+ (gnus-Article-show-subjects)
+ )))
+ mime/go-to-top-node-method-alist))
+
+(defun tm-gnus/view-message (arg)
+ "MIME decode and play this message."
+ (interactive "P")
+ (let ((gnus-break-pages nil))
+ (gnus-Subject-select-article t t)
+ )
+ (pop-to-buffer gnus-Article-buffer t)
+ (mime/viewer-mode)
+ )
+
+(add-hook 'gnus-Select-group-hook (function tm-gnus/decode-summary-subjects))
+
+(define-key gnus-Subject-mode-map
+ "\et" 'tm-gnus/toggle-mime-header-decoding-mode)
+(define-key gnus-Subject-mode-map "v" 'tm-gnus/view-message)
+
+(fset 'gnus-summary-select-article 'gnus-Subject-select-article)
+
+(fset 'gnus-Article-set-mode-line 'tm-gnus/article-set-mode-line)
+(add-hook 'gnus-Article-prepare-hook
+ (function mime/decode-message-header-if-you-need) t)
+
+(if (not (string-match "^GNUS 3\.14\.4" gnus-version))
+ (progn
+ (add-hook 'gnus-Article-mode-hook
+ (function
+ (lambda ()
+ (make-local-variable 'minor-mode-alist)
+ (mime/add-header-decoding-mode-to-mode-line)
+ )))
+ )
+ (progn
+ (add-hook 'gnus-Article-mode-hook
+ (function mime/add-header-decoding-mode-to-mode-line))
+ ))
--- /dev/null
+;;;
+;;; $Id: tm-gnus4.el,v 5.4 1994/10/25 08:50:08 morioka Exp $
+;;;
+
+(provide 'tm-gnus4)
+
+(require 'tm-gnus)
+(autoload 'mime/viewer-mode "tm-view" "View MIME message." t)
+
+(defun tm-gnus/view-message (arg)
+ "MIME decode and play this message."
+ (interactive "P")
+ (let ((gnus-break-pages nil))
+ (gnus-summary-select-article t t)
+ )
+ (pop-to-buffer gnus-article-buffer t)
+ (mime/viewer-mode)
+ )
+
+(defun tm-gnus/summary-scroll-down ()
+ "Scroll down one line current article."
+ (interactive)
+ (gnus-summary-scroll-up -1)
+ )
+
+(add-hook 'gnus-select-group-hook (function tm-gnus/decode-summary-subjects))
+
+(define-key gnus-summary-mode-map
+ "\et" (function tm-gnus/toggle-mime-header-decoding-mode))
+(define-key gnus-summary-mode-map "v" (function tm-gnus/view-message))
+(define-key gnus-summary-mode-map
+ "\e\r" (function tm-gnus/summary-scroll-down))
+
+(fset 'gnus-article-set-mode-line 'tm-gnus/article-set-mode-line)
+(add-hook 'gnus-article-mode-hook
+ (function mime/add-header-decoding-mode-to-mode-line))
+
+(add-hook 'gnus-article-prepare-hook
+ (function mime/decode-message-header-if-you-need) t)
--- /dev/null
+#
+# $Id: Makefile,v 1.1 1995/01/10 12:28:01 morioka Exp $
+#
+
+# Please specify emacs executables:
+# NEMACS = for NEMACS (or NEpoch)
+# MULE1 = for Mule 1.* (based on Emacs 18.*)
+# ORIG19 = for Emacs 19.* (FSF original or XEmacs)
+# MULE2 = for MULE 2.* (based on Emacs 19.*)
+
+ NEMACS = nemacs
+ MULE1 = mule
+ ORIG19 = emacs19
+ MULE2 = mule2
+
+
+# Please specfy Emacs Lisp install directory:
+# TMDIR18 = for Emacs 18.* (NEMACS, NEpoch or MULE 1)
+# TMDIR19 = for Emacs 19.* (FSF original, XEmacs or MULE 2)
+
+ TMDIR18 = /usr/local/lib/emacs/local.lisp/tm
+ TMDIR19 = /usr/local/lib/mule/site-lisp
+
+ TMSRCDIR = ..
+ TLSRCDIR = ../../tl
+
+
+nemacs:
+ make -f Makefile.bc tm-mh-e.elc \
+ EMACS=$(NEMACS) EMACS_TYPE=nemacs \
+ TLDIR=$(TLSRCDIR) TMDIR=$(TMSRCDIR)
+
+mule1:
+ make -f Makefile.bc tm-mh-e.elc \
+ EMACS=$(MULE1) EMACS_TYPE=mule \
+ TLDIR=$(TLSRCDIR) TMDIR=$(TMSRCDIR)
+
+install-18:
+ -chmod +w $(TMDIR18)/tm-mh-e*.el
+ cp -p tm-mh-e*.el $(TMDIR18)
+ mv tm-mh-e*.elc $(TMDIR18)
+
+
+orig19:
+ make -f Makefile.bc mh-e4 \
+ EMACS=$(ORIG19) EMACS_TYPE=orig \
+ TLDIR=$(TLSRCDIR) TMDIR=$(TMSRCDIR)
+
+mule2:
+ make -f Makefile.bc mh-e4 \
+ EMACS=$(MULE2) EMACS_TYPE=mule \
+ TLDIR=$(TLSRCDIR) TMDIR=$(TMSRCDIR)
+
+install-19:
+ -chmod +w $(TMDIR19)/tm-mh-e*.el
+ cp -p tm-mh-e*.el $(TMDIR19)
+ mv tm-mh-e*.elc $(TMDIR19)
+
+
+clean:
+ -rm *.elc
--- /dev/null
+#
+# $Id: Makefile.bc,v 1.1 1995/01/10 12:28:22 morioka Exp $
+#
+
+.SUFFIXES: .el .elc
+
+.el.elc:
+ $(EMACS) -batch -q . -f batch-byte-compile $<
+
+
+mh-e3: tm-mh-e.elc tm-mh-e3.elc
+
+mh-e4: tm-mh-e.elc
+
+
+tm-mh-e.elc: tm-mh-e.el
+ $(EMACS) -batch -q . -l $(TLDIR)/tl-str.el -l $(TLDIR)/tl-list.el \
+ -l $(TLDIR)/tl-header.el -l $(TLDIR)/tl-$(EMACS_TYPE).el \
+ -l $(TMDIR)/tm-$(EMACS_TYPE).el -l $(TMDIR)/tiny-mime.el \
+ -l $(TMDIR)/tm-misc.el -l mh-e \
+ -f batch-byte-compile $<
+
+tm-mh-e3.elc: tm-mh-e3.el
+ $(EMACS) -batch -q . -l $(TLDIR)/tl-str.el -l $(TLDIR)/tl-list.el \
+ -l $(TLDIR)/tl-header.el -l $(TLDIR)/tl-$(EMACS_TYPE).el \
+ -l $(TMDIR)/tm-$(EMACS_TYPE).el -l $(TMDIR)/tiny-mime.el \
+ -l $(TMDIR)/tm-misc.el -l mh-e -l tm-mh-e.el \
+ -f batch-byte-compile $<
--- /dev/null
+;;;
+;;; A MIME extender for mh-e
+;;;
+;;; by Morioka Tomohiko, 1993/11/21
+;;;
+
+(provide 'tm-mh-e)
+
+
+;;; @ 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
+;;;
+(defun tm-mh-e/toggle-header-decoding-mode (arg)
+ "Toggle MIME header processing.
+With arg, turn MIME processing on if arg is positive."
+ (interactive "P")
+ (setq mime/header-decoding-mode
+ (if (null arg)
+ (not mime/header-decoding-mode)
+ arg))
+ (mh-invalidate-show-buffer)
+ (mh-show-msg (mh-get-msg-num t))
+ )
+
+
+;;; @ MIME body players
+;;;
+(defun tm-mh-e/view-message (arg)
+ "MIME decode and play this message."
+ (interactive "P")
+ (mh-invalidate-show-buffer)
+ (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 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)
+(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)
+ )))
--- /dev/null
+;;;
+;;; $Id: tm-mh-e3.el,v 1.2 1994/11/01 18:06:16 morioka Exp $
+;;;
+;;; This is a part of tm-mh-e.el which is a module for old mh-e
+;;; to emulate mh-e 4.0.
+;;;
+;;; This module imports from mh-e 3.8 and 4.0.
+;;;
+
+(provide 'tm-mh-e3)
+
+;;; Ensure new buffers won't get this mode if default-major-mode is nil.
+(put 'mh-show-mode 'mode-class 'special)
+
+(defun mh-show-mode ()
+ "Major mode for showing messages in mh-e.
+The value of mh-show-mode-hook is called when a new message is displayed."
+ (kill-all-local-variables)
+ (setq major-mode 'mh-show-mode)
+ (mh-set-mode-name "MH-Show")
+ (run-hooks 'mh-show-mode-hook))
+
+(defun mh-display-msg (msg-num folder &optional show-buffer)
+ ;; Display message NUMBER of FOLDER.
+ ;; Sets the current buffer to the show buffer.
+ (set-buffer folder)
+ (or show-buffer
+ (setq show-buffer mh-show-buffer))
+ ;; Bind variables in folder buffer in case they are local
+ (let ((formfile mhl-formfile)
+ (clean-message-header mh-clean-message-header)
+ (invisible-headers mh-invisible-headers)
+ (visible-headers mh-visible-headers)
+ (msg-filename (mh-msg-filename msg-num))
+ (folder mh-current-folder))
+ (if (not (file-exists-p msg-filename))
+ (error "Message %d does not exist" msg-num))
+ (switch-to-buffer show-buffer)
+ (if mh-bury-show-buffer (bury-buffer (current-buffer)))
+ (mh-when (or (not (equal msg-filename buffer-file-name)))
+ ;; Buffer does not yet contain message.
+ (clear-visited-file-modtime)
+ (unlock-buffer)
+ (setq buffer-file-name nil) ; no locking during setup
+ (erase-buffer)
+ (if formfile
+ (if (stringp formfile)
+ (mh-exec-lib-cmd-output "mhl" "-nobell" "-noclear"
+ "-form" formfile msg-filename)
+ (mh-exec-lib-cmd-output "mhl" "-nobell" "-noclear"
+ msg-filename))
+ (insert-file-contents msg-filename))
+ (goto-char (point-min))
+ (cond (clean-message-header
+ (mh-clean-msg-header (point-min)
+ invisible-headers
+ visible-headers)
+ (goto-char (point-min)))
+ (t
+ (let ((case-fold-search t))
+ (re-search-forward
+ "^To:\\|^From:\\|^Subject:\\|^Date:" nil t)
+ (beginning-of-line)
+ (mh-recenter 0))))
+ (set-buffer-modified-p nil)
+ (setq buffer-file-name msg-filename)
+ (set-mark nil)
+ (mh-show-mode)
+ (setq mode-line-buffer-identification
+ (list (format mh-show-buffer-mode-line-buffer-id
+ folder msg-num))))))
+
+(fset 'mh-show-msg 'mh-show)
;;;
;;; modified by MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;;
-;;; $Id: tm-latex.el,v 1.1 1994/11/29 18:20:07 morioka Exp $
+;;; $Id: tm-latex.el,v 1.2 1995/01/10 02:01:06 morioka Exp $
;;;
(provide 'tm-latex)
(method . mime/decode-text/latex)
))
-(set-atype 'mime/content-decoding-condition
- '((type . "application/octet-stream")
- ("type" . "latex")
- (method . mime/decode-text/latex)
- ))
+;(set-atype 'mime/content-decoding-condition
+; '((type . "application/octet-stream")
+; ("type" . "latex")
+; (method . mime/decode-text/latex)
+; ))
;;;
-;;; $Id: tm-setup.el,v 5.0 1994/12/22 05:45:32 morioka Exp $
+;;; $Id: tm-setup.el,v 5.1 1995/01/10 02:02:51 morioka Exp $
;;;
(provide 'tm-setup)
'((type . "application/x-latex")
(method . mime/decode-text/latex)
))
- (set-atype 'mime/content-decoding-condition
- '((type . "application/octet-stream")
- ("type" . "latex")
- (method . mime/decode-text/latex)
- ))
+ ;;(set-atype 'mime/content-decoding-condition
+ ;; '((type . "application/octet-stream")
+ ;; ("type" . "latex")
+ ;; (method . mime/decode-text/latex)
+ ;; ))
(autoload 'mime/decode-text/latex "tm-latex")
)))