From 2267fa2a8b2e0ba2bb49ecb09b6d642897f27719 Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 2 Mar 1998 14:48:29 +0000 Subject: [PATCH] tm 6.22 --- Makefile | 52 ++++++++++++++++++------------------ Makefile.bc | 23 +++++++++------- tm-view.el | 85 +++++++++++++++-------------------------------------------- 3 files changed, 62 insertions(+), 98 deletions(-) diff --git a/Makefile b/Makefile index 708b270..e15e8d2 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,7 @@ # -# $Id: Makefile,v 6.7 1995/05/16 12:26:22 morioka Exp morioka $ +# $Id: Makefile,v 6.8 1995/05/17 06:58:57 morioka Exp morioka $ # -SHELL = /bin/csh - # Please specify emacs executables: # NEMACS = for NEMACS (or NEpoch) # MULE1 = for Mule 1.* (based on Emacs 18.*) @@ -40,7 +38,7 @@ bindir = $(HOME)/bin CC = gcc CFLAGS = -O -RM = /bin/rm +RM = /bin/rm -f CP = /bin/cp -p UTILS = ol2 decode-b @@ -55,7 +53,7 @@ FILES = tm/README.eng tm/rel-*.ol \ tl/Makefile tl/Makefile.bc tl/loadpath \ tl/*.el tl/doc/*.texi -TARFILE = tm6.21.tar +TARFILE = tm6.22.tar lpath-nemacs: @@ -63,8 +61,10 @@ lpath-nemacs: nemacs: lpath-nemacs make -f Makefile.bc all EMACS=$(NEMACS) EMACS_TYPE=nemacs - (cd gnus; make nemacs NEMACS=$(NEMACS) EMACS18_GNUS=$(EMACS18_GNUS)) - (cd mh-e; make nemacs NEMACS=$(NEMACS) NEMACS_MH_E=$(NEMACS_MH_E)) + cd gnus; PWD=`pwd` \ + make nemacs NEMACS=$(NEMACS) EMACS18_GNUS=$(EMACS18_GNUS) + cd mh-e; PWD=`pwd` \ + make nemacs NEMACS=$(NEMACS) NEMACS_MH_E=$(NEMACS_MH_E) nemacs-vm: lpath-nemacs make -f Makefile.bc tm-vm EMACS=$(NEMACS) EMACS_TYPE=nemacs @@ -78,8 +78,10 @@ lpath-mule1: mule1: lpath-mule1 make -f Makefile.bc all EMACS=$(MULE1) EMACS_TYPE=mule - (cd gnus; make mule1 MULE1=$(MULE1) EMACS18_GNUS=$(EMACS18_GNUS)) - (cd mh-e; make mule1 MULE1=$(MULE1) MULE1_MH_E=$(MULE1_MH_E)) + cd gnus; PWD=`pwd` \ + make mule1 MULE1=$(MULE1) EMACS18_GNUS=$(EMACS18_GNUS) + cd mh-e; PWD=`pwd` \ + make mule1 MULE1=$(MULE1) NEMACS_MH_E=$(MULE1_MH_E) mule1-vm: lpath-nemacs make -f Makefile.bc tm-vm EMACS=$(MULE1) EMACS_TYPE=mule @@ -88,8 +90,8 @@ install-mule1: mule1 install-mua-18 make -f Makefile.bc install TMDIR=$(TMDIR18) EMACS_TYPE=mule install-mua-18: - (cd gnus; make install-18 TMDIR18=$(TMDIR18)) - (cd mh-e; make install-18 TMDIR18=$(TMDIR18)) + cd gnus; PWD=`pwd` make install-18 TMDIR18=$(TMDIR18) + cd mh-e; PWD=`pwd` make install-18 TMDIR18=$(TMDIR18) make -f Makefile.bc install-tm-vm TMDIR=$(TMDIR18) @@ -98,8 +100,8 @@ lpath-orig19: orig19: lpath-orig19 make -f Makefile.bc all EMACS=$(ORIG19) EMACS_TYPE=orig - (cd gnus; make orig19 ORIG19=$(ORIG19)) - (cd mh-e; make orig19 ORIG19=$(ORIG19)) + cd gnus; PWD=`pwd` make orig19 ORIG19=$(ORIG19) + cd mh-e; PWD=`pwd` make orig19 ORIG19=$(ORIG19) orig19-vm: lpath-nemacs make -f Makefile.bc tm-vm EMACS=$(ORIG19) EMACS_TYPE=orig @@ -113,8 +115,8 @@ lpath-mule2: mule2: lpath-mule2 make -f Makefile.bc all EMACS=$(MULE2) EMACS_TYPE=mule - (cd gnus; make mule2 MULE2=$(MULE2)) - (cd mh-e; make mule2 MULE2=$(MULE2)) + cd gnus; PWD=`pwd` make mule2 MULE2=$(MULE2) + cd mh-e; PWD=`pwd` make mule2 MULE2=$(MULE2) mule2-vm: lpath-nemacs make -f Makefile.bc tm-vm EMACS=$(MULE2) EMACS_TYPE=mule @@ -123,8 +125,8 @@ install-mule2: mule2 install-mua-19 make -f Makefile.bc install TMDIR=$(TMDIR19) EMACS_TYPE=mule install-mua-19: - (cd gnus; make install-19 TMDIR19=$(TMDIR19)) - (cd mh-e; make install-19 TMDIR19=$(TMDIR19)) + cd gnus; PWD=`pwd` make install-19 TMDIR19=$(TMDIR19) + cd mh-e; PWD=`pwd` make install-19 TMDIR19=$(TMDIR19) make -f Makefile.bc install-tm-vm TMDIR=$(TMDIR19) @@ -138,13 +140,13 @@ decode-b: decode-b.c tex: ol2 - (cd doc; make tex) + cd doc; make tex dvi: ol2 - (cd doc; make dvi) + cd doc; make dvi ps: ol2 - (cd doc; make ps) + cd doc; make ps install: $(UTILS) methods @@ -154,11 +156,11 @@ install: $(UTILS) methods clean: -$(RM) $(GOMI) - -(cd doc; make clean) - -(cd gnus; make clean) - -(cd mh-e; make clean) + -cd doc; make clean + -cd gnus; make clean + -cd mh-e; make clean tar: - (cd doc; make tex) - (cd ..; tar cvf $(TARFILE) $(FILES); gzip -9 $(TARFILE)) + cd doc; make tex + cd ..; tar cvf $(TARFILE) $(FILES); gzip -9 $(TARFILE) diff --git a/Makefile.bc b/Makefile.bc index d1729a7..0cd8414 100644 --- a/Makefile.bc +++ b/Makefile.bc @@ -1,5 +1,5 @@ # -# $Id: Makefile.bc,v 6.1 1995/05/16 12:18:30 morioka Exp $ +# $Id: Makefile.bc,v 6.3 1995/05/17 07:00:54 morioka Exp morioka $ # TM_EL = signature.el \ @@ -13,7 +13,11 @@ ALL_EL = $(TM_EL) tm-setup.el mime-setup.el TM_VM_EL = tm-vm.el TM_VM_ELC = ${TM_VM_EL:el=elc} -BATCH = $(EMACS) -batch -q loadpath -f eval-current-buffer +BATCH = $(EMACS) -batch loadpath -f eval-current-buffer + +CP = cp -p +MV = mv -f +RM = rm -f .SUFFIXES: .el .elc @@ -26,9 +30,10 @@ all: $(TM_ELC) $(TM_ELC): install: - -(cd $(TMDIR); chmod +w $(ALL_EL)) - cp -p $(ALL_EL) $(TMDIR) - mv $(TM_ELC) $(TMDIR) + test -d $(TMDIR) || mkdir $(TMDIR) + -cd $(TMDIR); chmod +w $(ALL_EL) + $(CP) $(ALL_EL) $(TMDIR) + $(MV) $(TM_ELC) $(TMDIR) tm-vm: $(TM_VM_ELC) @@ -36,10 +41,10 @@ tm-vm: $(TM_VM_ELC) $(TM_VM_ELC): install-tm-vm: - -(cd $(TMDIR); chmod +w $(TM_VM_EL)) - cp -p $(TM_VM_EL) $(TMDIR) - -(mv $(TM_VM_ELC) $(TMDIR)) + -cd $(TMDIR); chmod +w $(TM_VM_EL) + $(CP) $(TM_VM_EL) $(TMDIR) + -$(MV) $(TM_VM_ELC) $(TMDIR) clean: - -rm *.elc + -$(RM) *.elc diff --git a/tm-view.el b/tm-view.el index e8b3405..4cd8b6f 100644 --- a/tm-view.el +++ b/tm-view.el @@ -12,6 +12,7 @@ (require 'tl-str) (require 'tl-list) +(require 'tl-misc) (require 'tl-header) (require 'tiny-mime) (require 'tm-misc) @@ -21,7 +22,7 @@ ;;; (defconst mime-viewer/RCS-ID - "$Id: tm-view.el,v 6.21 1995/05/16 12:07:52 morioka Exp $") + "$Id: tm-view.el,v 6.22 1995/05/17 08:02:31 morioka Exp $") (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID)) (defconst mime/viewer-version mime-viewer/version) @@ -158,6 +159,16 @@ (defvar mime-viewer/decoding-mode "play" "MIME body decoding mode") +;;; @@ buffer local variables +;;; + +(defvar mime::article/content-info) +(defvar mime::article/preview-buffer) + +(defvar mime::preview/content-list nil) +(defvar mime::preview/original-major-mode nil) + + ;;; @@ quitting ;;; @@ -221,72 +232,18 @@ )) -;;; @ data structure +;;; @ data structures ;;; ;;; @@ content-info ;;; - -(defun mime::make-content-info (beg end ctype params encoding children) - (vector beg end ctype params encoding children) - ) - -(defun mime::content-info/point-min (cinfo) - (elt cinfo 0) - ) - -(defun mime::content-info/point-max (cinfo) - (elt cinfo 1) - ) - -(defun mime::content-info/type (cinfo) - (elt cinfo 2) - ) - -(defun mime::content-info/parameters (cinfo) - (elt cinfo 3) - ) - -(defun mime::content-info/encoding (cinfo) - (elt cinfo 4) - ) - -(defun mime::content-info/children (cinfo) - (elt cinfo 5) - ) +(define-structure mime::content-info + point-min point-max type parameters encoding children) ;;; @@ preview-content-info ;;; - -(defun mime::make-preview-content-info (beg end buf cinfo) - (vector beg end buf cinfo) - ) - -(defun mime::preview-content-info/point-min (pcinfo) - (elt pcinfo 0) - ) - -(defun mime::preview-content-info/point-max (pcinfo) - (elt pcinfo 1) - ) - -(defun mime::preview-content-info/buffer (pcinfo) - (elt pcinfo 2) - ) - -(defun mime::preview-content-info/content-info (pcinfo) - (elt pcinfo 3) - ) - - -;;; @ buffer local variables -;;; - -(defvar mime::article/content-info) -(defvar mime::article/preview-buffer) - -(defvar mime::preview/content-list nil) -(defvar mime::preview/original-major-mode nil) +(define-structure mime::preview-content-info + point-min point-max buffer content-info) ;;; @ parser @@ -330,7 +287,7 @@ boundary ctype params encoding) ))) ((string= ctype "message/rfc822") - (mime::make-content-info + (mime::content-info/create (point-min) (point-max) ctype params encoding (save-excursion @@ -347,7 +304,7 @@ ) ) (t - (mime::make-content-info (point-min) (point-max) + (mime::content-info/create (point-min) (point-max) ctype params encoding nil) )) ))))) @@ -397,7 +354,7 @@ )) (setq beg (point-min)) (goto-char beg) - (mime::make-content-info beg end ctype params encoding children) + (mime::content-info/create beg end ctype params encoding children) )) (defun mime::parse-parameter (str) @@ -558,7 +515,7 @@ it is regarded as current-buffer. [tm-view]" (funcall mime-viewer/content-subject-function cnum subj ctype params) (setq ne (point-max)) - (mime::make-preview-content-info nb (- ne 1) + (mime::preview-content-info/create nb (- ne 1) buf cell) )) (goto-char ne) -- 1.7.10.4