From 133db43e7cae0d9c011df288d3cb37e2ef77e6ae Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 2 Mar 1998 14:16:32 +0000 Subject: [PATCH] tm 6.9 --- Makefile | 2 +- doc/tiny-mime-eng.tex | 2 +- rel-6eng.ol | 25 +++++++++++++++++++++++++ rel-6jp.ol | 27 ++++++++++++++++++++++++++- tm-ftp.el | 4 ++-- tm-view.el | 47 ++++++++++++++++++++++++++++++++++++++++++----- 6 files changed, 97 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 9c99c6b..c7857b1 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,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.08.tar +TARFILE = tm6.09.tar nemacs: 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/rel-6eng.ol b/rel-6eng.ol index 448292a..8a2fcd1 100644 --- a/rel-6eng.ol +++ b/rel-6eng.ol @@ -127,3 +127,28 @@ cinfo }). (5) variable `mime/go-to-top-node-method-alist' is renamed to `mime-viewer/quitting-method-alist' and changed initial value because of changes between tm-view 5.21 and tm-view 6.*. + + +** new variables + +*** mime-viewer/childrens-header-showing-Content-Type-list + + list of content-type/subtype whose children's header should be +displayed. + + This variable is used in function +`mime-viewer/default-content-header-filter-function' which defined as +default value of variable +`mime-viewer/content-header-filter-function'. Therefore if you set +another function, it may not work this variable. + + +*** mime-viewer/ignored-field-list + + list of field-name which is not displayed when header is displayed. + + This variable is used in function +`mime-viewer/default-content-header-filter-function' which defined as +default value of variable +`mime-viewer/content-header-filter-function'. Therefore if you set +another function, it may not work this variable. diff --git a/rel-6jp.ol b/rel-6jp.ol index 1a005de..2cfa6c6 100644 --- a/rel-6jp.ol +++ b/rel-6jp.ol @@ -114,7 +114,8 @@ mime::preview-content-info/FOO (FOO = {Bp|Ep|buf|cinfo}) を使うように mime-viewer/content-subject-function に改名し、引数を変更した。 (3) 変数 mime/make-content-header-filter を - mime-viewer/content-header-filter-function に改名した。 + mime-viewer/content-header-filter-function に改名し、引数を変更し + た。 (4) 変数 mime/default-showing-Content-Type-list を mime-viewer/default-showing-Content-Type-list に改名した。 @@ -122,3 +123,27 @@ mime::preview-content-info/FOO (FOO = {Bp|Ep|buf|cinfo}) を使うように (5) 変数 mime/go-to-top-node-method-alist を mime-viewer/quitting-method-alist に改名した。また、symbol 名や仕 様の変更にともない、初期設定を変更した。 + + +** 新しい変数 + +*** 変数 mime-viewer/childrens-header-showing-Content-Type-list + + 子供の header を表示すべき content-type/subtype の list. + + この変数は、変数 mime-viewer/content-header-filter-function の既定値 +として定義されている関数 +mime-viewer/default-content-header-filter-function が参照しているので、 +もし、変数 mime-viewer/content-header-filter-function の値を別の関数に +すれば無効になる。 + + +*** 変数 mime-viewer/ignored-field-list + + header を表示する場合でも表示しない field の field-name の list. + + この変数は、変数 mime-viewer/content-header-filter-function の既定値 +として定義されている関数 +mime-viewer/default-content-header-filter-function が参照しているので、 +もし、変数 mime-viewer/content-header-filter-function の値を別の関数に +すれば無効になる。 diff --git a/tm-ftp.el b/tm-ftp.el index 6907d13..d4e5fc0 100644 --- a/tm-ftp.el +++ b/tm-ftp.el @@ -6,7 +6,7 @@ ;;; modified by MORIOKA Tomohiko (1994/11/ 8) ;;; and OKABE Yasuo (1994/11/11) ;;; -;;; $Id: tm-ftp.el,v 5.0 1994/11/11 04:45:17 morioka Exp $ +;;; $Id: tm-ftp.el,v 6.0 1995/03/13 16:49:24 morioka Exp $ ;;; (provide 'tm-ftp) @@ -23,7 +23,7 @@ (setq pathname (concat "/anonymous@" site ":" directory)) (message (concat "Accessing " pathname "/" name "...")) - (switch-to-buffer mime/preview-buffer) + (switch-to-buffer mime::article/preview-buffer) (dired pathname) (goto-char (point-min)) (search-forward name) diff --git a/tm-view.el b/tm-view.el index 4e8afd2..48446b5 100644 --- a/tm-view.el +++ b/tm-view.el @@ -20,7 +20,7 @@ ;;; (defconst mime-viewer/RCS-ID - "$Id: tm-view.el,v 6.8 1995/03/12 15:58:32 morioka Exp $") + "$Id: tm-view.el,v 6.9 1995/03/13 19:50:43 morioka Exp $") (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID)) (defconst mime/viewer-version mime-viewer/version) @@ -101,14 +101,51 @@ (defvar mime-viewer/content-header-filter-function (function mime-viewer/default-content-header-filter-function)) -(defun mime-viewer/default-content-header-filter-function (cnum) - (if (listp cnum) +(defvar mime-viewer/childrens-header-showing-Content-Type-list + '("message/rfc822")) + +(defvar mime-viewer/ignored-field-list + '("Received")) + +(defun mime-viewer/default-content-header-filter-function (cnum cinfo) + (if (and (listp cnum) + (not (member + (mime::content-info/type + (mime::article/get-content-region (butlast cnum) cinfo) + ) + mime-viewer/childrens-header-showing-Content-Type-list) + )) (delete-region (goto-char (point-min)) (or (and (re-search-forward "^$" nil t) (match-end 0)) (point-max)) ) - )) + (save-excursion + (save-restriction + (narrow-to-region (goto-char (point-min)) + (or (and (re-search-forward "^$" nil t) + (match-end 0)) + (point-max)) + ) + (mapcar (function + (lambda (field) + (goto-char (point-min)) + (while (and (re-search-forward + (concat "^" (regexp-quote field) ":") + nil t) + (progn + (delete-region + (match-beginning 0) + (and + (re-search-forward + (concat message/field-body-regexp "\n") + nil t) + (match-end 0) + )) + t)) + ) + )) mime-viewer/ignored-field-list) + )))) (defvar mime-viewer/default-showing-Content-Type-list '("text/plain" "text/richtext" "text/enriched" @@ -470,7 +507,7 @@ (funcall f ctype params) )) (funcall mime-viewer/content-header-filter-function - cnum) + cnum cinfo) (goto-char nb) (funcall mime-viewer/content-subject-function cnum subj ctype params) -- 1.7.10.4