From: morioka Date: Mon, 9 Mar 1998 18:07:12 +0000 (+0000) Subject: tm 7.59. X-Git-Tag: tm7_59~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80871efc12c5b65a0780f0084c087076eb3bcbc8;p=elisp%2Ftm.git tm 7.59. --- diff --git a/ChangeLog b/ChangeLog index 473eb14..d794159 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,150 @@ +Sat May 11 16:23:16 1996 MORIOKA Tomohiko + + * tl: Version 7.22.4 was released. + * MEL: Version 4.2 was released. + * tm: Version 7.59 was released. + * tm/mh-e: Version 7.61 was released. + * tm/gnus: Version 7.60 was released. + + * tm-view.el (mime-preview/display-header): renamed from + `mime-viewer/display-header'; abolish argument `obuf'; initial + buffer was changed to preview-buffer. + + * TM-CFG: eliminate last `/' for directory. + +Sat May 11 10:09:00 1996 MORIOKA Tomohiko + + * tm-play.el: Add `mime-viewer/external-progs' to `exec-path'. + + * tm-play.el (mime-article/start-external-method-region): New + implementation. + +Thu May 9 18:47:32 1996 MORIOKA Tomohiko + + * tm-text.el (mime-viewer/default-code-convert-region): fixed. + +Thu May 9 18:46:18 1996 MORIOKA Tomohiko + + * tm-text.el: Function `mime/code-convert-region-to-emacs' was + renamed to `mime-charset-decode-region'. + + * tm-pgp.el (mime-article/view-application/pgp): Function + `mime/code-convert-region-to-emacs' was renamed to + `mime-charset-decode-region'. + + * tm-edit.el (mime-editor/normalize-body): Function + `mime/code-convert-region-from-emacs' was renamed to + `mime-charset-encode-region'. + (mime-editor::edit-again): Function + `mime/code-convert-region-to-emacs' was renamed to + `mime-charset-decode-region'. + + * tm-def.el (mime-charset-decode-region): renamed from + `mime/code-convert-region-to-emacs'. + + * tm-def.el (mime-charset-encode-region): renamed from + `mime/code-convert-region-from-emacs'. + +Thu May 9 18:18:51 1996 MORIOKA Tomohiko + + * tm-ew-d.el (mime/decode-encoded-text): Use function + `string-equal' instead of `string='. + +Thu May 9 18:14:16 1996 MORIOKA Tomohiko + + * tm-ew-d.el (mime/decode-encoded-text): Function + `mime/convert-string-to-emacs' was renamed to + `mime-charset-decode-string'. + + * tm-def.el (mime-charset-decode-string): renamed from + `mime/convert-string-to-emacs'. + +Thu May 9 18:08:47 1996 MORIOKA Tomohiko + + * tm-ew-e.el (tm-eword::encoded-word-length): Function + `mime/convert-string-from-emacs' was renamed to + `mime-charset-encode-string'. + + * tm-def.el (mime-charset-encode-string): renamed from + `mime/convert-string-from-emacs'. + +Thu May 9 16:05:49 1996 MORIOKA Tomohiko + + * tm-edit.el, tm-bbdb.el: Pekka Marjola's address was changed. + +Thu May 9 13:53:15 1996 MORIOKA Tomohiko + + * tm-def.el (mime/convert-string-from-emacs): Use function + `character-encode-string' instead of `encode-coding-string'. + (mime/convert-string-to-emacs): Use function + `character-decode-string' instead of `decode-coding-string'. + + * tm-edit.el (mime-editor::edit-again): Use function + `character-decode-region' instead of `decode-coding-region'. + + * tm-def.el (mime/code-convert-region-from-emacs): Use function + `character-encode-region' instead of `encode-coding-region'. + (mime/code-convert-region-to-emacs): Use function + `character-decode-region' instead of `decode-coding-region'. + + +Wed May 8 15:40:58 1996 MORIOKA Tomohiko + + * tl: Version 7.22.3 was released. + * tm: Version 7.58 was released. + * tm/gnus: Version 7.57 was released. + + * Makefile: tm/tm-rich.el was renamed to tm/tm-text.el. + + * README.en: tm-rich.el was renamed to tm-text.el. + Add tm-image.el. + +Wed May 8 15:21:41 1996 MORIOKA Tomohiko + + * tm-view.el: Variable `mime-viewer/code-converter-alist' and + function `mime-viewer/default-code-convert-region', + `mime-preview/decode-text-region' and + `mime-viewer/filter-text/plain' were moved to tm-text.el. + + Function `mime-viewer/filter-text/plain' was renamed to + `mime-preview/filter-for-text/plain' + + Function `mime-viewer/default-content-filter' was abolished. (`t' + of `mime-viewer/content-filter-alist' means default + content-filter) + + (mime-viewer/content-filter-alist): setting for text/enriched and + text/richtext. Use function `mime-preview/filter-for-text/plain' + as default content-filter. + +Wed May 8 15:05:03 1996 MORIOKA Tomohiko + + * inst-tm: tm-rich.el was abolished. + + * TM-ELS: tm-rich.el was renamed to tm-text.el. + + * tm-setup.el: Delete setting code for tm-rich.el. + +Wed May 8 14:46:39 1996 MORIOKA Tomohiko + + * tm-text.el (mime-preview/filter-for-text/plain): renamed from + `mime-viewer/filter-text/plain'. + (mime-preview/filter-for-text/richtext): renamed from + `mime-viewer/filter-text/richtext'. + (mime-preview/filter-for-text/enriched): renamed from + `mime-viewer/filter-text/enriched'. + + * tm-text.el (mime-preview/decode-text-region): New implementation. + + * tm-text.el (mime-viewer/code-converter-alist): moved from + tm-view.el. + (mime-viewer/default-code-convert-region): moved from tm-view.el. + (mime-preview/decode-text-region): moved from tm-view.el. + (mime-viewer/filter-text/plain): moved from tm-view.el. + + * tm-text.el: tm-rich.el was renamed to tm-text.el. + + Wed May 8 12:48:42 1996 MORIOKA Tomohiko * tl: Version 7.22.2 was released. diff --git a/Makefile b/Makefile index a7a15e5..189cdc8 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# $Id: Makefile,v 7.21 1996/04/21 18:06:22 morioka Exp morioka $ +# $Id: Makefile,v 7.22 1996/05/08 15:40:58 morioka Exp morioka $ # SHELL = /bin/sh @@ -21,7 +21,7 @@ TM_FILES = tm/README.en tm/ChangeLog \ 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 \ - tm/tm-rich.el tm/tm-image.el \ + tm/tm-text.el tm/tm-image.el \ tm/tm-play.el tm/tm-partial.el tm/tm-pgp.el \ tm/tm-ftp.el tm/tm-latex.el tm/tm-html.el tm/tm-file.el \ tm/tm-tar.el \ @@ -48,7 +48,7 @@ TL_FILES = tl/README.en tl/Makefile tl/mk-tl tl/tl-els \ FILES = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES) -TARFILE = tm7.57.tar.gz +TARFILE = tm7.59.tar.gz elc: $(EMACS) $(FLAGS) -l inst-tm -f compile-tm diff --git a/README.en b/README.en index 74e0727..cd440e5 100644 --- a/README.en +++ b/README.en @@ -1,7 +1,7 @@ [README for tm (English Version)] by MORIOKA Tomohiko and KOBAYASHI Shuhei -$Id: README.en,v 7.18 1996/04/27 15:32:23 morioka Exp $ +$Id: README.en,v 7.19 1996/05/08 15:25:04 morioka Exp $ 1 What's tm? @@ -41,7 +41,8 @@ $Id: README.en,v 7.18 1996/04/27 15:32:23 morioka Exp $ - tm-play.el : MIME content player - tm-ew-d.el : MIME encoded-word decoder - preview filter for tm-view - - tm-rich : for text/enriched and text/richtext + - tm-text : for text/* + - tm-image : for image/* and X-Face - internal methods for tm-view - tm-partial : automatic assembler for message/partial - tm-ftp : for anonymous ftp diff --git a/TM-CFG b/TM-CFG index 50bc1f2..6fd8052 100644 --- a/TM-CFG +++ b/TM-CFG @@ -1,6 +1,6 @@ ;;; -*-Emacs-Lisp-*- ;;; -;;; $Id: TM-CFG,v 5.0 1996/05/05 11:13:35 morioka Exp morioka $ +;;; $Id: TM-CFG,v 6.0 1996/05/11 10:33:20 morioka Exp morioka $ ;;; (setq load-path (append @@ -8,7 +8,7 @@ (lambda (path) (expand-file-name path (getenv "PWD")) )) - '("." "../tl/" "../mel/" "mh-e/") + '("." "../tl" "../mel" "mh-e") ) load-path)) @@ -19,13 +19,13 @@ ;;; ;; Please specify VM path. -(add-path "vm-5.95beta/" 'all-paths) +(add-path "vm-5.95beta" 'all-paths) ;; Please specify Mailcrypt path. -(add-path "mailcrypt-3.4/" 'all-paths) +(add-path "mailcrypt-3.4" 'all-paths) ;; Please specify BBDB path. -(add-path "bbdb-1.50/" 'all-paths) +(add-path "bbdb-1.50" 'all-paths) ;;; @ shell @@ -43,24 +43,24 @@ ;; Please specify install path prefix. ;;(setq PREFIX "~/") ; install to you home directory -;;(setq PREFIX "/usr/local/") ; install to shared directory -(setq PREFIX "/lab/local/") +(setq PREFIX "/usr/local/") ; install to shared directory +;;(setq PREFIX "/lab/local/") ;; Please specify tm package prefix [optional] (setq TM_PACKAGE_PREFIX "") ;; Please specify tl prefix [optional] -;;(setq TL_PREFIX "tl/") +;;(setq TL_PREFIX "tl") (setq TL_PREFIX (if (string-match "XEmacs" emacs-version) - "tl/" + "tl" "")) ;; Please specify MEL prefix [optional] -(setq MEL_PREFIX "mel/") +(setq MEL_PREFIX "mel") ;; Please specify tm prefix [optional] -(setq TM_PREFIX "tm/") +(setq TM_PREFIX "tm") ;; lisp files of tm are installed into following directory tree: ;; @@ -91,10 +91,10 @@ ;;; ;; Please specify binary path. -(defvar BIN_DIR (expand-file-name "bin/" PREFIX)) +(defvar BIN_DIR (expand-file-name "bin" PREFIX)) ;; Please specify binary path. (for external method scripts) -(setq METHOD_DIR (expand-file-name "share/tm/" PREFIX)) +(setq METHOD_DIR (expand-file-name "share/tm" PREFIX)) @@ -103,25 +103,25 @@ ;;; (setq EMACS_PREFIX - (cond ((boundp 'NEMACS) "nemacs/") - ((boundp 'MULE) "mule/") - ((string-match "XEmacs" emacs-version) "xemacs/") - (t "emacs/") + (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/")) + "lib" + "share")) (setq DATADIR (expand-file-name DATA_PREFIX PREFIX)) (setq LISP_PREFIX (if (>= emacs-major-version 19) - "site-lisp/" - "local.lisp/")) + "site-lisp" + "local.lisp")) (setq EMACS_DATADIR (expand-file-name EMACS_PREFIX DATADIR)) @@ -148,9 +148,9 @@ (setq el-file-mode (+ (* 64 6)(* 8 4) 4)) -(setq BIN_SRC_DIR "src/") +(setq BIN_SRC_DIR "src") (setq BINS '("src/ol2" "src/decode-b")) -(setq METHOD_SRC_DIR "methods/") +(setq METHOD_SRC_DIR "methods") (setq METHODS '("tm-au" "tm-file" "tm-html" "tm-image" "tm-mpeg" "tm-plain" "tmdecode")) diff --git a/TM-ELS b/TM-ELS index d8d663d..610d912 100644 --- a/TM-ELS +++ b/TM-ELS @@ -1,6 +1,6 @@ ;;; -*-Emacs-Lisp-*- ;;; -;;; $Id: TM-ELS,v 4.0 1996/04/19 06:53:14 morioka Exp $ +;;; $Id: TM-ELS,v 5.0 1996/05/08 15:01:30 morioka Exp $ ;;; (require 'tl-misc) @@ -8,8 +8,7 @@ (setq tm-modules '("signature" "tm-def" - "tm-ew-d" "tm-parse" "tm-view" "tm-play" "tm-partial" - "tm-rich" + "tm-ew-d" "tm-parse" "tm-view" "tm-text" "tm-play" "tm-partial" "tm-latex" "tm-html" "tm-tar" "tm-file" "tm-ew-e" "tm-edit" diff --git a/doc/Makefile b/doc/Makefile index ba122bc..e7bf9e9 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -22,7 +22,10 @@ GOMI = *.aux *.toc *.log \ $(DVIFILES) *.ps *~ -.SUFFIXES: .texi .info .dvi .ol .tex +.SUFFIXES: .oti .texi .info .dvi .ol .tex + +.oti.texi: + $(EMACS) -batch -q -no-site-file $< -l ol2texi.el -f ol-to-texi-buffer -f save-buffer .texi.info: $(MAKEINFO) @@ -53,6 +56,11 @@ info-ja: $(INFO_JA) info-en: $(INFO_EN) +#tm-v-mode-ja.texi: tm-v-mode-ja.oti + +#tm-mh-e_ja.info: tm-mh-e_ja.texi +# $(EMACS) -batch -q -no-site-file $< -l texinfmt -f texinfo-every-node-update -f texinfo-format-buffer -f save-buffer + tex: $(TEXFILES) diff --git a/doc/tm-mh-e_ja.texi b/doc/tm-mh-e_ja.texi index 883dbc1..c28bcf1 100644 --- a/doc/tm-mh-e_ja.texi +++ b/doc/tm-mh-e_ja.texi @@ -6,7 +6,7 @@ @titlepage @title{tm-mh-e} @author{¼é²¬ ÃÎɧ} -@code{$Id: tm-mh-e_ja.texi,v 4.0 1996/04/11 16:46:54 morioka Exp $} +@code{$Id: tm-mh-e_ja.texi,v 4.0 1996/04/11 16:46:54 morioka Exp morioka $} @end titlepage diff --git a/doc/tm-v-mode-ja.texi b/doc/tm-v-mode-ja.texi new file mode 100644 index 0000000..9753a18 --- /dev/null +++ b/doc/tm-v-mode-ja.texi @@ -0,0 +1,179 @@ +@node mime/viewer-mode +@chapter mime/viewer-mode +@cindex mime/viewer-mode + +@code{mime/viewer-mode} $B$O(B MIME message $B$r1\Mw$9$k$?$a$N(B major-mode $B$G(B +$B$9!#(BMIME viewer mode $B$G$OBPOCE*$K(B MIME message $B$rA`:n$9$k$3$H$,$G$-$^(B +$B$9!#(B + +$B$H$3$m$G!"(Bmime/viewer-mode $B$K$J$C$F$$$k(B MIME message $B$rI=<($9$k$?$a$N(B +buffer $B$N$3$H$r(B ``preview buffer'' $B$H8F$V$3$H$K$7$^$9!#(B + +@menu +* display image of preview buffer:: +* moving command of mime/viewer-mode:: preview buffer $B$G$N0\F0(B +* plying command of mime/viewer-mode:: content $B$N:F@8(B +* quit from mime/viewer-mode:: mime/viewer-mode $B$N=*N;(B +* tm-view:: mime/viewer-mode $B$N=*N;(B +@end menu + + +@node display image of preview buffer, moving command of mime/viewer-mode, mime/viewer-mode, mime/viewer-mode +@section display image of preview buffer + +mime/viewer-mode $B$G$O3F(B content $B$KBP$7$F(B + +@example + [content-subject] + (content-header) + + (content-body) + (content-separator) +@end example + +$B$H$$$&>pJs$rI=<($7$^$9!#(B + +$B0J2<$K!"I=<(Nc$r<($7$^$9!#(B + +@example +From: morioka@@jaist.ac.jp ($Be$,$j!#(B + +$B".".".".".".".".".".".(B $B%m%7%"%s!&%F%#!<$r0lGU!#(B $B".".".".".".".".".".".(B +$B".".".".".(B $B!y(B $B%8%c%`$G$O$J$/%^!<%^%l!<%I$G$b$J$/K*L*$G(B $B!y(B $B".".".".".(B +$B".".".".".(B $B'.'0'2$$'0','!(B $B'4'0'.'0'7'*','0(B $B".".".".".(B +$B".".".".".".".(B Internet E-mail: $B".".".".".".".(B +@end example + + +@node moving command of mime/viewer-mode, plying command of mime/viewer-mode, display image of preview buffer, mime/viewer-mode +@section preview buffer $B$G$N0\F0(B + +@table @kbd +@item @key{u} +$B>e$N(B content $B$KLa$k!J(Bmessage $B$N0lHV>e$N(B content $B$G$3$l$r9T$J$&$H(B +Summary mode $B$KLa$k(B (*1)$B!K(B + +@item @key{p} +$BA0$N(B content $B$K0\F0$9$k(B + +@item @key{n} +$B} +message $B$NKvHx$K0\F0$9$k(B +@end table + +@b{$B!NCm0U!O(B} +@enumerate +@item +tm-MUA $B$G(B tm-view $B$N@_Dj$r$7$F$$$J$$>l9g!"(BSummary mode $B$K$OLa$j$^$;$s!#(B +@end enumerate + + +@node plying command of mime/viewer-mode, quit from mime/viewer-mode, moving command of mime/viewer-mode, mime/viewer-mode +@section content $B$N:F@8(B + +@table @kbd +@item @key{v} +content $B$r:F@8$9$k(B (*1) + +@item @key{e} +content $B$+$i(B file $B$rl9g!"(BSummary mode $B$K$OLa$j$^$;$s!#(B +@end enumerate diff --git a/doc/tm-view-ja.ol b/doc/tm-view-ja.ol new file mode 100644 index 0000000..5c02048 --- /dev/null +++ b/doc/tm-view-ja.ol @@ -0,0 +1,764 @@ +@c $Id: tm-view=ja.texi,v 7.11 1996/02/28 14:36:34 morioka Exp $ + ++[tm-view] +@cindex tm-view + +tm-view ¤Ï GNU Emacs ¤ÇÆ°ºî¤¹¤ëÈÆÍÑŪ¤Ê MIME viewer ¤Ç¤¹¡£ + +tm-view ¤Ï @code{mime/viewer-mode} ¤È¤¤¤¦ MIME message ¤ò¸«¤ë¤¿¤á¤Î +major-mode ¤ò MUA ¤ËÂФ·¤ÆÄ󶡤·¤Þ¤¹¡£MUA ¤ÎÀ߷׼ԤϤ³¤Î mode ¤òÍøÍѤ¹ +¤ë¤³¤È¤Ç¤½¤Î MUA ¤Ë MIME µ¡Ç½¤òÉղ乤뤳¤È¤¬¤Ç¤­¤Þ¤¹¡£ + +tm-view ¤Ï MIME message ¤ò±ÜÍ÷¤¹¤ë¤¿¤á¤Î user interface ¤Î³Ë¤Ç¤¢¤ê¡¢¤½ +¤Î¾å¤Ç³Æ content-type/sub-type ¤ò°·¤¦¤¿¤á¤Î @strong{method} ¤È¸Æ¤Ð¤ì¤ë +¥×¥í¥°¥é¥à¤òÆ°ºî¤µ¤»¤Þ¤¹¡£¤Þ¤¿¡¢MIME message ¤Îɽ¼¨¤Î»ÅÊý¤ò·è¤á¤ë +@strong{filter} ¤È¸Æ¤Ð¤ì¤ë¥×¥í¥°¥é¥à¤òµ¯Æ°»þ¤Ë¸Æ¤Ó½Ð¤·¤Þ¤¹¡£ +@strong{method} ¤È @strong{filter} ¤ò tm-view ¤ËÁȤ߹þ¤à»ö¤Ë¤è¤Ã¤Æ¡¢ +@code{mime/viewer-mode} ¤Ç¤µ¤Þ¤¶¤Þ¤Ê MIME type ¤ò°·¤¦»ö¤¬¤Ç¤­¤Þ¤¹¡£ + +@menu +* MIME display:: mime/viewer-mode ¤Î²èÌ̹½À® +* method:: decoding Áàºî¤Î¼Â¸½ +* Mechanism of tm-view:: tm-view ¤Î»ÅÁÈ¤ß +* Functions of tm-view:: tm-view ¤Î´Ø¿ô +@end menu + + +++[MIME display] mime/viewer-mode ¤Î²èÌ̹½À® + +mime/viewer-mode ¤Ç¤Ï³Æ content ¤ËÂФ·¤Æ + +@example + [content-subject] + (content-header) + + (content-body) + (content-separator) +@end example + +¤È¤¤¤¦¾ðÊó¤òɽ¼¨¤·¤Þ¤¹¡£¤³¤ì¤é¤Ï content-type Ëè¤Ë design ¤òÊѹ¹¤·¤¿¤ê¡¢ +ɽ¼¨¤òÍÞÀ©¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ + +@menu +* content-subject:: +* content-header:: +* content-body:: +* content-separator:: +@end menu + + ++++[content-subject] +@cindex content-subject + +``content-subject'' ¤Ï content ¤ÎÀèƬ¤Ë¤¢¤Ã¤Æ¡¢¤½¤Î content ¤Ë´Ø¤¹¤ëÂç +¤Þ¤«¤Ê¾ðÊó¤òɽ¼¨¤¹¤ëÉôʬ¤Ç¤¹¡£ + +ɸ½à¤Ç¤Ï + +@example + [1.3 test (text/plain)] +@end example + +¤Î¤è¤¦¤Ê´¶¤¸¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£ + +ºÇ½é¤Î¿ô»ú¤Ï message Ãæ¤Î¤³¤Î content ¤Î°ÌÃÖ¤òÀáÈÖ¹æ¤Î¤è¤¦¤Ëɽ¤·¤¿¤â¤Î +¤Ç¡¢``content-number'' ¤È¸Æ¤Ó¤Þ¤¹¡£ + +£²ÈÖÌܤÎʸ»úÎó¤ÏɽÂê¤òɽ¤·¤Þ¤¹¡£¤³¤Î¾ðÊó¤Ï¡¢ + +@itemize @bullet +@item Content-Type field ¤Î name paramater ¤â¤·¤¯¤Ï x-name parameter +¤Ë½ñ¤«¤ì¤¿ file ̾ +@item Content-Description field ¤â¤·¤¯¤Ï Subject field ¤Ë½ñ¤«¤ì¤¿É½Âê +@item uuencode ¤Î¾ì¹ç¤Î file ̾ +@end itemize + +¤«¤éºî¤ê¤Þ¤¹¡£¤É¤ì¤â¸ºß¤·¤Ê¤¤¾ì¹ç¤Ï¶õÇò¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£ + +£³ÈÖÌܤγç¸Ì¤ÎÃæ¤Î¾ðÊó¤Ï¤½¤Î content ¤Î content-type/subtype ¤òɽ¤·¤Þ +¤¹¡£Èó MIME part ¤Î¾ì¹ç¡¢@code{nil} ¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£ + +¤³¤Î content-subject ¤Ï content-header, content-body ¤òɽ¼¨¤·¤Ê¤¤¾ì¹ç¡¢ +icon ¤Î¤è¤¦¤ÊÌò³ä¤ò²Ì¤¿¤·¤Þ¤¹¡£Î㤨¤Ð¡¢ + +@example + [2 (image/gif)] +@end example + +¤Î¾å¤Ç `v' ¤ò²¡¤»¤Ð¤³¤³¤ËÆþ¤Ã¤Æ¤¤¤ë³¨¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£ + + +@defvr{Variable} mime-viewer/content-subject-omitting-Content-Type-list + +content-subject ¤òɽ¼¨¤·¤Ê¤¤ Content-Type ¤ò»ØÄꤹ¤ë¡£´Ø¿ô +@code{mime-viewer/default-content-subject-function} ¤Ë¤è¤Ã¤Æ»²¾È¤µ¤ì¤ë¡£ +@end defvr + + +@deffn{Function} mime-viewer/default-content-subject-function rcnum cinfo ctype params subj + +ɸ½à¤Î content-subject ɽ¼¨´Ø¿ô¡£ÊÑ¿ô +@code{mime-viewer/content-subject-omitting-Content-Type-list} ¤ò»²¾È¤· +¤Æ¤¤¤ë¡£ +@end deffn + + +@defvar mime-viewer/content-subject-function rcnum cinfo ctype params subj + +content-subject ɽ¼¨´Ø¿ô¤òÀßÄꤹ¤ë¤¿¤á¤ÎÊÑ¿ô¡£´ûÄêÃͤϴؿô +@code{mime-viewer/default-content-subject-function} ¤Ç¤¢¤ë¡£ + +¤³¤ÎÊÑ¿ô¤Ë¡¢´Ø¿ô @code{mime-viewer/default-content-subject-function} +°Ê³°¤Î´Ø¿ô¤òÀßÄꤷ¤¿¾ì¹ç¡¢ÊÑ¿ô +@code{mime-viewer/content-subject-omitting-Content-Type-list} ¤ÎÍ­¸úÀ­ +¤ÏÊݾڤµ¤ì¤Ê¤¤¤Î¤ÇÃí°Õ¤¹¤ë¤³¤È¡£ +@end defvar + + ++++[content-header] +@cindex content-header + +¤¢¤ë content ¤Î reversed-content-number ¤ò´Ø¿ô +@code{mime-viewer/header-visible-p} Í¿¤¨¤¿»þ¤ÎÊÖ¤êÃͤ¬ @code{t} ¤Ë¤Ê¤ë +¾ì¹ç¡¢¤½¤Î content ¤Î content-header ¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£¤³¤ÎȽÄê´Ø¿ô¤Ï¡¢ +°ìÈÖ¾å¤Î content ¤Ç¤Ê¤¯¡¢¤½¤Î content ¤Î¿Æ¤Î content-type ¤¬ÊÑ¿ô +@code{mime-viewer/childrens-header-showing-Content-Type-list} ¤Ç»ØÄꤵ +¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë @code{t} ¤òÊÖ¤·¤Þ¤¹¡£ + +¤³¤Î¾ò·ï¤òÊѤ¨¤¿¤¤¾ì¹ç¤Ï¡¢¤³¤Î´Ø¿ô¤òºÆÄêµÁ¤·¤Æ²¼¤µ¤¤¡£Ã¢¤·¡¢É¸½à¤Ç¤Ï¡¢ +ÊÑ¿ô @code{mime-viewer/childrens-header-showing-Content-Type-list} ¤ò +»²¾È¤·¤Þ¤¹¤¬¡¢ºÆÄêµÁ¤·¤¿¾ì¹ç¡¢¤³¤ÎÊÑ¿ô¤ÎÍ­¸úÀ­¤ÏÊݾڤµ¤ì¤Ê¤¤¤Î¤ÇÃí°Õ¤· +¤Æ²¼¤µ¤¤¡£ + +content-header ¤¬É½¼¨¤µ¤ì¤ë¾ì¹ç¡¢content-header ¤Ï +content-header-filter ¤Ë¤è¤Ã¤ÆÀ°·Á¤µ¤ì¤Þ¤¹¡£¸Æ¤Ð¤ì¤ë +content-header-filter ¤Ï article buffer ¤Î major-mode ¤ò key ¤È¤·¤ÆÊÑ +¿ô @code{mime-viewer/content-header-filter-alist} ¤«¤éõ¤µ¤ì¤Þ¤¹¡£¤â¤·¡¢ +content-header-filter ¤¬¸«¤Ä¤«¤é¤Ê¤«¤Ã¤¿¾ì¹ç¡¢´Ø¿ô +@code{mime-viewer/default-content-header-filter} ¤¬¸Æ¤Ð¤ì¤Þ¤¹¡£ + + +@defvar mime-viewer/childrens-header-showing-Content-Type-list + +¤¢¤ë content ¤Î»Ò¤ËÅö¤¿¤ë content ¤Î content-header ¤òɽ¼¨¤¹¤Ù¤­ +Content-Type ¤ò¼ý¤á¤¿ list. ´ûÄêÃÍ¤Ï "message/rfc822" ¤Ç¤¢¤ë¡£ + +¤³¤ÎÊÑ¿ô¤Ï´Ø¿ô @code{mime-viewer/header-visible-p} ¤Ë¤è¤Ã¤Æ»²¾È¤µ¤ì¤ë¡£ +@end defvar + + +@deffn{Function} mime-viewer/header-visible-p rcnum cinfo &optional ctype + +content-info @var{cinfo} Ãæ¤Î reversed-content-number ¤¬ @var{rcnum} +¤Ç¤¢¤ë content ¤Î header ¤¬É½¼¨¤µ¤ì¤ë¾ì¹ç¡¢t ¤òÊÖ¤¹¡£¤½¤Î content ¤Î +content-type ¤¬¤¢¤é¤«¤¸¤á¤ï¤«¤Ã¤Æ¤¤¤ë¾ì¹ç¡¢@var{ctype} ¤Ë°ú¿ô¤È¤·¤ÆÅÏ +¤¹¤³¤È¤¬¤Ç¤­¤ë¡£ +@end deffn + + +@defvar mime-viewer/content-header-filter-alist + +article-buffer ¤Î major-mode ¤ò key ¤È¤·¤¿Ï¢Áۥꥹ¥È¤Ç¡¢ÃÍÉô¤Ë¤Ï +content-header-filter ¤¬Æþ¤Ã¤Æ¤¤¤ë¡£ +@end defvar + + +@deffn{Function} mime-viewer/default-content-header-filter + +¤¢¤ë content ¤Î content-header ¤òɽ¼¨¤¹¤Ù¤­»þ¡¢ÊÑ¿ô +@code{mime-viewer/content-header-filter-alist} ¤ÎÃæ¤Ë +content-header-filter ¤¬¸«¤Ä¤«¤é¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë¸Æ¤Ó½Ð¤µ¤ì¤ë¡£ + +ÊÑ¿ô @code{mime-viewer/ignored-field-regexp} ¤ò»²¾È¤¹¤ë¡£ +@end deffn + + +@defvar mime-viewer/ignored-field-list + +content-header ¤òɽ¼¨¤¹¤ë»þ¤Ë¡¢É½¼¨¤·¤Ê¤¤ field ¤ò»ØÄꤹ¤ë¡£ + +Àµµ¬É½¸½¤Î list ¤Ë¤Ê¤Ã¤Æ¤ª¤ê¡¢¤³¤ÎÃͤò¸µ¤ËÊÑ¿ô +@code{mime-viewer/ignored-field-regexp} ¤¬ºî¤é¤ì¤ë¡£ + +¤³¤ÎÊÑ¿ô¤ÏľÀÜÁàºî¤»¤º¡¢´Ø¿ô @code{tm:add-fields} ¤ä +@code{tm:delete-fields} ¤ò»È¤Ã¤ÆÁàºî¤¹¤ë¡£ +@end defvar + + ++++[content-body] +@cindex content-body + +¤¢¤ë content ¤Î content-body ¤òɽ¼¨¤¹¤ë¤«¤É¤¦¤«¤Ï¡¢´Ø¿ô +@code{mime-viewer/body-visible-p} ¤¬ @code{t} ¤Ë¤Ê¤ë¤«¤É¤¦¤«¤Ç·è¤Þ¤ê¤Þ +¤¹¡£É¸½à¤Ç¤Ï¡¢¤¢¤ë content ¤Î content-type ¤¬ÊÑ¿ô +@code{mime-viewer/default-showing-Content-Type-list} ¤ËÀßÄꤵ¤ì¤Æ¤¤¤ë +»þ¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£ + +¤¢¤ë content ¤Î content-body ¤¬É½¼¨¤µ¤ì¤ë»þ¡¢preview buffer ¤Ë¤Ï +content-body ¤ò content-filter ¤Ë¤è¤Ã¤ÆÀ°·Á¤µ¤ì¤¿¤â¤Î¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£ +¸Æ¤Ð¤ì¤ë content-filter ¤Ï article buffer ¤Î major-mode ¤ò key ¤È¤·¤Æ +ÊÑ¿ô @code{mime-viewer/content-filter-alist} ¤«¤éõ¤µ¤ì¤Þ¤¹¡£¤â¤·¡¢¤³ +¤ÎÊÑ¿ô¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤Ê¤«¤Ã¤¿¾ì¹ç¡¢´Ø¿ô +@code{mime-viewer/default-content-filter} ¤¬¸Æ¤Ð¤ì¤Þ¤¹¡£ + + +@defvar mime-viewer/default-showing-Content-Type-list + +content-body ¤òɽ¼¨¤¹¤Ù¤­ content-type ¤òÍ×ÁǤȤ¹¤ë list. +@end defvar + + +@deffn{Function} mime-viewer/body-visible-p rcnum cinfo &optional ctype + +reversed-content-number ¤¬ @var{rcnum} ¤Ç¤¢¤ë content ¤¬É½¼¨¤µ¤ì¤ë¾ì¹ç¡¢ +@code{t} ¤òÊÖ¤¹¡£¤½¤Î content ¤Î content-type ¤¬¤¢¤é¤«¤¸¤á¤ï¤«¤Ã¤Æ¤¤¤ë +¾ì¹ç¡¢@var{ctype} ¤Ë°ú¿ô¤È¤·¤ÆÅϤ¹¤³¤È¤¬¤Ç¤­¤ë¡£ +@end deffn + + +@defvar mime-viewer/content-filter-alist + +article buffer ¤Î major-mode ¤ò key ¤È¤·¤¿Ï¢Áۥꥹ¥È¤Ç¡¢ÃÍÉô¤Ë¤Ï +content-filter ¤¬Æþ¤Ã¤Æ¤¤¤ë¡£ +@end defvar + + +@deffn{Function} mime-viewer/default-content-filter rcnum cinfo ctype params subj + +¤¢¤ë content ¤Î content-body ¤òɽ¼¨¤¹¤Ù¤­»þ¡¢ÊÑ¿ô +@code{mime-viewer/content-filter-alist} ¤ÎÃæ¤Ë content-filter ¤¬¸«¤Ä¤« +¤é¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë¸Æ¤Ó½Ð¤µ¤ì¤ë¡£ + +ɸ½à¤Ç¤Ï²¿¤â¤·¤Ê¤¤¡£ +@end deffn + + ++++[content-separator] +@cindex content-separator + +content-separator ¤Ï content ¤Î°ìÈֺǸå¤Ë content ´Ö¤Î¶­ÌܤòÌÀ¤é¤«¤Ë¤¹ +¤ë¤¿¤á¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£ + +content-separator ¤Ï´Ø¿ô @code{mime-viewer/default-content-separator} +¤Ë¤è¤Ã¤Æɽ¼¨¤µ¤ì¤Þ¤¹¡£É¸½à¤Ç¤Ï¡¢content-header ¤â content-body ¤âɽ¼¨ +¤µ¤ì¤Ê¤¤¾ì¹ç¤Î¤ß¡¢²þ¹Ô¤òɽ¼¨¤·¤Þ¤¹¡£ + +content-separator ¤ÎÀßÄê¤òÊѹ¹¤·¤¿¤¤¾ì¹ç¤Ï¡¢¤³¤Î´Ø¿ô¤òºÆÄêµÁ¤·¤Æ²¼¤µ¤¤¡£ + + +@deffn{Function} mime-viewer/default-content-separator rcnum cinfo ctype params subj + +content-number ¤¬ @var{cnum} ¤Ç¤¢¤ë content ¤Î content-separator ¤òɽ +¼¨¤¹¤ë¡£É¸½à¤Ç¤Ï¡¢content-header ¤â content-body ¤âɽ¼¨¤µ¤ì¤Ê¤¤¾ì¹ç¤Î +¤ß¡¢²þ¹Ô¤òɽ¼¨¤¹¤ë¡£ +@end deffn + + +++ [method] +@cindex method + +@code{mime/viewer-mode} ¤Ç¤Ï¡¢³Æ content ¤ËÂФ·¤Æ¡¢play (@key{v}), +extract (@key{e}), print (@key{C-c C-p}) ¤È¤¤¤¦Áàºî¤ò¹Ô¤Ê¤¦¤³¤È¤¬¤Ç¤­ +¤Þ¤¹¡£¤³¤¦¤·¤¿Áàºî¤Î¤³¤È¤ò¡Ø¡Êcontent ¤ËÂФ¹¤ë¡Ëdecode Áàºî¡Ù¤È¸Æ¤Ö¤³ +¤È¤Ë¤·¤Þ¤¹¡£¤Þ¤¿¡¢@strong{play}, @strong{extract}, @strong{print} ¤È¤¤ +¤¦ decode Áàºî¤Î¼ïÎà¤Î¤³¤È¤ò @strong{decoding-mode} ¤È¸Æ¤Ö¤³¤È¤Ë¤·¤Þ¤¹¡£ + +decode Áàºî¤¬¹Ô¤Ê¤ï¤ì¤¿»þ¡¢¤½¤Î content ¤Î content-type ¤Ê¤É¤Î¾ò·ï¤ä¤½ +¤Î¾ì¤Î´Ä¶­¤Ë±þ¤¸¤Æ¼ÂºÝ¤Ë¤½¤ÎÁàºî¤ò¼Â¹Ô¤¹¤ë¼ê³¤­¤¬¸Æ¤Ð¤ì¤Þ¤¹¡£¤³¤Î¼ê³ +¤­¤Î¤³¤È¤ò @strong{method} ¤È¸Æ¤Ó¤Þ¤¹¡£ + +method ¤Ë¤Ï¡¢Emacs Lisp ¤Ç½ñ¤«¤ì¤¿ @strong{ÆâÉô method} ¤È¡¢³°Éô +program ¤Ç¼Â¸½¤µ¤ì¤¿ @strong{³°Éô method} ¤¬¤¢¤ê¤Þ¤¹¡£ÆâÉô method ¤Ï +Emacs ¤Îµ¡Ç½¤ò»È¤Ã¤Æ¤­¤áºÙ¤«¤¤½èÍý¤ò¹Ô¤Ê¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£³°Éô method +¤ÏÈóƱ´ü¥×¥í¥»¥¹¸Æ¤Ó½Ð¤·¤ò»È¤Ã¤Æ¼Â¸½¤µ¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢¼Â¹ÔÃæÂÔ¤¿¤µ¤ì¤º¤Ë +¤¹¤ß¤Þ¤¹¡£¤³¤Î¤¿¤á¡¢ÀŻ߲è¤äÆ°²è¤Ê¤É¤ÎµðÂç¤Ê data ¤òºÆÀ¸¤¹¤ë¤Î¤ËÎɤ¤¤Ç +¤·¤ç¤¦¡£ + +@menu +* decoding-condition:: content ¤Î decode ¾ò·ï¤ÎÀßÄê +* Format of method value:: method ¤ÎÃÍÉô¤Î½ñ¼° +* Example of decoding-condition:: ÀßÄêÎã +* environment variables:: ´Ä¶­ÊÑ¿ô +@end menu + + ++++[decoding-condition] content ¤Î decode ¾ò·ï¤ÎÀßÄê +@cindex content decoding condition + +tm-view ¤Ï decode Áàºî¤¬¹Ô¤Ê¤ï¤ì¤ë¤È¡¢ÊÑ¿ô +@code{mime/content-decoding-condition} ¤«¤é¤½¤Î»þ¤Î¾ò·ï¤Ë¹çÃפ·¤¿ +method ¤òÁܤ·½Ð¤·¤Æ¡¢¤½¤ì¤ò¸Æ¤Ó½Ð¤·¤Þ¤¹¡£ + +ÊÑ¿ô @code{mime/content-decoding-condition} ¤Ï + +@lisp + (¾ò·ï1 ¾ò·ï2 ...) +@end lisp + +¤È¤¤¤¦·Á¤ò¤·¤¿ list ¤Ç¡¢³Æ¾ò·ï¤Ï + +@lisp + ((field-type_1 . value_1) + (field-type_2 . value_2) + ...) +@end lisp + +¤È¤¤¤¦·Á¤ÎÏ¢ÁÛ list ¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£ + +Î㤨¤Ð¡¢text/plain ¤Î»þ¡¢tm-plain ¤òµ¯Æ°¤¹¤ë»þ¡¢ + +@lisp + ((type . "text/plain") + (method "tm-plain" nil 'file 'type 'encoding 'mode 'name)) +@end lisp + +¤È¤¤¤¦¾ò·ï¤ò½ñ¤­¤Þ¤¹¡£¤³¤Î method ¤Î value Éô¤Î½ñ¼°¤Ë¤Ä¤¤¤Æ¤Ï¸å¤Ç¾Ü¤· +¤¯½Ò¤Ù¤Þ¤¹¡£ + +¤³¤Î¾ò·ï¤Ï content-type ¤¬ text/plain ¤Ç¤¢¤ë content ¤Ê¤éÁ´¤Æ¤Î +decoding-mode ¤ÇÍ­¸ú¤Ç¤¹¡£¤·¤«¤·¡¢ + +@lisp + ((type . "text/plain") + (method "tm-plain" nil 'file 'type 'encoding 'mode 'name) + (mode . "play")) +@end lisp + +¤Ê¤é¡¢play mode ¤Î»þ¤·¤«Í­¸ú¤Ë¤Ê¤ê¤Þ¤»¤ó¡£ + +µÕ¤Ë¡¢ + +@lisp + ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file) + (mode . "play")) +@end lisp + +¤Ê¤é¡¢Á´¤Æ¤Î content-type ¤Î play mode ¤ÇÍ­¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£ + +¤³¤¦¤·¤Æ³Æ¾ò·ï¤òÁ°¤«¤é¸«¤Æ¹Ô¤­¡¢ºÇ½é¤ËÍ­¸ú¤Ë¤Ê¤Ã¤¿¾ò·ï¤¬¼Â¹Ô¤µ¤ì¤Þ¤¹¡£ + + ++++[Format of method value] method ¤ÎÃÍÉô¤Î½ñ¼° +@cindex method ¤ÎÃÍÉô¤Î½ñ¼° + +decode-condition ¤Î method field ¤Ï + +@lisp + (method . SYMBOL) +@end lisp + +¤« + +@lisp + (method ʸ»úÎó FLAG °ú¿ô1 °ú¿ô2 ...) +@end lisp + +¤È¤¤¤¦·Á¤ò¤·¤Æ¤¤¤Þ¤¹¡£ + +Á°¼Ô¤ÏÆâÉô method ¤ò»ØÄꤹ¤ë¤¿¤á¤Î·Á¼°¤Ç¡¢decode Áàºî¤¬¹Ô¤Ê¤ï¤ì¤¿»þ¡¢ +SYMBOL ¤È¤¤¤¦´Ø¿ô¤¬´Ø¿ô¸Æ¤Ó½Ð¤·¤Ë¤è¤Ã¤ÆÆâÉô method ¤È¤·¤Æ¸Æ¤Ó½Ð¤µ¤ì¤Þ +¤¹¡£ + +¸å¼Ô¤Ï³°Éô method ¤ò»ØÄꤹ¤ë¤¿¤á¤Î·Á¼°¤Ç¡¢decode Áàºî¤¬¹Ô¤Ê¤ï¤ì¤¿»þ¡¢ +ʸ»úÎó¤Ç»ØÄꤵ¤ì¤¿³°Éô program ¤¬ÈóƱ´ü¥×¥í¥»¥¹¸Æ¤Ó½Ð¤·¤Ë¤è¤Ã¤Æ³°Éô +method ¤È¤·¤Æ¸Æ¤Ó½Ð¤µ¤ì¤Þ¤¹¡£ + + +³°Éô method ¤ò»ØÄꤹ¤ë¾ì¹ç¤Î method field ¤Î½ñ¼°¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£ + +@table @samp +@item ʸ»úÎó + ³°Éô method ¤Î̾Á° +@item FLAG + @code{t} ¤Ê¤é content-header ¤â³°Éô method ¤ËÅϤ¹¡£@code{nil} + ¤Ê¤é content-body ¤Î¤ß¤òÅϤ¹¡£ +@item °ú¿ôÎó + ³°Éô method ¤Î°ú¿ô +@end table + +¤Þ¤¿¡¢³°Éô method ¤Î°ú¿ô¤Ï¼¡¤Î¤è¤¦¤Ê·Á¼°¤Ç½ñ¤­¤Þ¤¹¡£ + +@table @samp +@item ʸ»úÎó + ¤½¤Îʸ»úÎó¤òÅϤ¹ +@item 'SYMBOL + SYMBOL ¤ò key ¤È¤·¤¿ decoding-condition ¤ÎÃͤòÅϤ¹ +@item 'ʸ»úÎó + ʸ»úÎó¤ò key ¤È¤·¤¿ decoding-condition ¤ÎÃͤòÅϤ¹ +@end table + +'SYMBOL ¤Ç»ØÄê¤Ç¤­¤ë¤â¤Î¤Ë¤Ï¡¢ + +@table @samp +@item 'file + content ¤òÅϤ¹¤¿¤á¤Î file ̾ +@item 'type + Content-Type field ¤Î content-type/subtype +@item 'encoding + Content-Transfer-Encoding field ¤Î field body +@item 'mode + decoding-mode +@item 'name + file ¤ËÍ¾ì¹ç¤Î file ̾ +@end table + +¤Ê¤É¤¬¤¢¤ê¡¢'ʸ»úÎó ¤Ç¤Ï Content-Type field ¤Î parameter ¤ÎÃͤ¬»ØÄê¤Ç +¤­¤Þ¤¹¡£ + + ++++[Example of decoding-condition] decoding-condition ¤ÎÎã +@cindex decoding-condition ¤ÎÎã + +°Ê²¼¤Ë decoding-condition ¤ÎÀßÄêÎã¤ò¼¨¤·¤Þ¤¹¡£ + +@lisp +(defvar mime/content-decoding-condition + '(((type . "text/plain") + (method "tm-plain" nil 'file 'type 'encoding 'mode 'name)) + ((type . "text/x-latex") + (method "tm-latex" nil 'file 'type 'encoding 'mode 'name)) + ((type . "audio/basic") + (method "tm-au" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/gif") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/jpeg") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/tiff") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/x-tiff") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/x-xbm") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/x-pic") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "video/mpeg")` + (method "tm-mpeg" nil 'file 'type 'encoding 'mode 'name)) + ((type . "application/octet-stream") + (method "tm-file" nil 'file 'type 'encoding 'mode 'name)) + ((type . "message/partial") + (method . mime/decode-message/partial-region)) + ((method "metamail" t + "-m" "tm" "-x" "-d" "-z" "-e" 'file)(mode . "play")) + )) +@end lisp + +Î㤨¤Ð¡¢¡ÖÁ´Éô metamail »È¤¦¤ó¤ä¡×¤È¤¤¤¦¾ì¹ç¡¢ + +@lisp +(setq mime/content-decoding-condition + '( + ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file)) + )) +@end lisp + +¤È¤¹¤ì¤Ð OK ¤Ç¤¹¡£ + +¹©Éפ¹¤ì¤Ð¡¢¤«¤Ê¤êÊ£»¨¤Ê¾ò·ï¤¬½ñ¤±¤ë¤Ç¤·¤ç¤¦¡£ + + +°Ê²¼¤Ë¡¢decoding-condition ¤òÀßÄꤹ¤ë¤¿¤á¤ÎÍ­ÍѤʴؿô¤ò¾Ò²ð¤·¤Þ¤¹¡£ + + +@deffn{Function} set-atype symbol alist + +@var{symbol} ¤Ë¾ò·ï @var{alist} ¤òÄɲä·¤Þ¤¹¡£ + +Î㡧 + +@lisp +(set-atype 'mime/content-decoding-condition + '((type . "message/external-body") + ("access-type" . "anon-ftp") + (method . mime/decode-message/external-ftp) + )) +@end lisp +@end deffn + + ++++ [environment variables] ´Ä¶­ÊÑ¿ô +@cindex environment variables + +°Ê²¼¤Ë tm-view ¤Îɸ½à method ¤¬»²¾È¤¹¤ë´Ä¶­ÊÑ¿ô¤ò¼¨¤·¤Þ¤¹¡£ + +@table @var +@item TM_TMP_DIR +°ì»þŪ¤ËºîÀ®¤µ¤ì¤ë file ¤ä file ½ÐÎϤ¹¤ë¾ì¹ç¤Î default ¤Î½ÐÎÏÀè¤È¤·¤Æ +ÍѤ¤¤é¤ì¤ë directory ¤ò»ØÄꤹ¤ë¡£¾Êά¤µ¤ì¤¿¾ì¹ç¡¢/tmp/ ¤¬ÍѤ¤¤é¤ì¤ë¡£ + +@item VIDEO_DITHER +mpeg_play ¤Ç¤Î dither ¤Î¤«¤±Êý¤ò»ØÄꤹ¤ë¡£´ûÄêÃÍ¤Ï `gray'. + +@item TM_WWW_BROWSER +WWW browser ¤ò»ØÄꤹ¤ë¡£´ûÄêÃÍ¤Ï `netscape'. +@end table + +@include tm-view-m=ja.texi + + +++ [Mechanism of tm-view] tm-view ¤Î»ÅÁÈ¤ß + +tm-view ¤Ï¡¢MIME ½èÍý¤ò¹Ô¤Ê¤¦Á°¤ÎÀ¸¤Î message ¤¬Æþ¤Ã¤Æ¤¤¤ë +@strong{article-buffer} ¤È¤½¤ÎÆâÍƤò user ¤Ë´Ê·é¤Ëɽ¼¨¤·¡¢user ¤¬Áàºî +¤¹¤ë¤¿¤á¤Î @strong{preview-buffer} ¤È¤¤¤¦£²¤Ä¤Î buffer ¤ò´ÉÍý¤·¤Þ¤¹¡£ +article-buffer ¤Î major-mode ¤Ï¤â¤È¤â¤È¤Î MUA ¤Î article ɽ¼¨ÍѤΠ+major-mode ¤Ç¤¢¤ê¡¢preview-buffer ¤Î major-mode ¤Ï mime/viewer-mode ¤È +¤Ê¤ê¤Þ¤¹¡£ + +@code{mime/viewer-mode} ¤ò¼Â¹Ô¤¹¤ë¤È¡¢tm-view ¤Ï¤Þ¤º article-buffer ¤Î +ÆâÍƤò²òÀϤ·¡¢¤½¤Î message ¤Î¹½Â¤¤ò article-buffer ¤Î buffer local ÊÑ +¿ô @code{mime::article/content-info} ¤Ëµ­Ï¿¤·¤Þ¤¹¡£ + +¼¡¤Ë¡¢¤³¤Î·ë²Ì¤ò¸µ¤Ë article-buffer ¤ËÂбþ¤¹¤ë preview-buffer ¤òºî¤ê¤Þ +¤¹¡£¤³¤ÎºÝ¡¢content-type ¤Ë±þ¤¸¤Æ¡¢content ñ°Ì¤Ç header ¤ä body ¤ò²Ã +¹©¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤³¤Î header ¤ò²Ã¹©¤¹¤ë¥×¥í¥°¥é¥à¤ò +@strong{header-filter}, body ¤ò²Ã¹©¤¹¤ë¥×¥í¥°¥é¥à¤ò +@strong{content-filter} ¤È¸Æ¤Ó¡¢¤³¤ì¤é¤òÁí¾Î¤·¤Æ @strong{filter} ¤È¸Æ +¤Ó¤Þ¤¹¡£ + +preview-buffer ¤òºîÀ®¤¹¤ë»þ¤Ë¡¢message ¤Îɽ¼¨¾å¤Î¹½Â¤¤òµ­Ï¿¤·¤¿ +preview-buffer ¤Î buffer local ÊÑ¿ô @code{mime::preview/content-list} +¤¬ºî¤é¤ì¤Þ¤¹¡£tm-view ¤Ï article-buffer ¾å¤Î +@code{mime::article/content-info} ¤È preview-buffer ¾å¤Î +@code{mime::preview/content-list} ¤òÍѤ¤¤Æ message ¤ò´ÉÍý¤·¤Þ¤¹¡£ + + +Ãí°Õ¡§ ¤³¤ÎÀâÌÀ½ñ¤Ç¤Ï¡¢Content-Type field ¤Î content-type/subtype ¤Î¤³ +¤È¤ò¾Î¤·¤Æ @strong{content-type} ¤È¸Æ¤Ó¤Þ¤¹¡£ + + +@menu +* article-buffer:: article-buffer +* preview-buffer:: preview-buffer +@end menu + + ++++ [article-buffer] + +@defvr{Structure} mime::content-info rcnum point-min point-max type parameters encoding children + +article-buffer ¤Ë¤ª¤±¤ë MIME content ¤Ë´Ø¤¹¤ë¾ðÊó¤ò³ÊǼ¤¹¤ë¤¿¤á¤Î¹½Â¤ +ÂΡ£Ã±¤Ë @strong{content-info} ¤È¤â¸Æ¤Ö¡£ + +@table @var +@item rcnum +@strong{reversed content-number} (list) + +@item point-min +article-buffer ¤Ë¤ª¤±¤ëÀèƬ point + +@item point-max +article-buffer ¤Ë¤ª¤±¤ëËöÈø point + +@item type +content-type/sub-type¡Êʸ»úÎ󡢤ޤ¿¤Ï¡¢nil¡Ë + +@item parameters +Content-Type field ¤Î parameter ¡ÊÏ¢ÁÛ list¡Ë + +@item encoding +Content-Transfer-Encoding¡Êʸ»úÎ󡢤ޤ¿¤Ï¡¢nil¡Ë + +@item children +¤³¤Î content ¤Ë´Þ¤Þ¤ì¤ë contents¡Êcontent-info ¤Î list¡Ë +@end table + +¤¢¤ë content ¤¬ multipart ¤â¤·¤¯¤Ï message/rfc822 ¤Ê¤É¤ÎÊ̤Πcontent +¤ò´Þ¤à¤è¤¦¤Ê content ¤Ç¤¢¤Ã¤¿¾ì¹ç¡¢@var{children} ¤ËÊ̤Πcontent ¤Î +content-info ¤¬´Þ¤Þ¤ì¤ë»ö¤Ë¤è¤Ã¤Æ¡¢content-info ¤ÏÌÚ¹½Â¤¤Ë¤Ê¤ë¡£ + +¤³¤Î¹½Â¤ÂΤò»²¾È¤¹¤ë¤Ë¤Ï¡¢@code{mime::content-info/¥¹¥í¥Ã¥È̾} ¤È¤¤¤¦ +content-info ¤ò°ú¿ô¤Ë¤È¤ë´Ø¿ô¤òÍѤ¤¤ë¡£ + +@end defvr + + +@defvar mime::article/content-info + +article-buffer ¤ò MIME message ¤È¤·¤Æ²òÀϤ·¤¿·ë²Ì (content-info) +@end defvar + + +@defvar mime::article/preview-buffer + +article-buffer ¤ËÂбþ¤¹¤ë preview-buffer. +@end defvar + + +@defun mime-article/point-content-number point &optional cinfo + +content-info @var{cinfo} ¤Ç´ÉÍý¤µ¤ì¤ëÎΰè¤Ë¤ª¤¤¤Æ¡¢@var{point} ¤ËÂбþ +¤¹¤ë content-number ¤òÊÖ¤¹¡£ + +@var{cinfo} ¤¬¾Êά¤µ¤ì¤¿¾ì¹ç¤Ï¡¢@code{mime::article/content-info} ¤¬ÍÑ +¤¤¤é¤ì¤ë¡£ +@end defun + + +@defun mime-article/rcnum-to-cinfo rcnum &optional cinfo + +content-info @var{cinfo} ¤Ç´ÉÍý¤µ¤ì¤ëÎΰè¤Ë¤ª¤¤¤Æ¡¢ +reversed-content-number @var{rcnum} ¤ËÂбþ¤¹¤ë content-info ¤òÊÖ¤¹¡£ + +@var{cinfo} ¤¬¾Êά¤µ¤ì¤¿¾ì¹ç¤Ï¡¢@code{mime::article/content-info} ¤¬ÍÑ +¤¤¤é¤ì¤ë¡£ +@end defun + + +@defun mime-article/cnum-to-cinfo rcnum &optional cinfo + +content-info @var{cinfo} ¤Ç´ÉÍý¤µ¤ì¤ëÎΰè¤Ë¤ª¤¤¤Æ¡¢content-number +@var{rcnum} ¤ËÂбþ¤¹¤ë content-info ¤òÊÖ¤¹¡£ + +@var{cinfo} ¤¬¾Êά¤µ¤ì¤¿¾ì¹ç¤Ï¡¢@code{mime::article/content-info} ¤¬ÍÑ +¤¤¤é¤ì¤ë¡£ +@end defun + + +@defun mime/flatten-content-info &optional cinfo + +content-info @var{cinfo} Ãæ¤ËǼ¤á¤é¤ì¤¿Á´ contents ¤Î content-info ¤Î +list ¤òÊÖ¤¹¡£ + +@var{cinfo} ¤¬¾Êά¤µ¤ì¤¿¾ì¹ç¤Ï¡¢@code{mime::article/content-info} ¤¬ÍÑ +¤¤¤é¤ì¤ë¡£ +@end defun + + ++++[preview-buffer] + +@defvar mime::preview/mother-buffer + +¤³¤Î preview-buffer ¤Î¿Æ¤ËÁêÅö¤¹¤ë buffer. +@end defvar + + +@defvr{Structure} mime::preview-content-info point-min point-max buffer content-info + +preview-buffer ¤Ë¤ª¤±¤ë MIME content ¤Ë´Ø¤¹¤ë¾ðÊó¤ò³ÊǼ¤¹¤ë¤¿¤á¤Î¹½Â¤ +ÂΡ£Ã±¤Ë @strong{preview-content-info} ¤È¤â¸Æ¤Ö¡£ + +@table @var +@item point-min +preview-buffer ¤Ë¤ª¤±¤ëÀèƬ point + +@item point-max +preview-buffer ¤Ë¤ª¤±¤ëËöÈø point + +@item buffer +¤³¤Î content ¤ËÂбþ¤¹¤ë article-buffer + +@item content-info +¤³¤Î content ¤ËÂбþ¤¹¤ë content-info +@end table + +@end defvr + + +@defvar mime::preview/content-list + +¤³¤Î preview-buffer ¤Î¹½Â¤¤ò¤¢¤é¤ï¤¹ preview-content-info ¤Î list. +@end defvar + + +@defvar mime::preview/article-buffer + +¤³¤Î preview-buffer ¤ËÂбþ¤¹¤ë article-buffer. +@end defvar + + +@defvar mime::preview/original-major-mode + +¤³¤Î preview-buffer ¤Î¤â¤È¤Ë¤Ê¤Ã¤¿ buffer ¤Î major-mode. +@end defvar + + +@defvar mime::preview/original-window-configuration + +@code{mime/viewer-mode} ¤ò¼Â¹Ô¤·¤Æ¡¢¤³¤Î preview-buffer ºî¤ëľÁ°¤Î +window-configuration. +@end defvar + + +@defun mime-preview/point-pcinfo point &optional pcl + +preview-content-info @var{pcl} ¤Ç´ÉÍý¤µ¤ì¤ë preview-buffer Ãæ¤ÎÎΰè¤Ë +¤ª¤¤¤Æ¡¢@var{point} ¤ËÂбþ¤¹¤ë content ¤Î preview-content-info ¤òÊÖ¤¹¡£ + +@var{cinfo} ¤¬¾Êά¤µ¤ì¤¿¾ì¹ç¤Ï¡¢@code{mime::preview/content-list} ¤¬ÍÑ +¤¤¤é¤ì¤ë¡£ +@end defun + + +++ [Functions of tm-view] MIME message ¤Î decode ¤Ë´Ø¤¹¤ë´Ø¿ô + +tm-view ¤ÎÄ󶡤¹¤ë´Ø¿ô¤ò³Æ MUA ¤ËÁȤ߹þ¤à»ö¤Ë¤è¤Ã¤Æ¡¢³Æ MUA ¤Ë MIME ºÆ +À¸µ¡Ç½¤òÉղ乤ë»ö¤¬¤Ç¤­¤Þ¤¹¡£ + +tm-view ¤¬³Æ MUA ¤ËÄ󶡤¹¤ë´Ø¿ô¤Ï¡¢MIME preview ¤ò¹Ô¤¦¤¿¤á¤Î´Ø¿ô +@code{mime/viewer-mode} ¤È RFC 1522 encoded-word ¤ò decode ¤¹¤ë¤¿¤á¤Î +´Ø¿ô·²¤Ç¤¹¡£ + +Memo: µì tiny-mime.el ¤Ë¤¢¤Ã¤¿ RFC 1522 encoded-word ¤ò decode ¤¹¤ë¤¿ +¤á¤Î´Ø¿ô·²¤Ï tm-view ¤Ë°ú¤­·Ñ¤¬¤ì¤Þ¤·¤¿¡£ + + +@menu +* function to preview:: MIME message ¤ò preview ¤¹¤ë¤¿¤á¤Î´Ø¿ô +* encoded-word decoding:: encoded-word ¤ò decode ¤¹¤ë¤¿¤á¤Î´Ø¿ô +@end menu + + ++++ [function to preview] MIME message ¤ò±ÜÍ÷¤¹¤ë¤¿¤á¤Î´Ø¿ô +@cindex mime/viewer-mode + +@deffn{Command} mime/viewer-mode &optional mother ctl encoding + +current-buffer ¤ò MIME message ¤È¤·¤Æ²òÀϤ·¤Æ¡¢¤½¤ÎÆâÍƤò±ÜÍ÷¤¹¤ë¤¿¤á +¤Î preview-buffer ¤òºîÀ®¤·¡¢@code{mime/viewer-mode} ¤ËÆþ¤ê¤Þ¤¹¡£ + +@var{mother} ¤Ï¡¢²òÀϤÎÂоݤȤ¹¤ë article-buffer ¤¬ message/partial ·Á +¼°¤Îʬ³ä¤µ¤ì¤¿ message ¤ò·ë¹ç¤·¤ÆºîÀ®¤·¤¿¾ì¹ç¤Ê¤É¤Ë¤ª¤±¤ë¸µ¤Î buffer +¤ò»ØÄꤹ¤ë¤¿¤á¤Ë»È¤¤¤Þ¤¹¡£ + +@var{ctl} ¤Ï Content-Type field ¤Î field-body ¤ò +@code{mime/Content-Type} ¤Î½ÐÎÏÀµ¼°¤Ë¤·¤¿¤â¤Î¤òÆþ¤ì¤Þ¤¹¡£¤³¤Î°ú¿ô¤¬¤¢ +¤ë¾ì¹ç¡¢article-buffer ¤Î Content-Type field ¤è¤ê¤â¤³¤Î°ú¿ô¤òÍ¥À褷¤Þ +¤¹¡£ + +@var{encoding} ¤Ï Content-Transfer-Encoding field ¤Î field-body ¤òÆþ¤ì +¤Þ¤¹¡£¤³¤Î°ú¿ô¤¬¤¢¤ë¾ì¹ç¡¢article-buffer ¤Î Content-Transfer-Encoding +field ¤è¤ê¤â¤³¤Î°ú¿ô¤òÍ¥À褷¤Þ¤¹¡£ +@end deffn + + ++++[encoded-word decoding] +@cindex encoded-word +@cindex non-ASCII field +@cindex message header + +tm-view ¤Ï RFC 1522 ¤Çµ¬Äꤵ¤ì¤¿ encoded-word ¤ò decode ¤¹¤ë¤¿¤á¤Î´Ø¿ô +¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£ + + +@deffn{Command} mime/decode-message-header + +current buffer ¤Î message header Ãæ¤Î encoded-word ¤ò decode ¤·¤Þ¤¹¡£ +@end deffn + + +@deffn{Command} mime-eword/decode-region beg end &optional unfolding + +@var{beg} ¤È @var{end} ¤Ç°Ï¤Þ¤ì¤¿ÎΰèÃæ¤Î encoded-word ¤ò decode ¤·¤Þ +¤¹¡£ + +@var{unfolding} ¤¬ non-nil ¤Î¾ì¹ç¡¢fold ¤µ¤ì¤¿ field ¤ò unfolding ¤·¤Þ +¤¹¡£ +@end deffn + + +@deffn{Function} mime-eword/decode-string str + +@var{str} ¤Î encoded-word ¤ò decode ¤·¤Þ¤¹¡£ + +fold ¤µ¤ì¤¿Ê¸»úÎó¤Ï unfolding ¤µ¤ì¤Þ¤¹¡£ +@end deffn diff --git a/gnus/ChangeLog b/gnus/ChangeLog index e6655ca..af828b1 100644 --- a/gnus/ChangeLog +++ b/gnus/ChangeLog @@ -1,3 +1,32 @@ +Thu May 9 18:52:46 1996 MORIOKA Tomohiko + + * tm/gnus: Version 7.60 was released. + + * tm-sgnus.el: Function `tm-gnus/code-convert-region-to-emacs' was + abolished. + (tm-gnus/content-header-filter): Use function + `mime-charset-decode-region' instead of + `tm-gnus/code-convert-region-to-emacs'. + +Thu May 9 13:55:15 1996 MORIOKA Tomohiko + + * tm-sgnus.el (tm-gnus/decode-summary-from-and-subjects): Use + function `character-decode-string' instead of + `decode-coding-string'. + + * tm-sgnus.el (tm-gnus/article-decode-encoded-word): Use function + `character-decode-region' instead of `decode-coding-region'. + + +Wed May 8 15:27:00 1996 MORIOKA Tomohiko + + * tm/gnus: Version 7.57 was released. + + * tm-sgnus.el: fixed problem in XEmacs 20.0 with Mule. + + * tm-sgnus.el: check `(boundp '*koi8*)'. (cf. [tm-ja:1832]) + + Wed May 8 12:47:38 1996 MORIOKA Tomohiko * tm/gnus: Version 7.55 was released. diff --git a/gnus/Makefile b/gnus/Makefile index bd5a46f..6409835 100644 --- a/gnus/Makefile +++ b/gnus/Makefile @@ -30,7 +30,7 @@ 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.54.tar +TARFILE = tm-gnus7.59.tar gnus: diff --git a/gnus/tm-sgnus.el b/gnus/tm-sgnus.el index 3ef3497..45d416a 100644 --- a/gnus/tm-sgnus.el +++ b/gnus/tm-sgnus.el @@ -7,7 +7,7 @@ ;;; Author: MORIOKA Tomohiko ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1995/09/24 -;;; Version: $Revision: 7.55 $ +;;; Version: $Revision: 7.60 $ ;;; 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.55 1996/05/07 18:19:39 morioka Exp $") + "$Id: tm-sgnus.el,v 7.60 1996/05/09 18:52:46 morioka Exp $") (defconst tm-gnus/version (concat (get-version-string tm-gnus/RCS-ID) " for September")) @@ -113,8 +113,8 @@ This variable is set to `gnus-show-mime'.") (defun tm-gnus/content-header-filter () (goto-char (point-min)) (mime-preview/cut-header) - (tm-gnus/code-convert-region-to-emacs (point-min)(point-max) - mime/default-coding-system) + (mime-charset-decode-region (point-min)(point-max) + mime/default-coding-system) (mime/decode-message-header) ) @@ -122,12 +122,9 @@ This variable is set to `gnus-show-mime'.") 'gnus-original-article-mode (function tm-gnus/content-header-filter)) -(fset 'tm-gnus/code-convert-region-to-emacs - (symbol-function 'mime/code-convert-region-to-emacs)) - (set-alist 'mime-viewer/code-converter-alist 'gnus-original-article-mode - (function tm-gnus/code-convert-region-to-emacs)) + (function mime-charset-decode-region)) (defun mime-viewer/quitting-method-for-sgnus () (if (not gnus-show-mime) @@ -201,10 +198,10 @@ This variable is set to `gnus-show-mime'.") (setq gnus-show-mime-method (function tm-gnus/preview-article)) (defun tm-gnus/article-decode-encoded-word () - (decode-coding-region (point-min)(point-max) - (save-excursion - (set-buffer gnus-summary-buffer) - mime/default-coding-system)) + (character-decode-region (point-min)(point-max) + (save-excursion + (set-buffer gnus-summary-buffer) + mime/default-coding-system)) (mime/decode-message-header) (run-hooks 'tm-gnus/article-prepare-hook) ) @@ -226,14 +223,21 @@ This variable is set to `gnus-show-mime'.") (cond ((featurep 'mule) - (if (boundp 'MULE) - (define-service-coding-system gnus-nntp-service nil *noconv*) - ) - (if (and (boundp 'nntp-server-process) - (processp nntp-server-process) + (cond ((boundp 'MULE) + (define-service-coding-system gnus-nntp-service nil *noconv*) + (if (and (boundp 'nntp-server-process) + (processp nntp-server-process) + ) + (set-process-coding-system nntp-server-process *noconv* *noconv*) ) - (set-process-coding-system nntp-server-process *noconv* *noconv*) - ) + ) + (running-xemacs-20 + (if (and (boundp 'nntp-server-process) + (processp nntp-server-process) + ) + (set-process-input-coding-system nntp-server-process 'noconv) + ) + )) (call-after-loaded 'nnheader (lambda () @@ -257,7 +261,8 @@ This variable is set to `gnus-show-mime'.") (gnus-set-newsgroup-default-coding-system "alt.chinese.text" *hz*) (gnus-set-newsgroup-default-coding-system "alt.chinese.text.big5" *big5*) (gnus-set-newsgroup-default-coding-system "han" *euc-kr*) - (gnus-set-newsgroup-default-coding-system "relcom" *koi8*) + (and (boundp '*koi8*) + (gnus-set-newsgroup-default-coding-system "relcom" *koi8*)) )) @@ -286,9 +291,9 @@ This variable is set to `gnus-show-mime'.") (if (eq method 'nntp) (progn (setq from - (decode-coding-string from mime/default-coding-system)) + (character-decode-string from mime/default-coding-system)) (setq subj - (decode-coding-string subj mime/default-coding-system)) + (character-decode-string subj mime/default-coding-system)) )) (mail-header-set-from header (mime-eword/decode-string from)) @@ -299,7 +304,7 @@ This variable is set to `gnus-show-mime'.") (or (boundp 'nnheader-encoded-words-decoding) (add-hook 'gnus-select-group-hook - #'tm-gnus/decode-summary-from-and-subjects) + 'tm-gnus/decode-summary-from-and-subjects) ) diff --git a/inst-tm b/inst-tm index 027305e..b08ad03 100644 --- a/inst-tm +++ b/inst-tm @@ -1,6 +1,6 @@ ;;; -*-Emacs-Lisp-*- ;;; -;;; $Id: inst-tm,v 6.0 1996/05/05 11:14:38 morioka Exp $ +;;; $Id: inst-tm,v 7.0 1996/05/08 15:05:03 morioka Exp $ ;;; (load-file "TM-CFG") @@ -68,7 +68,6 @@ (defun compile-tm () (print load-path) - (require 'tm-rich) (require 'mel-u) (require 'tm-edit) (load "rmailsum") diff --git a/mh-e/ChangeLog b/mh-e/ChangeLog index 5e17292..9972222 100644 --- a/mh-e/ChangeLog +++ b/mh-e/ChangeLog @@ -1,3 +1,19 @@ +Sat May 11 16:24:52 1996 MORIOKA Tomohiko + + * tm/mh-e: Version 7.61 was released. + +Thu May 9 19:01:06 1996 MORIOKA Tomohiko + + * tm-mh-e.el (tm-mh-e/charset-decode-region): renamed from + `tm-mh-e/code-convert-region-to-emacs'. + +Thu May 9 18:57:07 1996 MORIOKA Tomohiko + + * tm-mh-e.el (tm-mh-e/code-convert-region-to-emacs): Function + `mime/code-convert-region-to-emacs' was renamed to + `mime-charset-decode-region'. + + Fri Apr 26 04:47:43 1996 MORIOKA Tomohiko * tm/mh-e: Version 7.59 was released. diff --git a/mh-e/Makefile b/mh-e/Makefile index a340aea..e52de8d 100644 --- a/mh-e/Makefile +++ b/mh-e/Makefile @@ -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.59.tar +TARFILE = tm-mh-e7.61.tar elc: diff --git a/mh-e/tm-mh-e.el b/mh-e/tm-mh-e.el index 3b5fab2..4b6946d 100644 --- a/mh-e/tm-mh-e.el +++ b/mh-e/tm-mh-e.el @@ -9,7 +9,7 @@ ;;; modified by YAMAOKA Katsumi ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1993/11/21 (obsolete mh-e-mime.el) -;;; Version: $Revision: 7.59 $ +;;; Version: $Revision: 7.61 $ ;;; Keywords: mail, MH, MIME, multimedia, encoded-word, multilingual ;;; ;;; This file is part of tm (Tools for MIME). @@ -50,7 +50,7 @@ ;;; (defconst tm-mh-e/RCS-ID - "$Id: tm-mh-e.el,v 7.59 1996/04/25 22:19:02 morioka Exp $") + "$Id: tm-mh-e.el,v 7.61 1996/05/09 19:01:06 morioka Exp $") (defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID)) @@ -251,18 +251,18 @@ digest are inserted into the folder after that message." ;;; @ for tm-view ;;; -(fset 'tm-mh-e/code-convert-region-to-emacs - (symbol-function 'mime/code-convert-region-to-emacs)) +(fset 'tm-mh-e/charset-decode-region + (symbol-function 'mime-charset-decode-region)) (set-alist 'mime-viewer/code-converter-alist 'mh-show-mode - (function tm-mh-e/code-convert-region-to-emacs)) + (function tm-mh-e/charset-decode-region)) (defun tm-mh-e/content-header-filter () (goto-char (point-min)) (mime-preview/cut-header) - (tm-mh-e/code-convert-region-to-emacs (point-min)(point-max) - mime/default-coding-system) + (tm-mh-e/charset-decode-region (point-min)(point-max) + mime/default-coding-system) (mime/decode-message-header) ) diff --git a/tm-bbdb.el b/tm-bbdb.el index 1b0cc46..fa0d84f 100644 --- a/tm-bbdb.el +++ b/tm-bbdb.el @@ -6,9 +6,9 @@ ;;; ;;; Author: KOBAYASHI Shuhei ;;; Artur Pioro -;;; modified by Pekka Marjola +;;; modified by Pekka Marjola ;;; Maintainer: KOBAYASHI Shuhei -;;; Version: $Id: tm-bbdb.el,v 7.7 1996/04/23 06:34:57 shuhei-k Exp $ +;;; Version: $Id: tm-bbdb.el,v 7.8 1996/05/09 16:01:13 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia, multilingual, BBDB ;;; ;;; This file is part of tm (Tools for MIME). diff --git a/tm-def.el b/tm-def.el index d554a8b..576899f 100644 --- a/tm-def.el +++ b/tm-def.el @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: tm-def.el,v 7.36 1996/04/27 15:30:29 morioka Exp $ +;;; $Id: tm-def.el,v 7.42 1996/05/09 18:24:39 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia, definition ;;; ;;; This file is part of tm (Tools for MIME). @@ -203,34 +203,34 @@ (defvar mime/default-coding-system *ctext*) -(defun mime/convert-string-to-emacs (str charset) +(defun mime-charset-encode-string (str charset) (let ((cs (assoc charset mime/charset-coding-system-alist))) (if cs - (decode-coding-string str (cdr cs)) + (character-encode-string str (cdr cs)) ))) -(defun mime/convert-string-from-emacs (str charset) +(defun mime-charset-decode-string (str charset) (let ((cs (assoc charset mime/charset-coding-system-alist))) (if cs - (encode-coding-string str (cdr cs)) + (character-decode-string str (cdr cs)) ))) -(defun mime/code-convert-region-to-emacs (beg end charset &optional encoding) +(defun mime-charset-encode-region (beg end charset &optional encoding) (let ((ct (if (stringp charset) (cdr (assoc (upcase charset) mime/charset-coding-system-alist)) mime/default-coding-system))) (if ct - (decode-coding-region beg end ct) + (character-encode-region beg end ct) ))) -(defun mime/code-convert-region-from-emacs (beg end charset &optional encoding) +(defun mime-charset-decode-region (beg end charset &optional encoding) (let ((ct (if (stringp charset) (cdr (assoc (upcase charset) mime/charset-coding-system-alist)) mime/default-coding-system))) (if ct - (encode-coding-region beg end ct) + (character-decode-region beg end ct) ))) diff --git a/tm-edit.el b/tm-edit.el index df0383f..be28d3e 100644 --- a/tm-edit.el +++ b/tm-edit.el @@ -8,7 +8,7 @@ ;;; MORIOKA Tomohiko ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1994/08/21 renamed from mime.el -;;; Version: $Revision: 7.56 $ +;;; Version: $Revision: 7.59 $ ;;; Keywords: mail, news, MIME, multimedia, multilingual ;;; ;;; This file is part of tm (Tools for MIME). @@ -122,7 +122,7 @@ ;;; (defconst mime-editor/RCS-ID - "$Id: tm-edit.el,v 7.56 1996/05/05 16:40:31 morioka Exp $") + "$Id: tm-edit.el,v 7.59 1996/05/09 18:40:11 morioka Exp $") (defconst mime-editor/version (get-version-string mime-editor/RCS-ID)) @@ -607,7 +607,7 @@ Tspecials means any character that matches with it in header must be quoted.") (reverse mime-editor/menu-list) )) -;;; modified by Pekka Marjola +;;; modified by Pekka Marjola ;;; 1995/9/5 (c.f. [tm-en:69]) (defun mime-editor/define-menu-for-xemacs () "Define menu for Emacs 19." @@ -776,11 +776,9 @@ User customizable variables (not documented all of them): ;; Define menu. Menus for other emacs implementations are ;; welcome. - ;; modified by Pekka Marjola - ;; 1995/9/5 (c.f. [tm-eng:69]) (cond (running-xemacs (mime-editor/define-menu-for-xemacs)) - ((string-match "^19\\." emacs-version) + ((>= emacs-major-version 19) (mime-editor/define-menu-for-emacs19) )) ;; end @@ -1938,77 +1936,82 @@ Content-Transfer-Encoding: 7bit ;; Remove extra whitespaces after the tag. (if (looking-at "[ \t]+$") (delete-region (match-beginning 0) (match-end 0))) - (cond ((= (following-char) ?\^M) - ;; It must be image, audio or video. - (let ((beg (point)) - (end (mime-editor/content-end))) - ;; Insert explicit MIME tags after hidden messages. - (forward-line 1) - (if (and (not (eobp)) - (not (looking-at mime-editor/single-part-tag-regexp))) - (progn - (insert (mime-make-text-tag) "\n") - (forward-line -1) ;Process it again as text. + (cond + ((= (following-char) ?\^M) + ;; It must be image, audio or video. + (let ((beg (point)) + (end (mime-editor/content-end))) + ;; Insert explicit MIME tags after hidden messages. + (forward-line 1) + (if (and (not (eobp)) + (not (looking-at mime-editor/single-part-tag-regexp))) + (progn + (insert (mime-make-text-tag) "\n") + (forward-line -1) ;Process it again as text. + )) + ;; Show a hidden message. The point is not altered + ;; after the conversion. + (mime-flag-region beg end ?\n) + )) + ((mime-test-content-type contype "message") + ;; Content-type "message" should be sent as is. + (forward-line 1) + ) + ((mime-test-content-type contype "text") + ;; Define charset for text if necessary. + (setq charset (or charset (mime-editor/choose-charset))) + (mime-editor/define-charset charset) + (cond ((string-equal contype "text/x-rot13-47") + (save-excursion + (forward-line) + (set-mark (point)) + (goto-char (mime-editor/content-end)) + (tm:caesar-region) + )) + ((string-equal contype "text/enriched") + (save-excursion + (let ((beg (progn + (forward-line) + (point))) + (end (mime-editor/content-end)) + ) + (enriched-encode beg end) + (goto-char beg) + (if (search-forward "\n\n") + (delete-region beg (match-end 0)) + ) + )))) + ;; Point is now on current tag. + ;; Define encoding and encode text if necessary. + (or encoding ;Encoding is not specified. + (let* ((encoding + (cdr + (assoc charset + mime-editor/charset-default-encoding-alist) )) - ;; Show a hidden message. The point is not altered - ;; after the conversion. - (mime-flag-region beg end ?\n))) - ((mime-test-content-type contype "message") - ;; Content-type "message" should be sent as is. - (forward-line 1)) - ((mime-test-content-type contype "text") - ;; Define charset for text if necessary. - (setq charset (or charset (mime-editor/choose-charset))) - (mime-editor/define-charset charset) - (cond ((string-equal contype "text/x-rot13-47") - (save-excursion - (forward-line) - (set-mark (point)) - (goto-char (mime-editor/content-end)) - (tm:caesar-region) - )) - ((string-equal contype "text/enriched") - (save-excursion - (let ((beg (progn - (forward-line) - (point))) - (end (mime-editor/content-end)) - ) - (enriched-encode beg end) - (goto-char beg) - (if (search-forward "\n\n") - (delete-region beg (match-end 0)) - ) - )))) - ;; Point is now on current tag. - ;; Define encoding and encode text if necessary. - (if (null encoding) ;Encoding is not specified. - (let* ((encoding - (cdr - (assoc charset - mime-editor/charset-default-encoding-alist) - )) - (beg (mime-editor/content-beginning)) - ) - (mime/code-convert-region-from-emacs - beg (mime-editor/content-end) charset) - (mime-encode-region encoding - beg (mime-editor/content-end)) - (mime-editor/define-encoding encoding))) - (forward-line 1)) - ((null encoding) ;Encoding is not specified. - ;; Application, image, audio, video, and any other - ;; unknown content-type without encoding should be - ;; encoded. - (let* ((encoding "base64") ;Encode in BASE64 by default. - (beg (mime-editor/content-beginning)) - (end (mime-editor/content-end)) - (body (buffer-substring beg end)) - ) - (mime-encode-region encoding beg end) - (mime-editor/define-encoding encoding)) - (forward-line 1)) - ) + (beg (mime-editor/content-beginning)) + ) + (mime-charset-encode-region beg (mime-editor/content-end) + charset) + (mime-encode-region encoding beg (mime-editor/content-end)) + (mime-editor/define-encoding encoding) + )) + (forward-line 1) + ) + ((null encoding) ;Encoding is not specified. + ;; Application, image, audio, video, and any other + ;; unknown content-type without encoding should be + ;; encoded. + (let* ((encoding "base64") ;Encode in BASE64 by default. + (beg (mime-editor/content-beginning)) + (end (mime-editor/content-end)) + (body (buffer-substring beg end)) + ) + (mime-encode-region encoding beg end) + (mime-editor/define-encoding encoding)) + (forward-line 1) + ) + ) ))) (defun mime-delete-field (field) @@ -2579,94 +2582,94 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" ) (setq type ctype) ) - (cond ((string-equal type "multipart") - (let ((boundary (assoc-value "boundary" params))) - (re-search-forward (concat "\n--" boundary) nil t) - (let ((bb (match-beginning 0)) eb tag) - (setq tag (format "\n--<<%s>>-{" stype)) - (goto-char bb) - (insert tag) - (setq bb (+ bb (length tag))) - (re-search-forward (concat "\n--" boundary "--") nil t) - (setq eb (match-beginning 0)) - (replace-match (format "\n--}-<<%s>>" stype)) - (save-restriction - (narrow-to-region bb eb) - (goto-char (point-min)) - (while (re-search-forward - (concat "\n--" boundary "\n") nil t) - (let ((beg (match-beginning 0)) - end) - (delete-region beg (match-end 0)) - (save-excursion - (if (re-search-forward - (concat "\n--" boundary) nil t) - (setq end (match-beginning 0)) - (setq end (point-max)) - ) - (save-restriction - (narrow-to-region beg end) - (mime-editor::edit-again code-conversion) - (goto-char (point-max)) - )))) - )) - (goto-char (point-min)) - (or (= (point-min) 1) - (delete-region (point-min) - (if (re-search-forward "^$" nil t) - (match-end 0) - (point-min) - ))) - )) - (t - (let* ((str (rfc822/get-header-string-except - "^Content-Type" "")) - charset - (pstr - (mapconcat (function - (lambda (attr) - (if (string-equal (car attr) - "charset") - (progn - (setq charset (cdr attr)) - "") - (concat ";" (car attr) - "=" (cdr attr)) - ) - )) - params "")) - ) - (if code-conversion - (if charset - (mime/code-convert-region-to-emacs - (point-min) (point-max) charset) - (decode-coding-region - (point-min) (point-max) - mime/default-coding-system) - )) - (and str - (setq pstr (concat pstr "\n" str)) - ) - (let ((he - (if (re-search-forward "^$" nil t) - (match-end 0) - (point-min) - ))) - (if (= (point-min) 1) - (progn - (goto-char he) - (insert - (concat - "\n" - (mime-create-tag (concat type "/" stype)) - )) - ) - (delete-region (point-min) he) - (insert - (concat "\n" (mime-create-tag - (concat type "/" stype pstr)))) - )) - )))) + (cond + ((string-equal type "multipart") + (let ((boundary (assoc-value "boundary" params))) + (re-search-forward (concat "\n--" boundary) nil t) + (let ((bb (match-beginning 0)) eb tag) + (setq tag (format "\n--<<%s>>-{" stype)) + (goto-char bb) + (insert tag) + (setq bb (+ bb (length tag))) + (re-search-forward (concat "\n--" boundary "--") nil t) + (setq eb (match-beginning 0)) + (replace-match (format "\n--}-<<%s>>" stype)) + (save-restriction + (narrow-to-region bb eb) + (goto-char (point-min)) + (while (re-search-forward + (concat "\n--" boundary "\n") nil t) + (let ((beg (match-beginning 0)) + end) + (delete-region beg (match-end 0)) + (save-excursion + (if (re-search-forward + (concat "\n--" boundary) nil t) + (setq end (match-beginning 0)) + (setq end (point-max)) + ) + (save-restriction + (narrow-to-region beg end) + (mime-editor::edit-again code-conversion) + (goto-char (point-max)) + )))) + )) + (goto-char (point-min)) + (or (= (point-min) 1) + (delete-region (point-min) + (if (re-search-forward "^$" nil t) + (match-end 0) + (point-min) + ))) + )) + (t + (let* ((str (rfc822/get-header-string-except + "^Content-Type" "")) + charset + (pstr + (mapconcat (function + (lambda (attr) + (if (string-equal (car attr) + "charset") + (progn + (setq charset (cdr attr)) + "") + (concat ";" (car attr) + "=" (cdr attr)) + ) + )) + params "")) + ) + (if code-conversion + (if charset + (mime-charset-decode-region (point-min)(point-max) + charset) + (character-decode-region (point-min)(point-max) + mime/default-coding-system) + )) + (and str + (setq pstr (concat pstr "\n" str)) + ) + (let ((he + (if (re-search-forward "^$" nil t) + (match-end 0) + (point-min) + ))) + (if (= (point-min) 1) + (progn + (goto-char he) + (insert + (concat + "\n" + (mime-create-tag (concat type "/" stype)) + )) + ) + (delete-region (point-min) he) + (insert + (concat "\n" (mime-create-tag + (concat type "/" stype pstr)))) + )) + )))) (if code-conversion (decode-coding-region (point-min) (point-max) mime/default-coding-system) diff --git a/tm-ew-d.el b/tm-ew-d.el index 3232770..411d1c6 100644 --- a/tm-ew-d.el +++ b/tm-ew-d.el @@ -10,7 +10,7 @@ ;;; MORIOKA Tomohiko ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1993/6/3 (1995/10/3 obsolete tiny-mime.el) -;;; Version: $Revision: 7.10 $ +;;; Version: $Revision: 7.12 $ ;;; Keywords: mail, news, MIME, RFC 1522, multilingual, encoded-word ;;; ;;; This file is part of tm (Tools for MIME). @@ -41,7 +41,7 @@ ;;; (defconst tm-ew-d/RCS-ID - "$Id: tm-ew-d.el,v 7.10 1996/04/19 08:24:15 morioka Exp $") + "$Id: tm-ew-d.el,v 7.12 1996/05/09 18:18:51 morioka Exp $") (defconst mime/eword-decoder-version (get-version-string tm-ew-d/RCS-ID)) @@ -177,14 +177,14 @@ (defun mime/decode-encoded-text (charset encoding str) (let ((dest - (cond ((string= "B" encoding) + (cond ((string-equal "B" encoding) (base64-decode-string str)) - ((string= "Q" encoding) + ((string-equal "Q" encoding) (q-encoding-decode-string str)) (t (message "unknown encoding %s" encoding) nil)))) (if dest - (mime/convert-string-to-emacs dest charset) + (mime-charset-decode-string dest charset) ))) diff --git a/tm-ew-e.el b/tm-ew-e.el index a01fb90..f500554 100644 --- a/tm-ew-e.el +++ b/tm-ew-e.el @@ -6,7 +6,7 @@ ;;; Copyright (C) 1993 .. 1996 MORIOKA Tomohiko ;;; ;;; Author: MORIOKA Tomohiko -;;; Version: $Revision: 7.17 $ +;;; Version: $Revision: 7.18 $ ;;; 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.17 1996/05/04 04:58:37 morioka Exp $") + "$Id: tm-ew-e.el,v 7.18 1996/05/09 18:08:47 morioka Exp $") (defconst mime-eword/encoder-version (get-version-string tm-ew-e/RCS-ID)) @@ -244,13 +244,11 @@ ret) (setq ret (cond ((equal encoding "B") - (setq string - (mime/convert-string-from-emacs string charset)) + (setq string (mime-charset-encode-string string charset)) (base64-length string) ) ((equal encoding "Q") - (setq string - (mime/convert-string-from-emacs string charset)) + (setq string (mime-charset-encode-string string charset)) (q-encoding-length string) ))) (if ret diff --git a/tm-pgp.el b/tm-pgp.el index 09a0ec0..a9832eb 100644 --- a/tm-pgp.el +++ b/tm-pgp.el @@ -2,13 +2,13 @@ ;;; tm-pgp.el --- tm-view internal methods for PGP. ;;; ;;; Copyright (C) 1995 Free Software Foundation, Inc. -;;; Copyright (C) 1995 MORIOKA Tomohiko +;;; Copyright (C) 1995,1996 MORIOKA Tomohiko ;;; ;;; Author: MORIOKA Tomohiko ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1995/12/7 ;;; Version: -;;; $Id: tm-pgp.el,v 7.13 1996/04/27 15:11:21 morioka Exp $ +;;; $Id: tm-pgp.el,v 7.14 1996/05/09 18:43:14 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia, PGP, security ;;; ;;; This file is part of tm (Tools for MIME). @@ -101,7 +101,7 @@ (and (search-forward "\n\n") (match-end 0))) - (setq code-converter (function mime/code-convert-region-to-emacs)) + (setq code-converter (function mime-charset-decode-region)) )) (setq major-mode 'mime/show-message-mode) (setq mime::article/code-converter code-converter) diff --git a/tm-play.el b/tm-play.el index b2cc49a..67fa392 100644 --- a/tm-play.el +++ b/tm-play.el @@ -8,7 +8,7 @@ ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1995/9/26 (separated from tm-view.el) ;;; Version: -;;; $Id: tm-play.el,v 7.16 1996/04/21 19:57:22 morioka Exp $ +;;; $Id: tm-play.el,v 7.18 1996/05/11 10:09:00 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia ;;; ;;; This file is part of tm (Tools for MIME). @@ -31,10 +31,12 @@ (require 'tm-view) -(defvar mime-viewer/external-progs "/usr/local/share/tm/" +(defvar mime-viewer/external-progs "/usr/local/share/tm" "*Directory containing tm external methods.") +(add-to-list 'exec-path mime-viewer/external-progs) + ;;; @ content decoder ;;; @@ -142,21 +144,31 @@ (cdr (cdr method))) )) (let ((process-environment - (let ((rest process-environment) - dest cell) - (while (setq cell (car rest)) - (setq dest - (cons - (if (string-match "^PATH=" cell) - (format "PATH=%s:%s" - mime-viewer/external-progs - (substring cell (match-end 0))) - cell) - dest)) - (setq rest (cdr rest)) + (let* ((rest process-environment) + (dest (cons nil nil)) + (prest dest) + (path nil) + cell) + (while (and (setq cell (car rest)) + (not + (if (string-match "^PATH=" cell) + (setq path + (format + "PATH=%s:%s" + mime-viewer/external-progs + (substring cell (match-end 0)) + ))))) + (setcar prest cell) + (setcdr prest (cons nil nil)) + (setq rest (cdr rest) + prest (cdr prest)) ) - (nconc (nreverse dest) rest) - ))) + (setcar + prest + (or path + (format "PATH=%s" mime-viewer/external-progs))) + (setcdr prest (cdr rest)) + dest))) (apply (function start-process) args) ) (mime-article/show-output-buffer) diff --git a/tm-setup.el b/tm-setup.el index 2fbb759..e0f3f6d 100644 --- a/tm-setup.el +++ b/tm-setup.el @@ -1,6 +1,31 @@ ;;; -;;; $Id: tm-setup.el,v 7.2 1996/04/14 00:18:09 morioka Exp $ +;;; tm-setup.el --- setup file for tm viewer. ;;; +;;; Copyright (C) 1995 Free Software Foundation, Inc. +;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko +;;; +;;; Author: MORIOKA Tomohiko +;;; Version: +;;; $Id: tm-setup.el,v 7.3 1996/05/08 15:00:00 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 'tl-misc) @@ -22,17 +47,7 @@ (method . mime/decode-message/external-ftp) )) (autoload 'mime/decode-message/external-ftp "tm-ftp") - - ;; for text/richtext - (set-alist 'mime-viewer/content-filter-alist - "text/richtext" (function mime-viewer/filter-text/richtext)) - (autoload 'mime-viewer/filter-text/richtext "tm-rich") - - ;; for text/enriched - (set-alist 'mime-viewer/content-filter-alist - "text/enriched" (function mime-viewer/filter-text/enriched)) - (autoload 'mime-viewer/filter-text/enriched "tm-rich") - + ;; for image/* (if running-xemacs (require 'tm-image) @@ -110,8 +125,4 @@ (provide 'tm-setup) -;;; Local Variables: -;;; mode: emacs-lisp -;;; mode: outline-minor -;;; outline-regexp: ";;; @+\\|(......" -;;; End: +;;; tm-setup.el ends here diff --git a/tm-text.el b/tm-text.el new file mode 100644 index 0000000..12bfc53 --- /dev/null +++ b/tm-text.el @@ -0,0 +1,130 @@ +;;; +;;; tm-text.el --- a tm-view content filter to display +;;; text/plain, text/richtext and text/enriched +;;; in Emacs buffers +;;; +;;; Copyright (C) 1995 Free Software Foundation, Inc. +;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko +;;; +;;; Author: MORIOKA Tomohiko +;;; Version: +;;; $Id: tm-text.el,v 7.11 1996/05/09 18:47:32 morioka Exp $ +;;; Keywords: mail, news, MIME, multimedia, text +;;; +;;; 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: + +;;; @ code conversion +;;; + +(defvar mime-viewer/code-converter-alist + '((mime/show-message-mode . mime-charset-decode-region) + (mime/temporary-message-mode . mime-charset-decode-region) + (t . mime-viewer/default-code-convert-region) + )) + +(defun mime-viewer/default-code-convert-region + (beg end charset &optional encoding) + (if (member encoding '("quoted-printable" "base64")) + (mime-charset-decode-region beg end charset) + )) + +(defun mime-preview/decode-text-region (beg end charset encoding) + (mime/decode-region encoding beg end) + (let* ((mode mime::preview/original-major-mode) + (m (or (save-excursion + (set-buffer mime::preview/article-buffer) + mime::article/code-converter) + (cdr (or (assq mode mime-viewer/code-converter-alist) + (assq t mime-viewer/code-converter-alist))) + )) + ) + (and (functionp m) + (funcall m beg (point-max) charset encoding) + ))) + + +;;; @ content filters for tm-view +;;; + +(defun mime-preview/filter-for-text/plain (ctype params encoding) + (let ((charset (cdr (assoc "charset" params))) + (beg (point-min)) (end (point-max)) + ) + (mime-preview/decode-text-region beg end charset encoding) + ) + (goto-char (point-max)) + (if (not (eq (char-after (1- (point))) ?\n)) + (insert "\n") + ) + (if browse-url-browser-function + (progn + (goto-char (point-min)) + (while (re-search-forward tm:URL-regexp nil t) + (let ((beg (match-beginning 0)) + (end (match-end 0))) + (tm:add-button beg end + (function tm:browse-url) + (list (buffer-substring beg end)))) + ))) + (run-hooks 'mime-viewer/plain-text-preview-hook) + ) + +(defun mime-preview/filter-for-text/richtext (ctype params encoding) + (let* ((mode mime::preview/original-major-mode) + (m (assq mode mime-viewer/code-converter-alist)) + (charset (assoc "charset" params)) + ;; 1995/9/21 (c.f. tm-eng:105), 1995/10/3 (c.f. tm-eng:121) + ;; modified by Eric Ding + (beg (point-min)) (end (point-max)) + ) + (remove-text-properties beg end '(face nil)) + (mime/decode-region encoding beg end) + (if (and m (fboundp (setq m (cdr m)))) + (funcall m beg (point-max) charset encoding) + (mime-viewer/default-code-convert-region beg (point-max) + charset encoding) + ) + (richtext-decode beg (point-max)) + )) + +(defun mime-preview/filter-for-text/enriched (ctype params encoding) + (let* ((mode mime::preview/original-major-mode) + (m (assq mode mime-viewer/code-converter-alist)) + (charset (assoc "charset" params)) + ;; 1995/9/21 (c.f. tm-eng:105), 1995/10/3 (c.f. tm-eng:121) + ;; modified by Eric Ding + (beg (point-min)) (end (point-max)) + ) + (remove-text-properties beg end '(face nil)) + (mime/decode-region encoding beg end) + (if (and m (fboundp (setq m (cdr m)))) + (funcall m beg (point-max) charset encoding) + (mime-viewer/default-code-convert-region beg (point-max) + charset encoding) + ) + (enriched-decode beg (point-max)) + )) + + +;;; @ end +;;; + +(provide 'tm-text) + +;;; tm-text.el ends here diff --git a/tm-view.el b/tm-view.el index d51fdec..9c88f3a 100644 --- a/tm-view.el +++ b/tm-view.el @@ -8,7 +8,7 @@ ;;; modified by Steven L. Baur ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1994/7/13 (1994/8/31 obsolete tm-body.el) -;;; Version: $Revision: 7.57 $ +;;; Version: $Revision: 7.59 $ ;;; Keywords: mail, news, MIME, multimedia ;;; ;;; This file is part of tm (Tools for MIME). @@ -38,13 +38,14 @@ (require 'tm-ew-d) (require 'tm-def) (require 'tm-parse) +(require 'tm-text) ;;; @ version ;;; (defconst mime-viewer/RCS-ID - "$Id: tm-view.el,v 7.57 1996/05/04 07:42:27 morioka Exp $") + "$Id: tm-view.el,v 7.59 1996/05/11 16:23:16 morioka Exp $") (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID)) (defconst mime/viewer-version mime-viewer/version) @@ -276,11 +277,11 @@ Each elements are regexp of field-name. [tm-view.el]") ;;; @@ content filter ;;; -(defvar mime-viewer/content-filter-alist nil) - -(defun mime-viewer/default-content-filter (rcnum cinfo ctype params subj) - (mime-viewer/filter-text/plain ctype params encoding) - ) +(defvar mime-viewer/content-filter-alist + '(("text/enriched" . mime-preview/filter-for-text/enriched) + ("text/richtext" . mime-preview/filter-for-text/richtext) + (t . mime-preview/filter-for-text/plain) + )) ;;; @@ content separator @@ -461,10 +462,10 @@ The compressed face will be piped to this command.") (narrow-to-region nb nb) (funcall mime-viewer/content-subject-function rcnum cinfo ctype params subj) - (set-buffer ibuf) (if (mime-viewer/header-visible-p rcnum cinfo ctype) - (mime-viewer/display-header beg he obuf) + (mime-preview/display-header beg he) ) + (set-buffer ibuf) (if (and (null rcnum) (member ctype mime-viewer/content-subject-showing-Content-Type-list)) @@ -499,21 +500,18 @@ The compressed face will be piped to this command.") (goto-char ne) ))) -(defun mime-viewer/display-header (beg end obuf) - (let ((str (buffer-substring beg end)) - (f (assq major-mode mime-viewer/content-header-filter-alist)) - ) - (save-excursion - (set-buffer obuf) - (save-restriction - (narrow-to-region (point)(point)) - (insert str) - (if (and f (setq f (cdr f))) - (funcall f) - (mime-viewer/default-content-header-filter) - ) - (run-hooks 'mime-viewer/content-header-filter-hook) - )))) +(defun mime-preview/display-header (beg end) + (save-restriction + (narrow-to-region (point)(point)) + (insert-buffer-substring mime::preview/article-buffer beg end) + (let ((f (cdr (assq mime::preview/original-major-mode + mime-viewer/content-header-filter-alist)))) + (if (functionp f) + (funcall f) + (mime-viewer/default-content-header-filter) + )) + (run-hooks 'mime-viewer/content-header-filter-hook) + )) (defun mime-viewer/display-body (beg end obuf rcnum cinfo ctype params subj encoding) @@ -524,12 +522,11 @@ The compressed face will be piped to this command.") (setq be (point-max)) (narrow-to-region be be) (insert str) - (let ((f (assoc-value ctype mime-viewer/content-filter-alist))) - (if (and f (fboundp f)) - (funcall f ctype params encoding) - (mime-viewer/default-content-filter rcnum cinfo ctype params subj) - )) - ))) + (let ((f (cdr (or (assoc ctype mime-viewer/content-filter-alist) + (assq t mime-viewer/content-filter-alist))))) + (and (functionp f) + (funcall f ctype params encoding) + ))))) (defun mime-viewer/display-message/partial (obuf) (set-buffer obuf) @@ -658,59 +655,6 @@ The compressed face will be piped to this command.") )) -;;; @ content filter -;;; - -(defvar mime-viewer/code-converter-alist - '((mime/show-message-mode . mime/code-convert-region-to-emacs) - (mime/temporary-message-mode . mime/code-convert-region-to-emacs) - )) - -(defun mime-viewer/default-code-convert-region - (beg end charset &optional encoding) - (if (member encoding '("quoted-printable" "base64")) - (mime/code-convert-region-to-emacs beg (point-max) charset) - )) - -(defun mime-preview/decode-text-region (beg end charset encoding) - (mime/decode-region encoding beg end) - (let* ((mode mime::preview/original-major-mode) - (m (or (save-excursion - (set-buffer mime::preview/article-buffer) - mime::article/code-converter) - (cdr (assq mode mime-viewer/code-converter-alist)) - )) - ) - (if (and m (fboundp m)) - (funcall m beg (point-max) charset encoding) - (mime-viewer/default-code-convert-region - beg (point-max) charset encoding) - ))) - -(defun mime-viewer/filter-text/plain (ctype params encoding) - (let ((charset (cdr (assoc "charset" params))) - (beg (point-min)) (end (point-max)) - ) - (mime-preview/decode-text-region beg end charset encoding) - ) - (goto-char (point-max)) - (if (not (eq (char-after (1- (point))) ?\n)) - (insert "\n") - ) - (if browse-url-browser-function - (progn - (goto-char (point-min)) - (while (re-search-forward tm:URL-regexp nil t) - (let ((beg (match-beginning 0)) - (end (match-end 0))) - (tm:add-button beg end - (function tm:browse-url) - (list (buffer-substring beg end)))) - ))) - (run-hooks 'mime-viewer/plain-text-preview-hook) - ) - - ;;; @ MIME viewer mode ;;;