From: morioka Date: Mon, 2 Mar 1998 14:36:14 +0000 (+0000) Subject: tm 6.16 X-Git-Tag: tm6_16~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=bbb003c76a1a786ee89098b7dfe9db5a5d1fef4b;p=elisp%2Ftm.git tm 6.16 --- diff --git a/Makefile b/Makefile index ed0293e..a96d5ca 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# $Id: Makefile,v 4.0 1995/04/18 12:35:44 morioka Exp morioka $ +# $Id: Makefile,v 5.0 1995/04/19 02:12:17 morioka Exp morioka $ # # Please specify emacs executables: @@ -9,7 +9,7 @@ # MULE2 = for MULE 2.* (based on Emacs 19.*) NEMACS = nemacs - MULE1 = mule + MULE1 = mule1 ORIG19 = emacs19 MULE2 = mule2 @@ -17,8 +17,9 @@ # 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 +# TMDIR18 = /usr/local/lib/emacs/local.lisp/tm +# TMDIR19 = /usr/local/lib/mule/site-lisp + TMDIR18 = $(HOME)/lib/emacs18/lisp TMDIR19 = $(HOME)/lib/emacs19/lisp @@ -38,7 +39,7 @@ FILES = tm/README.eng tm/rel-*.ol tm/Makefile tm/Makefile.bc \ 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 = tm6.15.tar +TARFILE = tm6.16.tar nemacs: diff --git a/Makefile.bc b/Makefile.bc index 79f0a43..39dce42 100644 --- a/Makefile.bc +++ b/Makefile.bc @@ -1,12 +1,14 @@ # -# $Id: Makefile.bc,v 2.0 1995/03/26 16:25:44 morioka Exp morioka $ +# $Id: Makefile.bc,v 3.0 1995/04/19 02:22:49 morioka Exp $ # -TMMEL = tm-view.el tm-rmail.el tm-comp.el +TMMEL = tm-view.el tm-rmail.el TMMELC = ${TMMEL:el=elc} TM_EL = signature.el \ - tiny-mime.el tm-misc.el tm-$(EMACS_TYPE).el $(TMMEL) tm-rich.el + tiny-mime.el tm-misc.el tm-$(EMACS_TYPE).el \ + $(TMMEL) tm-rich.el \ + tm-comp.el TM_ELC = ${TM_EL:el=elc} ALL_EL = $(TM_EL) tm-ftp.el tm-latex.el tm-partial.el \ tm-vm.el \ @@ -61,9 +63,20 @@ tm-rich.elc: tm-rich.el -l $(TLSRCDIR)/tl-str.el -l $(TLSRCDIR)/tl-list.el \ -l $(TLSRCDIR)/tl-header.el \ -l $(TLSRCDIR)/tl-$(EMACS_TYPE).el \ + $(OPT) \ -l tm-$(EMACS_TYPE).el -l tiny-mime.el -l tm-misc.el \ -l tm-view.el \ -f batch-byte-compile $< + +tm-comp.elc: tm-comp.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 \ + $(OPT) \ + -l tm-$(EMACS_TYPE).el -l tiny-mime.el -l tm-misc.el \ + -l tm-view.el \ + -f batch-byte-compile $? install: diff --git a/doc/tiny-mime-eng.tex b/doc/tiny-mime-eng.tex index 2fbb020..475c4d0 100644 --- a/doc/tiny-mime-eng.tex +++ b/doc/tiny-mime-eng.tex @@ -1,4 +1,4 @@ -\documentstyle[a4j]{jarticle} +\documentstyle{article} \setcounter{secnumdepth}{6} \setcounter{tocdepth}{6} \topsep=0.1cm diff --git a/tm-view.el b/tm-view.el index bd0d0a8..f93890d 100644 --- a/tm-view.el +++ b/tm-view.el @@ -21,7 +21,7 @@ ;;; (defconst mime-viewer/RCS-ID - "$Id: tm-view.el,v 6.15 1995/04/18 16:48:08 morioka Exp $") + "$Id: tm-view.el,v 6.16 1995/04/19 04:43:09 morioka Exp $") (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID)) (defconst mime/viewer-version mime-viewer/version) @@ -385,45 +385,48 @@ (mime::make-content-info beg end ctype params encoding children) )) +(defun mime::parse-parameter (str) + (let ((ret (message::parse "\;" str))) + (if ret + (if (setq ret + (message::parse mime/token-regexp + (message::parsed/rest ret))) + (let ((parameter (downcase (message::parsed/matched ret)))) + (if (setq ret (message::parse "=" (message::parsed/rest ret))) + (if (setq ret + (message::parse + mime/content-parameter-value-regexp + (message::parsed/rest ret))) + (message::make-parsed + (cons parameter + (message/strip-quoted-string + (message::parsed/matched ret)) + ) + (message::parsed/rest ret) + ) + ))))))) + +(defun mime::parse-field-body/Content-Type (str) + (let ((ret (message::parse mime/content-type-subtype-regexp str))) + (if ret + (let ((ctype (downcase (message::parsed/matched ret))) + dest) + (while (progn + (setq str (message::parsed/rest ret)) + (setq ret (mime::parse-parameter str)) + ) + (setq dest (cons (message::parsed/matched ret) dest)) + ) + (if (string-match "^[ \t]*$" str) + (cons ctype (reverse dest)) + ))))) + (defun mime/Content-Type () - (save-excursion - (save-restriction - (if (and (re-search-forward "^Content-Type:[ \t]*" nil t) - (progn - (narrow-to-region - (point) - (and (re-search-forward ".*\\(\n[ \t].*\\)*" nil t) - (match-end 0)) - ) - (goto-char (point-min)) - (re-search-forward mime/content-type-subtype-regexp nil t) - )) - (let ((ctype - (downcase - (buffer-substring (match-beginning 0) (match-end 0)) - )) - dest attribute value) - (while (and (re-search-forward "[ \t\n]*;[ \t\n]*" nil t) - (re-search-forward mime/token-regexp nil t) - ) - (setq attribute - (downcase - (buffer-substring (match-beginning 0) (match-end 0)) - )) - (if (and (re-search-forward "=[ \t\n]*" nil t) - (re-search-forward mime/content-parameter-value-regexp - nil t) - ) - (setq dest - (put-alist attribute - (message/strip-quoted-string - (buffer-substring (match-beginning 0) - (match-end 0))) - dest)) - ) - ) - (cons ctype dest) - ))))) + (let ((str (message/get-field-body "Content-Type"))) + (if str + (mime::parse-field-body/Content-Type + (message/unfolding-string str)) + ))) (defun mime/Content-Transfer-Encoding (&optional default-encoding) (save-excursion