From dff747b273ad1f0ab6be1822c47652ca985e6817 Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 2 Mar 1998 15:12:08 +0000 Subject: [PATCH] tm 6.67 --- Changes-6.50-6.54.ja | 101 ++++++++ Changes-6.54-6.58.ja | 47 ++++ Changes-6.59-6.63.ja | 73 ++++++ Changes-6.64-6.67.en | 102 ++++++++ Changes-6.64-6.67.ja | 131 ++++++++++ Makefile | 44 +++- Makefile.bc | 8 +- doc/Makefile | 16 +- doc/tm-eword_ja.texi | 261 ++++++++++++++++++++ doc/tm-view_ja.texi | 661 ++++++++++++++++++++++++++++++++++++++++++++++++++ doc/tm_ja.texi | 312 ++++++++++++++++++++++++ gnus/Makefile | 4 +- gnus/tm-dgnus.el | 90 ++++--- methods/tmdecode | 1 + mh-e/tm-mh-e.el | 20 +- ol2.c | 2 +- richtext.el | 121 +++++++++ tiny-mime.el | 29 ++- tinyrich.el | 93 +++++++ tm-rich.el | 149 +----------- tm-rmail.el | 5 +- tm-view.el | 11 +- 22 files changed, 2051 insertions(+), 230 deletions(-) create mode 100644 Changes-6.50-6.54.ja create mode 100644 Changes-6.54-6.58.ja create mode 100644 Changes-6.59-6.63.ja create mode 100644 Changes-6.64-6.67.en create mode 100644 Changes-6.64-6.67.ja create mode 100644 doc/tm-eword_ja.texi create mode 100644 doc/tm-view_ja.texi create mode 100644 doc/tm_ja.texi create mode 100644 richtext.el create mode 100644 tinyrich.el diff --git a/Changes-6.50-6.54.ja b/Changes-6.50-6.54.ja new file mode 100644 index 0000000..d53b825 --- /dev/null +++ b/Changes-6.50-6.54.ja @@ -0,0 +1,101 @@ +tm-view.el +---------------------------- +revision 6.54 +date: 1995/06/13 22:31:38; author: morioka; state: Exp; lines: +19 -8 +application/octet-stream $B$N(B Content-Transfer-Encoding $B$,B8:_$7$J$$$+(B +7bit $B$+(B 8bit $B$N;~0J30$G$OI=<($7$J$$$h$&$K4X?t(B +mime-viewer/body-visible-p $B$r=$@5$7$?!#(B +---------------------------- +revision 6.53 +date: 1995/06/13 21:14:30; author: morioka; state: Exp; lines: +2 -4 +$BJQ?t(B mime-viewer/code-converter-alist $B$N4{DjCM$N(B mh-e $BMQ$N@_Dj$r:o=|$7(B +$B$?!#(B +---------------------------- +revision 6.52 +date: 1995/06/13 21:10:33; author: morioka; state: Exp; lines: +49 -30 +$B$A$g$C$HJB$YJQ$($F@0M}$7$?!#(B +---------------------------- +revision 6.51 +date: 1995/06/13 20:58:46; author: morioka; state: Exp; lines: +22 -12 +uuencode $B$N;~!"(Buuencode $B$H$7$F$N(B file $BL>$rM%@h$7$F;2>H$9$k$h$&$K4X?t(B +mime-viewer/get-subject $B$r=$@5$7$?!#(B +---------------------------- + +tm-mh-e.el +---------------------------- +revision 6.18 +date: 1995/06/20 21:07:39; author: morioka; state: Exp; lines: +34 -32 +article buffer $B$*$h$S(B preview buffer $B$,(B read-only $B$K$J$C$F$$$J$+$C$?IT(B +$B6q9g$r=$@5$7$?!#(B +---------------------------- +revision 6.17 +date: 1995/06/19 18:57:08; author: morioka; state: Exp; lines: +5 -1 +$B4X?t(B tm-mh-e/display-msg $B$G!"(B*noconv* $B$GFI$_9~$`>l9g!"2~9T5-9f$,(B CR LF +$B$N>l9g(B CR $B$r=|5n$9$k$h$&$K=$@5$7$?!#(B +---------------------------- +revision 6.16 +date: 1995/06/15 22:06:31; author: morioka; state: Exp; lines: +19 -13 +page-msg $B$H(B previous-page $B$K$*$$$F!"(Btm-mh-e/decode-all $B$,(B nil $B$N>l9g!"(B +original $B$N4X?t$r8F$V$h$&$K$7$?!#(B +---------------------------- +revision 6.15 +date: 1995/06/15 20:07:53; author: morioka; state: Exp; lines: +9 -6 +$B4X?t(B tm-mh-e/toggle-decoding-mode $B$G!"(Btm-mh-e/decode-all $B$r(B nil $B$K$7$?(B +$B;~$K(B preview buffer $B$,$&$^$/(B kill $B$5$l$J$$IT6q9g$r=$@5$7$?!#(B +---------------------------- +revision 6.14 +date: 1995/06/15 13:33:45; author: morioka; state: Exp; lines: +6 -2 +$B4X?t(B tm-mh-e/toggle-decoding-mode $B$G(B tm-mh-e/decode-all $B$r(B nil $B$K$9$k(B +$B;~!"(Bpreview buffer $B$r(B kill $B$9$k$h$&$K$7$?!#(B +---------------------------- +revision 6.13 +date: 1995/06/15 13:28:02; author: morioka; state: Exp; lines: +6 -4 +$B;32,(B $B9nH~(B $B$5$s[)$/!'(B +====================================================================== + $B#1!%%a!<%k$rFI$s$G$$$k$H$-$K=i$a$F(B "\et" (tm-mh-e/toggle-decoding-mode) + $B$r%?%$%W$9$k$H!"(Bview-mode $B$N%P%C%U%!$,L5$$$N$G$*$+$7$J$3$H$K$J$j(B + $B$^$9!#(B + + $B#2!%>e5-$H4XO"$7$^$9$,!"(Bshow-buffer $B$,(B mh-show-mode $B$K$J$C$F$$$k$H$-(B + $B$K(B "\et" $B$r%?%$%W$9$k$H!"0JA0$K(B "v" (tm-mh-e/view-message) $B$r $B$5$s$N;XE&$K=>$$!"(B +mime/viewer-mode $B$r. +---------------------------- + +mh-e/tm-mh-e.el +---------------------------- +revision 6.23 +date: 1995/07/17 16:37:20; author: morioka; state: Exp; lines: +2 -2 +Fixed function `tm-mh-e/cite' about folded fields. +---------------------------- +revision 6.22 +date: 1995/07/06 18:35:17; author: morioka; state: Exp; lines: +12 -6 +Fixed function `tm-mh-e/summary-before-quit'. +---------------------------- +revision 6.21 +date: 1995/06/22 12:02:13; author: morioka; state: Exp; lines: +13 -1 +Set to variable `mh-before-quit-hook' a function to kill preview-buffer. +---------------------------- + +gnus/tm-dgnus.el +---------------------------- +revision 6.9 +date: 1995/07/03 07:50:58; author: morioka; state: Exp; lines: +6 -1 +Fixed function `tm-gnus/view-message' for Emacs 19.29. +---------------------------- +revision 6.8 +date: 1995/06/28 17:38:41; author: morioka; state: Exp; lines: +41 -39 +Defined macro `gnus-get-article-buffer'. +---------------------------- +revision 6.7 +date: 1995/06/27 06:25:04; author: morioka; state: Exp; lines: +2 -1 +Added (require 'tl-list). +---------------------------- diff --git a/Changes-6.64-6.67.ja b/Changes-6.64-6.67.ja new file mode 100644 index 0000000..06dee58 --- /dev/null +++ b/Changes-6.64-6.67.ja @@ -0,0 +1,131 @@ +tm-view.el +---------------------------- +revision 6.67 +date: 1995/07/03 07:41:02; author: morioka; state: Exp; lines: +2 -2 +$B4X?t(B mime-viewer/default-code-convert-region $B$NIT6q9g$r=$@5!#(B +---------------------------- +revision 6.66 +date: 1995/07/03 07:07:55; author: morioka; state: Exp; lines: +2 -2 +original Emacs $B$K4X?t(B char-before $B$,L5$+$C$?$N$G!"4X?t(B char-after $B$G=q(B +$B$-D>$7$?!#(B +---------------------------- +revision 6.65 +date: 1995/07/03 06:59:29; author: morioka; state: Exp; lines: +5 -1 +$B4X?t(B mime-viewer/filter-text/plain $B$G!"(Btext/plain part $B$N:G8e$,2~9T$G(B +$B$J$$>l9g!"(Bpreview buffer $B$N:G8e$K2~9T$rA^F~$9$k$h$&$K=$@5$7$?!#(B +---------------------------- +revision 6.64 +date: 1995/07/02 12:26:11; author: morioka; state: Exp; lines: +4 -1 +body $B$,$J$$5-;v$N>l9g$NIT6q9g$r=$@5$7$?!#(B +---------------------------- + +tm-rich.el +---------------------------- +revision 6.7 +date: 1995/07/15 16:45:29; author: morioka; state: Exp; lines: +3 -54 +tm $B$K0MB8$7$J$$ItJ,$r(B richtext.el $B$KJ,N%$7$?!#(B +---------------------------- +revision 6.6 +date: 1995/07/06 19:53:10; author: morioka; state: Exp; lines: +2 -6 +$B4X?t(B richtext-to-enriched-region $B$NIT6q9g$r=$@5$7$?!#(B +---------------------------- +revision 6.5 +date: 1995/07/05 16:22:20; author: morioka; state: Exp; lines: +10 -97 +text/enriched decoder $B$r(B tinyrich.el $B$K0\$7$?!#(B +---------------------------- +revision 6.4 +date: 1995/07/05 15:41:30; author: morioka; state: Exp; lines: +26 -23 +$B9=@.$rJQ99$7$?!#(B +---------------------------- +revision 6.3 +date: 1995/07/05 14:37:22; author: morioka; state: Exp; lines: +73 -67 +(1) Emacs 19.29 $B$K9g$o$;$F!"4X?t(B mime/decode-text/enriched-region $B$r(B + enriched-decode $B$K2~L>$7$?!#$^$?!"4X?t(B enriched-decode $B$,B8:_$7$J(B + $B$$>l9g$N$_(B defun $B$9$k$h$&$K$7$?!#(B +(2) $B4X?t(B enriched-decode $B$NIT6q9g$r=$@5$7$?!#!J$$$D$N:"$+$i$+(B enbug $B$7(B + $B$F$$$?$i$7$$!K(B +(3) $B4X?t(B richtext-to-enriched-region $B$r:n@.$7!"4X?t(B + mime-viewer/filter-text/richtext $B$G$O$3$l$r;H$C$F(B text/enriched $B7A(B + $B<0$K$7$?$b$N$r4X?t(B enriched-decode $B$G(B decode $B$9$k$h$&$K$7$?!#(B +---------------------------- + +richtext.el + text/richtext $B7A<0$K4X$9$k=hM}$r9T$&(B tm $B$K0MB8$7$J$$(B module $B$H(B + $B$7$F?7$?$KAO@_$7$?!#!J$G$b!"(BRMS $B$K(B reject $B$5$l$?$+$i@h9T$-$OIT(B + $BL@!#(B(^_^; $B$b$7$+$9$k$H!"(Benriched.el $B$KE}9g$5$l$k$+$b$7$l$J$$!K(B + text/richtext $B7A<0$N(B decode $B$NB>!"(BEmacs 19.29 $B0J9_$G$O(B + text/richtext $B7A<0$N(B file $B$N(B enriched-mode $B$rMxMQ$7$?(B WYSIWYG + $BJT=8$r(B support $B$9$k!#(B + +tinyrich.el + Emacs 19.28 $B0JA0$N(B emacs $B$G$N(B enriched.el $B$NBeMQIJ!#(B + text/richtext $B$H(B text/enriched $B$N(B decode $B$N$_$r(B support $B$9$k!#(B + $B!J $B$5$s$N2~NI0F$r=$@5$7$F:NMQ$7$?!#(B +---------------------------- + +mh-e/tm-mh-e.el +---------------------------- +revision 6.23 +date: 1995/07/17 16:37:20; author: morioka; state: Exp; lines: +2 -2 +Subject $B$,(B folding $B$7$F$$$k>l9g$N$3$H$r9MN8$7$F!"4X?t(B tm-mh-e/cite $B$r(B +$B=$@5$7$?!#(B +---------------------------- +revision 6.22 +date: 1995/07/06 18:35:17; author: morioka; state: Exp; lines: +12 -6 +$B4X?t(B tm-mh-e/summary-before-quit $B$r=$@5$7$?!#(B +---------------------------- +revision 6.21 +date: 1995/06/22 12:02:13; author: morioka; state: Exp; lines: +13 -1 +$BJQ?t(B mh-before-quit-hook $B$K(B preview-buffer $B$r(B kill $B$9$k$?$a$N4X?t$r@_(B +$BDj$7$?!#(B +---------------------------- + +gnus/tm-dgnus.el +---------------------------- +revision 6.9 +date: 1995/07/03 07:50:58; author: morioka; state: Exp; lines: +6 -1 +$B4X?t(B tm-gnus/view-message $B$N(B Emacs 19.29 $B$N>l9g$NIT6q9g$r=$@5$7$?!#(B +---------------------------- +revision 6.8 +date: 1995/06/28 17:38:41; author: morioka; state: Exp; lines: +41 -39 +macro `gnus-get-article-buffer' $B$rDj5A$7$?!#(B +---------------------------- +revision 6.7 +date: 1995/06/27 06:25:04; author: morioka; state: Exp; lines: +2 -1 +$BEDCf!wIY;NDL(B $B$5$s[)$/!'(B +====================================================================== +$B$3$s$I$O(B + + Symbol's function definition is void: set-alist + +$B$H$J$j$^$7$?!#(B +====================================================================== +$B$h$C$F!"(B(require 'tl-list) $B$rDI2C$7$?!#(B +---------------------------- +revision 6.6 +date: 1995/06/27 04:49:58; author: morioka; state: Exp; lines: +5 -1 +$BEDCf!wIY;NDL(B $B$5$s[)$/!'(B +====================================================================== +(ding)GNUS $B$r5/F0$9$k$H(B + +Symbol's function definition is void: get-version-string + +$B$H$$$&%a%C%;!<%8$,$G$F(B(ding)GNUS $B$,5/F0$7$^$;$s!#(B +====================================================================== +$B$3$N$?$a!"(B(require 'tl-str) $B$rDI2C$7$?!#$D$$$G$K!"(B(require 'gnus) $B$bF~(B +$B$l$?!#(B +---------------------------- diff --git a/Makefile b/Makefile index d17e499..bcbfce0 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# $Id: Makefile,v 6.14 1995/06/26 08:13:11 morioka Exp morioka $ +# $Id: Makefile,v 6.17 1995/07/17 17:10:21 morioka Exp morioka $ # # Please specify emacs executables: @@ -43,18 +43,36 @@ CP = /bin/cp -p UTILS = ol2 decode-b GOMI = $(UTILS) *.elc loadpath -FILES = tm/README.eng tm/rel-*.ol \ - tm/Makefile tm/Makefile.bc tm/make-lpath tm/inst-el tm/inst-elc \ - 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/*-path tm/gnus/mk-tgnus tm/gnus/*.el \ - tm/mh-e/Makefile tm/mh-e/Makefile.bc tm/mh-e/code-jp.ol tm/mh-e/*.el \ - mel/*.el mel/Makefile* mel/inst* mel/make-lpath \ - tl/README.eng \ - tl/Makefile tl/Makefile.bc tl/loadpath \ - tl/*.el tl/doc/*.texi - -TARFILE = tm6.63.tar + +TM_FILES = tm/README.eng tm/rel-*.ol tm/Changes* \ + tm/Makefile tm/Makefile.bc \ + tm/make-lpath tm/inst-el tm/inst-elc \ + tm/tm-view.el tm/tiny-mime.el \ + tm/tm-mule.el tm/tm-nemacs.el tm/tm-orig.el tm/tm-misc.el \ + tm/tm-ftp.el tm/tm-latex.el tm/tm-partial.el \ + tm/tm-rich.el tm/richtext.el tm/tinyrich.el \ + tm/tm-comp.el \ + tm/tm-setup.el tm/mime-setup.el \ + tm/signature.el tm/sc-setup.el tm/gnushook.el \ + tm/*.c tm/methods \ + tm/doc/Makefile tm/doc/*.pln tm/doc/*.ol tm/doc/*.tex \ + tm/doc/*.texi + +TM_MUA_FILES = tm/tm-rmail.el tm/tm-vm.el \ + tm/gnus/Makefile tm/gnus/*-path tm/gnus/mk-tgnus \ + tm/gnus/*.el \ + tm/mh-e/Makefile tm/mh-e/Makefile.bc tm/mh-e/code-jp.ol \ + tm/mh-e/*.el + +MEL_FILES = mel/*.el mel/Makefile* mel/inst* mel/make-lpath + +TL_FILES = tl/README.eng \ + tl/Makefile tl/Makefile.bc tl/loadpath \ + tl/*.el tl/doc/*.texi + +FILES = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES) + +TARFILE = tm6.67.tar lpath-nemacs: diff --git a/Makefile.bc b/Makefile.bc index d146798..4cbc7ac 100644 --- a/Makefile.bc +++ b/Makefile.bc @@ -1,12 +1,14 @@ # -# $Id: Makefile.bc,v 6.5 1995/06/26 08:08:51 morioka Exp $ +# $Id: Makefile.bc,v 6.5 1995/06/26 08:08:51 morioka Exp morioka $ # TM_EL = signature.el \ tiny-mime.el tm-misc.el tm-$(EMACS_TYPE).el \ - tm-view.el tm-rich.el tm-ftp.el tm-latex.el tm-partial.el \ + tm-view.el \ + tm-rich.el richtext.el tinyrich.el \ + tm-ftp.el tm-latex.el tm-partial.el \ tm-rmail.el \ - tm-comp.el # tm-evs.el + tm-comp.el # tm-evs.el TM_ELC = ${TM_EL:el=elc} ALL_EL = $(TM_EL) tm-setup.el mime-setup.el diff --git a/doc/Makefile b/doc/Makefile index a78c712..fee363e 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,10 +1,12 @@ -OLFILES = tiny-mime-jp.ol signature-jp.ol tiny-mime-eng.ol -TEXFILES= tiny-mime-jp.tex signature-jp.tex tiny-mime-eng.tex -DVIFILES= tm-jp.dvi tm-eng.dvi \ - tiny-mime-jp.dvi signature-jp.dvi tiny-mime-eng.dvi -PSFILES = tm-jp.ps \ - tiny-mime-jp.ps signature-jp.ps tiny-mime-eng.ps -GOMI = *.aux *.toc *.log $(DVIFILES) *.ps *~ +# +# $Id: Makefile,v 1.1 1995/07/17 16:41:30 morioka Exp morioka $ +# +OLFILES = tiny-mime-eng.ol +TEXFILES= signature-jp.tex tiny-mime-eng.tex +DVIFILES= tm-eng.dvi signature-jp.dvi tiny-mime-eng.dvi +PSFILES = signature-jp.ps tiny-mime-eng.ps +GOMI = *.aux *.toc *.log *.cp *.fn *.ky *.pg *.tp *.vr \ + $(DVIFILES) *.ps *~ .SUFFIXES: .ol .tex .dvi .ps diff --git a/doc/tm-eword_ja.texi b/doc/tm-eword_ja.texi new file mode 100644 index 0000000..5cf288d --- /dev/null +++ b/doc/tm-eword_ja.texi @@ -0,0 +1,261 @@ +\input texinfo.tex +@c{-*-tiny-mime manual-*-} +@setfilename tm-eword_ja.info +@settitle{tiny-mime manual} + +@titlepage +@sp{5} +@center{@titlefont{tiny-mime}} +@sp{15} +@center{@titlefont{$BZ$7$^$;$s!#$7$+$7$J$,$i!"(BUS-ASCII $B$NHO0O$G$OF0:n$9$k$H;W$o$l(B +$B$^$9!#!J$"$^$j0UL#$,$J$$$+$bCN$l$^$;$s$,!K(B + +@section{NEmacs, NEpoch} + +ISO-2022-JP, US-ASCII $B$N(B encoding/decoding $B$r%5%]!<%H$7$^$9!#(B + +$B$^$?!"(BISO-8859-*$B$G$"$C$F$b!"(Bencoded-text $B$K4^$^$l$kJ8;zNs$,e$G!"(B + +@example + M-x mime/decode-message-header +@end example + +$B$re$G!"(B + +@example + M-x mime/encode-message-header +@end example + +$B$rl9g!"(Btiny-mime.el $B$,(B encode $B$7$J$/$F$b!"(B +mime.el $B$,(B encode $B$9$k$N$G!"(Bmime.el $B$N(B message header encoder $B$,F/$+$J(B +$B$$$h$&$K$K@_Dj$7$^$9!#(B +@end defvr + +@defvr{Variable} mime/use-X-Nsubject + +$B$3$NJQ?t$NCM$,(B t $B$N>l9g!"(Bmessage header $B$r(B encode $B$9$k;~!"(Bencode $B$7$?(B +$B7k2L!"(BSubject $B$K(B encoded-word $B$,4^$^$l$k>l9g!"(BSubject $B$r(B decode $B$7$?$b(B +$B$N$rF~$l$?(B X-Nsubject $B$r:n@.$7$^$9!#(B + +default $B$G$O(B nil $B$,;XDj$5$l$F$$$^$9!#(B + +$B!NCm0U!O(BMule $B$G(B ISO-2022-JP $B$K4^$^$l$k$b$N0J30$NJ8;z=89g$r;H$&>l9g$O!"(B +$B$3$l$r;XDj$7$J$$J}$,8-L@$G$9!#(B +@end defvr + + +@node Customize, Integrate-into-MUA, Variable, Top +@comment node-name, next, previous, up +@section{charset $B$NDI2C!&JQ99(B} +@cindex{charset $B$NDI2C!&JQ99(B} + +Mule $B$G$O!"4X?t(B @code{mime/set-charset-and-encoding} $B$G!"(Bcharset $B$NDI(B +$B2C!&JQ99$,$G$-$^$9!#(B + + +@deffn{Function} mime/set-charset-and-encoding LC CS CHARSET ENCODING + +@table @var +@item LC +charset $B$KBP1~$9$k(B leading-char $B$r;XDj$9$k!#(B + +@item CS +charset $B$KBP1~$9$k(B coding-system $B$r;XDj$9$k!#(B1 octet $BJ8;z=89g$G(B +coding-system $B$r:n$i$J$$>l9g$O!"(Bnil $B$r;XDj$9$k!#(B + +@item CHARSET +MIME $B$N(B charset. + +@item ENCODING +encode $B$9$k:]$N(B encoding. +@end table + +@end deffn + + +@node Integrate-into-MUA, Top, Customize, Top +@comment node-name, next, previous, up +@chapter{MUA $B$X$NAH$_9~$_(B} +@cindex{MUA $B$X$NAH$_9~$_(B} + +$BF|>oE*$K!"L50U<1$K(B MIME header $B$rK\Mh$N8@8l$G8+$?$$$H$$$&$N$OEvA3$N(B +$BM_5a$G$9!#$=$3$G!"(Btiny-mime.el $B$r(B mailer $B$d(B news reader $B$KAH$_9~$`$H<+(B +$BF0E*$K(B MIME header $B$N(B encode/decode $B$,$G$-$^$9!#(B + +$B$3$NL\E*$r +Newsgroups: zxr.comp.emacs.tm-english +Subject: tm6.63.tar.gz +Date: Mon, 26 Jun 1995 17:39:50 JST +Organization: Chamonix, JAIST, Tatsunokuchi, Ishikawa, Japan +Reply-To: tm-eng@@chamonix.jaist.ac.jp +To: tm-eng@@chamonix.jaist.ac.jp +In-Reply-To: Your message of "Sun, 25 Jun 1995 23:20:49 MST" +X-Mua: mh-e 4.1 + tm 6.63 / Mule 2.2 ( ¼ã»ç ) PL02 +X-Mime-Composer: mime.el + tiny-mime 5.12 +X-Ml-Count: 32 + +[1 (text/plain)] + I put tm6.63.tar.gz in ftp.jaist.ac.jp. + + In this version, tm-view uses new MIME encoding/decoding engine +``mel (MIME encoding library''. This library has internal/external +encoding/decoding engine. If data is smaller than a limit, tm-view +uses internal decoder, otherwise external decoder. + +[2 tm6.63.tar.gz ([anon-ftp] ftp.jaist.ac.jp:/pub/GNU/elisp/mime/alpha)] + +[3 (text/plain)] +---- +MORIOKA, Tomohiko +@end example + + +@menu +* content-subject:: +* content-header:: +* content-body:: +* content-separator:: +@end menu + + +@node content-subject, content-header, Preview Buffer, Preview Buffer +@comment node-name, next, previous, up +@section{content-subject} +@cindex{content-subject} + +content-subject ¤Ï content ¤ÎÀèƬ¤Ë¤¢¤Ã¤Æ¡¢¤½¤Î content ¤Ë´Ø¤¹¤ëÂç¤Þ¤« +¤Ê¾ðÊó¤òɽ¼¨¤¹¤ëÉôʬ¤Ç¤¹¡£ + +ɸ½à¤Ç¤Ï + +@example + [1.3 test (text/plain)] +@end example + +¤Î¤è¤¦¤Ê´¶¤¸¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£ + +ºÇ½é¤Î¿ô»ú¤Ï message Ãæ¤Î¤³¤Î content ¤Î°ÌÃÖ¤òÀáÈÖ¹æ¤Î¤è¤¦¤Ëɽ¤·¤¿¤â¤Î +¤Ç¡¢content-number ¤È¸Æ¤Ó¤Þ¤¹¡£ + +£²ÈÖÌܤÎʸ»úÎó¤ÏɽÂê¤òɽ¤·¤Þ¤¹¡£¤³¤Î¾ðÊó¤Ï¡¢ + +@itemize +@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-Type ¤òÍ×ÁǤȤ¹¤ë list. ´Ø¿ô +@code{mime-viewer/default-content-subject-function} ¤Ë¤è¤Ã¤Æ»²¾È¤µ¤ì¤ë¡£ +@end defvr + + +@deffn{Function} mime-viewer/default-content-subject-function cnum cinfo ctype params subj + +ɸ½à¤Î content-subject ɽ¼¨´Ø¿ô¡£ÊÑ¿ô +@code{mime-viewer/content-subject-omitting-Content-Type-list} ¤ò»²¾È¤· +¤Æ¤¤¤ë¡£ +@end deffn + + +@defvar mime-viewer/content-subject-function cnum 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 + + +@node content-header, content-body, content-subject, Preview Buffer +@comment node-name, next, previous, up +@section{content-header} +@cindex{content-header} + +¤¢¤ë content ¤Î 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 cnum cinfo &optional ctype + +content-info @var{cinfo} Ãæ¤Î content-number ¤¬ @var{cnum} ¤Ç¤¢¤ë +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 ¤¬¸«¤Ä¤«¤é¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë¸Æ¤Ó½Ð¤µ¤ì¤ë¡£ +@end deffn + + +@node content-body, content-separator, content-header, Preview Buffer +@comment node-name, next, previous, up +@section{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-type ¤òÍ×ÁǤȤ¹¤ë list. +@end defvar + + +@deffn{Function} mime-viewer/body-visible-p cnum cinfo &optional ctype + +content-number ¤¬ @var{cnum} ¤Ç¤¢¤ë 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 cnum cinfo ctype params subj + +¤¢¤ë content ¤Î content-body ¤òɽ¼¨¤¹¤Ù¤­»þ¡¢ÊÑ¿ô +@code{mime-viewer/content-filter-alist} ¤ÎÃæ¤Ë content-filter ¤¬¸«¤Ä¤« +¤é¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë¸Æ¤Ó½Ð¤µ¤ì¤ë¡£ + +ɸ½à¤Ç¤Ï²¿¤â¤·¤Ê¤¤¡£ +@end deffn + + +@node content-separator, Decoding, content-body, Preview Buffer +@comment node-name, next, previous, up +@section{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 cnum cinfo ctype params subj + +content-number ¤¬ @var{cnum} ¤Ç¤¢¤ë content ¤Î content-separator ¤òɽ +¼¨¤¹¤ë¡£É¸½à¤Ç¤Ï¡¢content-header ¤â content-body ¤âɽ¼¨¤µ¤ì¤Ê¤¤¾ì¹ç¤Î +¤ß¡¢²þ¹Ô¤òɽ¼¨¤¹¤ë¡£ +@end deffn + + +@node Decoding, decoding-condition, Preview Buffer, Top +@comment node-name, next, previous, up +@chapter{Decoding} +@cindex{Decoding} + +@code{mime/viewer-mode} ¤Ç¤Ï user ¤Ï³Æ 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:: ÀßÄêÎã +@end menu + + +@node decoding-condition, Format of method value, Decoding, Decoding +@comment node-name, next, previous, up +@section{content ¤Î decode ¾ò·ï¤ÎÀßÄê} +@cindex{content ¤Î decode ¾ò·ï¤ÎÀßÄê} + +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 ¤ÇÍ­¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£ + +¤³¤¦¤·¤Æ³Æ¾ò·ï¤òÁ°¤«¤é¸«¤Æ¹Ô¤­¡¢ºÇ½é¤ËÍ­¸ú¤Ë¤Ê¤Ã¤¿¾ò·ï¤¬¼Â¹Ô¤µ¤ì¤Þ¤¹¡£ + + +@node Format of method value, Example of decoding-condition, decoding-condition, Decoding +@comment node-name, next, previous, up +@section{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 ¤ÎÃͤ¬»ØÄê¤Ç +¤­¤Þ¤¹¡£ + + +@node Example of decoding-condition, Concept Index, Format of method value, Decoding +@comment node-name, next, previous, up +@section{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 + + +@node Concept Index, Command Index, Decoding, Top +@unnumbered ³µÇ°º÷°ú + +@printindex cp + + +@node Command Index, Variable Index, Concept Index, Top +@unnumbered ´Ø¿ô¡¦¥³¥Þ¥ó¥Éº÷°ú + +@printindex fn + + +@node Variable Index, , Command Index, Top +@unnumbered ÊÑ¿ôº÷°ú + +@printindex vr + +@bye diff --git a/doc/tm_ja.texi b/doc/tm_ja.texi new file mode 100644 index 0000000..639b20e --- /dev/null +++ b/doc/tm_ja.texi @@ -0,0 +1,312 @@ +\input texinfo.tex +@c{-*-tm manual-*-} +@setfilename tm_ja.info +@settitle{tm manual} + +@titlepage +@sp{5} +@center @titlefont{tm} +@sp{15} +@center @titlefont{$BZ$7$^$;$s!#$7$+$7$J$,$i!"(BUS-ASCII $B$NHO0O$G$OF0:n$9$k$H;W$o$l(B +$B$^$9!#(B + +@section{NEmacs, NEpoch} + +ISO-2022-JP, US-ASCII $B$,;H$($^$9!#(B + +@section{original GNU Emacs 19} + +US-ASCII $B$*$h$S(B ISO-8859-1 $B$r%5%]!<%H$7$^$9!#(B + +$B$^$?!"(BX window $B>e$NFHN)$7$?(B window $B$H$7$FF0:n$5$;$k>l9g!"(Btm-rich $B$K$h(B +$B$k(B multi face $BI=<($,9T$J$($^$9!#(B + +@section{Mule} + +ISO-2022-JP, US-ASCII, ISO-8859-1..9, ISO-2022-CN, ISO-2022-KR, EUC-KR +$B$J$I$NB?$/$N(B charset $B$r%5%]!<%H$7$^$9!#$^$?!"4X?t(B +mime/set-charset-and-encoding $B$GDI2C!&JQ99$,$G$-$^$9!#(B + +$B$^$?!"(BMule 2.* $B$r(B X window $B>e$NFHN)$7$?(B window $B$H$7$FF0:n$5$;$k>l9g!"(B +tm-rich $B$K$h$k(B multi face $BI=<($,9T$J$($^$9!#(B + +@section{XEmacs} + +US-ASCII $B$*$h$S(B ISO-8859-1 $B$r%5%]!<%H$7$^$9!#(B + +$B:#$N$H$3$m!"(Btm-rich $B$K$h$k(B multi face $BI=<($O%5%]!<%H$5$l$F$$$^$;$s$,!"(B +$B>-MhE*$K$O!"(Bmulti face $BI=<($H(B inline image $B$NI=<($,%5%]!<%H$5$l$kM=Dj(B +$B$G$9!#(B + + +@node Install, How-to-use, Emacs-Versions, Top +@comment node-name, next, previous, up +@chapter{Install} +@cindex{Install} + +Install $B$O$N;XDj(B} + +Emacs $B$N$r;XDj$7$F2<$5$$!#(B + +@itemize +@item NEMACS = for NEMACS (or NEpoch) +@item MULE1 = for Mule 1.* (based on Emacs 18.*) +@item ORIG19 = for Emacs 19.* (FSF original or XEmacs) +@item MULE2 = for MULE 2.* (based on Emacs 19.*) +@end itemize + +@subsection{load-path $B$N;XDj(B} + +Emacs Lisp program $B$r(B install $B$9$k(B directory $B$r;XDj$7$F2<$5$$!#(B + +@itemize +@item TLDIR18 = for Emacs 18.* (NEMACS, NEpoch or MULE 1) +@item TLDIR19 = for Emacs 19.* (FSF original, XEmacs or MULE 2) +@end itemize + + +@section{$B30It(B method} + +methods/ $B0J2<$K$"$k(B method script $B$r(B sec:method $B@a$r;2>H$7$F!"<+J,$N4D(B +$B6-$K9g$&$h$&$K=q$-49$($F2<$5$$!#(B + + +@section{make} + +`make all' $B$7$F2<$5$$!#(B + + +@section{install} + +`make install' $B$7$F2<$5$$!#(B + + +@section{Emacs Lisp program $B$N(B install} + +NEmacs $B$b$7$/$O(B NEpoch $B$r;H$C$F$$$k>l9g!"(B`make install-nemacs' $B$rl9g!"(B`install-mule1' $B$rl9g!"(B`make +install-orig19' $B$rl9g!"(B`make install-mule2' $B$rl9g$G$b!"(B*.el $B$r(B load-path $B$G;XDj(B +$B$5$l$?(B directory $B$K(B copy $B$9$l$P(B OK $B$G$9!#(B + + +@node Setting, tm-MUA, Install, Top +@comment node-name, next, previous, up +@chapter{$B@_Dj(B} +@cindex{$B@_Dj(B} + +$B$3$N(B package $B$K$O(B mime-setup.el $B$H(B tm-setup.el $B$H$$$&4J0W@_Dj(B file $B$,(B +$BImB0$7$F$$$^$9!#(Bmime-setup.el $B$G$O(B encoding $B$b4^$a$?(B MIME $BA4HL$N@_Dj$r(B +$B9T$J$$!"(Btm-setup $B$G$O(B tm-MUA $B$K4X$9$k@_Dj$N$_$r9T$J$$$^$9!#(B + +@section{mime-setup} + +@example +(load "mime-setup") +@end example +$B$H$9$k$H(B MIME $B$K4X$9$k3Fl9g!"(Btm-setup $B$r(B load $B$9$kI,MW$O$"$j(B +$B$^$;$s!#(B + +mime-setup $B$G$O(B signature $B$N<+F0@ZBX$((B tool $B$bImB0$7$F$$$^$9!#(B +message header $B$N(B field $B$K9g$o$;$F(B signature $B$N<+F0@ZBX$r9T$J$$$?$$>l(B +$B9g$O(B .emacs $B$K0J2<$N$h$&$J$b$N$rF~$l$F2<$5$$!#!J>\$7$/$O(B signature.el +$B$N@bL@=q$r;2>H$7$F2<$5$$!K(B + +@example +(setq signature-file-alist + '((("Newsgroups" . "jokes") . "~/.signature-jokes") + (("Newsgroups" . ("zxr" "nzr")) . "~/.signature-sun") + (("To" . ("ishimaru" "z-suzuki")) . "~/.signature-sun") + (("To" . "tea") . "~/.signature-jokes") + (("To" . ("sim" "oku" "takuo")) . "~/.signature-formal") + )) +@end example + +mime-setup $B$r;H$&>l9g$O!"(Bmime.el $B$,I,MW$G$9!#$^$?!"(BSuperCite $B$r;H$&>l(B +$B9g$O!"(BSuperCite $B$bI,MW$G$9!#(B + + +@section{tm-setup} + +tm-setup $B$O(B tm-MUA $B$N@_Dj$N$_$r9T$J$&(B module $B$G$9!#(Bmime-setup $B$r(B load +$B$7$F$$$k>l9g!"$3$l$rM[$K(B load $B$9$kI,MW$O$"$j$^$;$s$,!"(Bmime-setup $B$r;H(B +$B$$$?$/$J$$>l9g!"0J2<$N$h$&$K$3$l$r(B load $B$7$F2<$5$$!#(B + +@example +(load "tm-setup") +@end example + + +@section{vm} + +vm $B$r;H$&>l9g$O(B .vm $B$+(B .emacs $B$K(B +@example +(load "tm-vm") +@end example +$B$rF~$l$F2<$5$$!#(B + + +@section{$B@_Dj(B file $B$r;H$o$J$$>l9g(B} + +tm-setup.el $B$r;29M$K$7$F2<$5$$!#(B + + +@node tm-MUA, Concept Index, Setting, Top +@comment node-name, next, previous, up +@chapter{tm-MUA} +@cindex{tm-MUA} + +``tm-MUA'' $B$H$$$&$N$O!"(Bmh-e, GNUS, RMAIL $B$J$I$N(B MUA $B$N$?$a$N(B MIME $B5!G=(B +$B6/2=(B module $B$NAm>N$G$9!#(B + +$B8=:_!"(Btm-MUA $B$K$O!"(B +@itemize +@item @strong{tm-mh-e:} mh-e $BMQ$N(B tm-MUA +@item @strong{tm-gnus:} GNUS $BMQ$N(B tm-MUA +@item @strong{tm-rmail:} RMAIL $BMQ$N(B tm-MUA +@item @strong{tm-vm:} VM $BMQ$N(B tm-MUA +@end itemize +$B$,$"$j$^$9!#$3$N>O$G$O$3$l$i$N(B module $B$K4X$7$F@bL@$7$^$9!#(B + +@section{Summary mode} + +tm-MUA $B$r;H$&$H!"85$N(B MUA $B$N(B Summary mode $B$KBP$7$F0J2<$N5!G=$,DI2C$5$l(B +$B$^$9!#(B + +@table @kbd +@item @key{M-t} + RFC 1522 MIME encoded-word $B$N(B decode $B$K4X$9$k(B toggle +@item @key{v} + @code{mime/viewer-mode} $B$KF~$j!"(Bmessage $B$r1\Mw$9$k(B +@end table + +$BC"$7!"(Btm-vm $B$G$O(B @key{v} $B$G$O$J$/(B @key{Z} $B$G(B @code{mime/viewer-mode} +$B$KF~$j$^$9!#$^$?!"(Btm-mh-e $B$H(B tm-gnus for (ding) GNUS $B$G$OI8=`$G$O>o$K(B +@code{mime/viewer-mode} $B$N(B preview buffer $B$,I=<($5$l$^$9!#(B + +@menu +* tm-mh-e: (tm-mh-e_ja.info). +* tm-gnus: (tm-gnus_ja.info). +* tm-rmail: (tm-rmail_ja.info). +* tm-vm: (tm-vm_ja.info). +* tm-cmail: (tm-cmail_ja.info). +* mime/viewer-mode: (tm-view_ja.info)how-to-use. +@end menu + + +@node Concept Index, Command Index, tm-MUA, Top +@unnumbered $B35G0:w0z(B + +@printindex cp + + +@node Command Index, Variable Index, Concept Index, Top +@unnumbered $B4X?t!&%3%^%s%I:w0z(B + +@printindex fn + + +@node Variable Index, Top, Command Index, Top +@unnumbered $BJQ?t:w0z(B + +@printindex vr + +@bye diff --git a/gnus/Makefile b/gnus/Makefile index 7446373..c6371a2 100644 --- a/gnus/Makefile +++ b/gnus/Makefile @@ -11,9 +11,9 @@ EMACS = mule2 # 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 +# TMDIR19 = /usr/local/lib/mule/site-lisp TMDIR18 = $(HOME)/lib/emacs18/lisp -# TMDIR19 = $(HOME)/lib/emacs19/lisp +TMDIR19 = $(HOME)/lib/emacs19/lisp FILES = tm/gnus/*.el diff --git a/gnus/tm-dgnus.el b/gnus/tm-dgnus.el index defa71e..aa79f1f 100644 --- a/gnus/tm-dgnus.el +++ b/gnus/tm-dgnus.el @@ -2,10 +2,15 @@ ;;; tm-dgnus.el --- tm-gnus module for (ding) GNUS ;;; +(require 'tl-str) +(require 'tl-list) +(require 'gnus) + + ;;; @ version ;;; (defconst tm-gnus/RCS-ID - "$Id: tm-dgnus.el,v 6.5 1995/06/22 05:34:56 morioka Exp $") + "$Id: tm-dgnus.el,v 6.9 1995/07/03 07:50:58 morioka Exp $") (defconst tm-gnus/version (concat (get-version-string tm-gnus/RCS-ID) " (ding)")) @@ -40,6 +45,11 @@ (gnus-summary-select-article t t) ) (pop-to-buffer gnus-article-buffer t) + (let (buffer-read-only) + (if (text-property-any (point-min) (point-max) 'invisible t) + (remove-text-properties (point-min) (point-max) + gnus-hidden-properties) + )) (mime/viewer-mode) ) @@ -54,6 +64,24 @@ "\e\r" (function tm-gnus/summary-scroll-down)) (define-key gnus-summary-mode-map "\et" (function tm-gnus/toggle-mime)) +(defmacro gnus-get-article-buffer () + (` (cdr (assq 'article gnus-window-to-buffer)))) + +;; Set article window start at LINE, where LINE is the number of lines +;; from the head of the article. +(defun gnus-article-set-window-start (&optional line) + (let ((article-buffer (gnus-get-article-buffer))) + (set-window-start + (get-buffer-window article-buffer) + (save-excursion + (set-buffer article-buffer) + (goto-char (point-min)) + (if (not line) + (point-min) + (gnus-message 6 "Moved to bookmark") + (search-forward "\n\n" nil t) + (forward-line line) + (point)))))) (defun gnus-summary-next-page (lines) "Show next page of selected article. @@ -68,31 +96,15 @@ Argument LINES specifies lines to be scrolled up." (gnus-summary-display-article article) (gnus-configure-windows 'article) (pop-to-buffer gnus-summary-buffer) - (gnus-eval-in-buffer-window (cdr (assq 'article gnus-window-to-buffer)) - (setq endp (gnus-article-next-page lines))) + (gnus-eval-in-buffer-window + (gnus-get-article-buffer) + (setq endp (gnus-article-next-page lines))) (cond ((and endp lines) (message "End of message")) ((and endp (null lines)) (gnus-summary-next-unread-article))) ))) -(defun gnus-summary-scroll-up (lines) - "Scroll up (or down) one line current article. -Argument LINES specifies lines to be scrolled up (or down if negative)." - (interactive "p") - (gnus-set-global-variables) - (gnus-configure-windows 'article) - (or (gnus-summary-select-article nil nil 'pseudo) - (gnus-eval-in-buffer-window - (cdr (assq 'article gnus-window-to-buffer)) - (cond ((> lines 0) - (if (gnus-article-next-page lines) - (gnus-message 3 "End of message"))) - ((< lines 0) - (gnus-article-prev-page (- lines)))))) - (gnus-summary-recenter) - (gnus-summary-position-cursor)) - (defun gnus-summary-prev-page (lines) "Show previous page of selected article. Argument LINES specifies lines to be scrolled down." @@ -108,10 +120,27 @@ Argument LINES specifies lines to be scrolled down." (gnus-summary-display-article article) (gnus-summary-recenter) (gnus-eval-in-buffer-window - (cdr (assq 'article gnus-window-to-buffer)) + (gnus-get-article-buffer) (gnus-article-prev-page lines)))) (gnus-summary-position-cursor)) +(defun gnus-summary-scroll-up (lines) + "Scroll up (or down) one line current article. +Argument LINES specifies lines to be scrolled up (or down if negative)." + (interactive "p") + (gnus-set-global-variables) + (gnus-configure-windows 'article) + (or (gnus-summary-select-article nil nil 'pseudo) + (gnus-eval-in-buffer-window + (gnus-get-article-buffer) + (cond ((> lines 0) + (if (gnus-article-next-page lines) + (gnus-message 3 "End of message"))) + ((< lines 0) + (gnus-article-prev-page (- lines)))))) + (gnus-summary-recenter) + (gnus-summary-position-cursor)) + (defun gnus-summary-toggle-header (arg) "Show the headers if they are hidden, or hide them if they are shown. If ARG is a positive number, show the entire header. @@ -119,7 +148,7 @@ If ARG is a negative number, hide the unwanted header lines." (interactive "P") (gnus-set-global-variables) (save-excursion - (set-buffer (cdr (assq 'article gnus-window-to-buffer))) + (set-buffer (gnus-get-article-buffer)) (let ((buffer-read-only nil)) (if (numberp arg) (if (> arg 0) (remove-text-properties (point-min) (point-max) @@ -141,23 +170,6 @@ If ARG is a negative number, hide the unwanted header lines." (set-window-point (get-buffer-window (current-buffer)) (point-min))))) -;; Set article window start at LINE, where LINE is the number of lines -;; from the head of the article. -(defun gnus-article-set-window-start (&optional line) - (let ((article-buffer (cdr (assq 'article gnus-window-to-buffer)))) - (set-window-start - (get-buffer-window article-buffer) - (save-excursion - (set-buffer article-buffer) - (goto-char (point-min)) - (if (not line) - (point-min) - (gnus-message 6 "Moved to bookmark") - (search-forward "\n\n" nil t) - (forward-line line) - (point)))))) - - ;;; @ summary filter ;;; diff --git a/methods/tmdecode b/methods/tmdecode index b09d8ae..9fbb0a9 100755 --- a/methods/tmdecode +++ b/methods/tmdecode @@ -14,6 +14,7 @@ case "quoted-printable": mmencode -q -u $2 > $3 breaksw case "x-uue": +case "x-uuencode": pushd $TM_TMP_DIR uudecode $2 popd diff --git a/mh-e/tm-mh-e.el b/mh-e/tm-mh-e.el index 87d73cc..53656c0 100644 --- a/mh-e/tm-mh-e.el +++ b/mh-e/tm-mh-e.el @@ -21,7 +21,7 @@ ;;; @ version ;;; (defconst tm-mh-e/RCS-ID - "$Id: tm-mh-e.el,v 6.21 1995/06/22 12:02:13 morioka Exp $") + "$Id: tm-mh-e.el,v 6.23 1995/07/17 16:37:20 morioka Exp $") (defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID)) @@ -166,7 +166,7 @@ With arg, turn MIME processing on if arg is positive." (save-window-excursion (switch-to-buffer (concat "show-" mh-sent-from-folder)) mime::article/preview-buffer)) - (if (looking-at "^\\[.+\\]\n") + (if (looking-at "^\\[.+\\(\n[ \t].+\\)*\\]\n") (replace-match "")) (narrow-to-region (point)(point-max)) (mh-insert-prefix-string mh-ins-buf-prefix) @@ -305,12 +305,18 @@ With arg, turn MIME processing on if arg is positive." (defun tm-mh-e/summary-before-quit () (let ((buf (get-buffer mh-show-buffer))) (if buf - (save-window-excursion + (let ((the-buf (current-buffer))) (switch-to-buffer buf) - (if mime::article/preview-buffer - (if (setq buf (get-buffer mime::article/preview-buffer)) - (kill-buffer buf) - )))))) + (if (and mime::article/preview-buffer + (setq buf (get-buffer mime::article/preview-buffer)) + ) + (progn + (switch-to-buffer the-buf) + (kill-buffer buf) + ) + (switch-to-buffer the-buf) + ) + )))) (add-hook 'mh-before-quit-hook (function tm-mh-e/summary-before-quit)) diff --git a/ol2.c b/ol2.c index 20db10b..3190414 100644 --- a/ol2.c +++ b/ol2.c @@ -1,5 +1,5 @@ /* - * This program `out2' is a converter + * This program `ol2' is a converter * from a text for outline-mode of GNU Emacs to normal text. * This is a filter. So, input is `stdin', output is `stdout'. * diff --git a/richtext.el b/richtext.el new file mode 100644 index 0000000..4b0b35c --- /dev/null +++ b/richtext.el @@ -0,0 +1,121 @@ +;;; +;;; richtext.el -- read and save files in text/richtext format +;;; +;;; $Id: richtext.el,v 1.4 1995/07/15 17:58:36 morioka Exp $ +;;; + +(require 'tl-misc) + +(if (or (< emacs-major-version 19) + (and (= emacs-major-version 19) + (< emacs-minor-version 29)) + ) + (require 'tinyrich) + (require 'enriched) + ) + + +;;; @ text/richtext <-> text/enriched converter +;;; + +(defun richtext-to-enriched-region (beg end) + "Convert the region of text/richtext style to text/enriched style." + (save-excursion + (save-restriction + (narrow-to-region beg end) + (goto-char (point-min)) + (let (b e i) + (while (re-search-forward "[ \t]*" nil t) + (setq b (match-beginning 0)) + (delete-region b + (if (re-search-forward "[ \t]*" nil t) + (match-end 0) + (point-max) + )) + ) + (goto-char (point-min)) + (while (re-search-forward "\n\n+" nil t) + (replace-match "\n") + ) + (goto-char (point-min)) + (while (re-search-forward "[ \t\n]*[ \t\n]*" nil t) + (setq b (match-beginning 0)) + (setq e (match-end 0)) + (setq i 1) + (while (looking-at "[ \t\n]*[ \t\n]*") + (setq e (match-end 0)) + (setq i (1+ i)) + (goto-char e) + ) + (delete-region b e) + (while (>= i 0) + (insert "\n") + (setq i (1- i)) + )) + (goto-char (point-min)) + (while (search-forward "" nil t) + (replace-match "<<") + ) + )))) + +(defun enriched-to-richtext-region (beg end) + "Convert the region of text/enriched style to text/richtext style." + (save-excursion + (save-restriction + (goto-char beg) + (and (search-forward "text/enriched") + (replace-match "text/richtext")) + (search-forward "\n\n") + (narrow-to-region (match-end 0) end) + (let (str n) + (goto-char (point-min)) + (while (re-search-forward "\n\n+" nil t) + (setq str (buffer-substring (match-beginning 0) + (match-end 0))) + (setq n (1- (length str))) + (setq str "") + (while (> n 0) + (setq str (concat str "\n")) + (setq n (1- n)) + ) + (replace-match str) + ) + (goto-char (point-min)) + (while (search-forward "<<" nil t) + (replace-match "") + ) + )))) + + +;;; @ encoder and decoder +;;; + +(defun richtext-decode (beg end) + (save-restriction + (narrow-to-region beg end) + (richtext-to-enriched-region beg (point-max)) + (enriched-decode beg (point-max)) + )) + +(defun richtext-encode (beg end) + (save-restriction + (narrow-to-region beg end) + (enriched-encode beg (point-max)) + (enriched-to-richtext-region beg (point-max)) + )) + + +;;; @ setup +;;; + +(set-alist 'format-alist + 'text/richtext + '("Extended MIME text/richtext format." + "Content-[Tt]ype:[ \t]*text/richtext" + richtext-decode richtext-encode t enriched-mode)) + + +;;; @ end +;;; + +(provide 'richtext) diff --git a/tiny-mime.el b/tiny-mime.el index 0f87421..0c47945 100644 --- a/tiny-mime.el +++ b/tiny-mime.el @@ -19,7 +19,7 @@ ;;; @ version ;;; (defconst mime/RCS-ID - "$Id: tiny-mime.el,v 5.12 1995/05/21 16:06:27 morioka Exp $") + "$Id: tiny-mime.el,v 5.15 1995/07/17 05:26:06 morioka Exp $") (defconst mime/tiny-mime-version (get-version-string mime/RCS-ID)) @@ -795,22 +795,25 @@ (defun mime/unfolding () (goto-char (point-min)) (let (field beg end) - (while (re-search-forward message/field-regexp nil t) + (while (re-search-forward message/field-name-regexp nil t) (setq beg (match-beginning 0)) - (setq end (match-end 0)) + (setq end (progn + (if (re-search-forward "\n[!-9;-~]+:" nil t) + (goto-char (match-beginning 0)) + (end-of-line) + ) + (point) + )) (setq field (buffer-substring beg end)) (if (string-match mime/encoded-word-regexp field) - (progn - (save-excursion - (save-restriction - (narrow-to-region (goto-char beg) end) - (while (re-search-forward "\n[ \t]+" nil t) - (replace-match " ") - ) - )) + (save-restriction + (narrow-to-region (goto-char beg) end) + (while (re-search-forward "\n[ \t]+" nil t) + (replace-match " ") + ) + (goto-char (point-max)) )) - )) - ) + ))) (defun mime/prepare-decode-message-header () (mime/unfolding) diff --git a/tinyrich.el b/tinyrich.el new file mode 100644 index 0000000..2253d64 --- /dev/null +++ b/tinyrich.el @@ -0,0 +1,93 @@ +;;; +;;; $Id: tinyrich.el,v 1.1 1995/07/05 16:21:36 morioka Exp $ +;;; +;;; by MORIOKA Tomohiko +;;; modified by YAMATE Keiichirou +;;; + +(defvar mime/text/enriched-face-list + '("bold" "italic" "fixed" "underline")) + +(cond ((and (>= emacs-major-version 19) window-system) + (defun mime/set-face-region (b e face) + (let ((sym (intern face))) + (if (member sym (face-list)) + (let ((overlay (make-overlay b e))) + (overlay-put overlay 'face 'bold) + )))) + ) + ((and (boundp 'NEMACS) NEMACS) + (setq mime/available-face-list + '("bold" "italic" "underline")) + (setq mime/available-face-attribute-alist + '(("bold" . inversed-region) + ("italic" . underlined-region) + ("underline" . underlined-region) + )) + (defun mime/set-face-region (beg end sym) + (attribute-add-narrow-attribute + (cdr (assoc sym mime/available-face-attribute-alist)) + beg end)) + ) + (t + (setq mime/text/richtext-face-list nil) + (defun mime/set-face-region (beg end sym) + ) + )) + +(defun enriched-decode (beg end) + (interactive "*r") + (save-excursion + (save-restriction + (narrow-to-region beg end) + (goto-char beg) + (while (re-search-forward "[ \t]*\\(\n+\\)[ \t]*" nil t) + (let ((str (buffer-substring (match-beginning 1) + (match-end 1)))) + (if (string= str "\n") + (replace-match " ") + (replace-match (substring str 1)) + ))) + (goto-char beg) + (let (cmd str (fb (point)) fe b e) + (while (re-search-forward "<\\(<\\|[^<>\n\r \t]+>\\)" nil t) + (setq b (match-beginning 0)) + (setq cmd (buffer-substring b (match-end 0))) + (if (string= cmd "<<") + (replace-match "<") + (replace-match "") + (setq cmd (downcase (substring cmd 1 (- (length cmd) 1)))) + ) + (cond ((string= cmd "param") + (setq b (point)) + (save-excursion + (save-restriction + (if (search-forward "" nil t) + (progn + (replace-match "") + (setq e (point)) + ) + (setq e end) + ))) + (delete-region b e) + ) + ((member cmd mime/text/enriched-face-list) + (setq b (point)) + (save-excursion + (save-restriction + (if (re-search-forward (concat "") nil t) + (progn + (replace-match "") + (setq e (point)) + ) + (setq e end) + ))) + (mime/set-face-region b e cmd) + ))) + (goto-char (point-max)) + (if (not (eq (preceding-char) ?\n)) + (insert "\n") + ) + )))) + +(provide 'tinyrich) diff --git a/tm-rich.el b/tm-rich.el index ac1121e..d2295cd 100644 --- a/tm-rich.el +++ b/tm-rich.el @@ -1,92 +1,16 @@ ;;; -;;; $Id: tm-rich.el,v 6.2 1995/06/24 05:04:05 morioka Exp $ +;;; $Id: tm-rich.el,v 6.7 1995/07/15 16:45:29 morioka Exp $ ;;; -;;; by MORIOKA Tomohiko -;;; modified by YAMATE Keiichirou +;;; by MORIOKA Tomohiko ;;; (require 'tm-view) +(require 'richtext) -(defvar mime/text/richtext-face-list - '("bold" "italic" "fixed" "underline")) -(defvar mime/text/enriched-face-list - '("bold" "italic" "fixed" "underline")) - - -(cond ((and (>= emacs-major-version 19) window-system) - (defun mime/set-face-region (b e face) - (let ((sym (intern face))) - (if (member sym (face-list)) - (let ((overlay (make-overlay b e))) - (overlay-put overlay 'face 'bold) - )))) - ) - ((and (boundp 'NEMACS) NEMACS) - (setq mime/available-face-list - '("bold" "italic" "underline")) - (setq mime/available-face-attribute-alist - '(("bold" . inversed-region) - ("italic" . underlined-region) - ("underline" . underlined-region) - )) - (defun mime/set-face-region (beg end sym) - (attribute-add-narrow-attribute - (cdr (assoc sym mime/available-face-attribute-alist)) - beg end)) - ) - (t - (setq mime/text/richtext-face-list nil) - (defun mime/set-face-region (beg end sym) - ) - )) - - -;;; @ text/richtext +;;; @ content filters for tm-view ;;; -(defun mime/decode-text/richtext-region (beg end) - (interactive "*r") - (save-excursion - (save-restriction - (narrow-to-region beg end) - (while (search-forward "\n" nil t) - (replace-match "") - ) - (goto-char beg) - (let (cmd str (fb (point)) fe b e) - (while (re-search-forward "<[^<>\n\r \t]+>" nil t) - (setq b (match-beginning 0)) - (setq cmd (buffer-substring (+ b 1) - (- (match-end 0) 1))) - (replace-match "") - (cond ((string= cmd "nl") - (if (= fb b) - (insert "\n") - (fill-region fb b t) - ) - (setq fb (point)) - ) - ((member (downcase cmd) mime/text/richtext-face-list) - (setq b (point)) - (save-excursion - (save-restriction - (if (re-search-forward (concat "") nil t) - (progn - (replace-match "") - (setq e (point)) - ) - (setq e end) - ))) - (mime/set-face-region b e cmd) - ))) - (fill-region fb (point-max) t) - (goto-char (point-max)) - (if (not (eq (preceding-char) ?\n)) - (insert "\n") - ) - )))) - (defun mime-viewer/filter-text/richtext (ctype params encoding) (let* ((mode mime::preview/original-major-mode) (m (assq mode mime-viewer/code-converter-alist)) @@ -98,67 +22,10 @@ (mime-viewer/default-code-convert-region beg (point-max) charset encoding) ) - (mime/decode-text/richtext-region beg (point-max)) + (richtext-to-enriched-region beg (point-max)) + (enriched-decode beg (point-max)) )) - -;;; @ text/enriched -;;; - -(defun mime/decode-text/enriched-region (beg end) - (interactive "*r") - (save-excursion - (save-restriction - (narrow-to-region beg end) - (while (re-search-forward "[\n]+" nil t) - (let ((str (buffer-substring (match-beginning 0) - (match-end 0)))) - (if (string= str "\n") - (replace-match " ") - (replace-match (substring str 1)) - ))) - (goto-char beg) - (let (cmd str (fb (point)) fe b e) - (while (re-search-forward "<\\(<\\|[^<>\n\r \t]+>\\)" nil t) - (setq b (match-beginning 0)) - (setq cmd (buffer-substring b (match-end 0))) - (if (string= cmd "<<") - (replace-match "<") - (replace-match "") - (setq cmd (downcase (substring cmd 1 (- (length cmd) 1)))) - ) - (cond ((string= cmd "param") - (setq b (point)) - (save-excursion - (save-restriction - (if (search-forward "" nil t) - (progn - (replace-match "") - (setq e (point)) - ) - (setq e end) - ))) - (delete-region b e) - ) - ((member cmd mime/text/enriched-face-list) - (setq b (point)) - (save-excursion - (save-restriction - (if (re-search-forward (concat "") nil t) - (progn - (replace-match "") - (setq e (point)) - ) - (setq e end) - ))) - (mime/set-face-region b e cmd) - ))) - (goto-char (point-max)) - (if (not (eq (preceding-char) ?\n)) - (insert "\n") - ) - )))) - (defun mime-viewer/filter-text/enriched (ctype params encoding) (let* ((mode mime::preview/original-major-mode) (m (assq mode mime-viewer/code-converter-alist)) @@ -170,7 +37,7 @@ (mime/code-convert-region-to-emacs beg (point-max) charset encoding) ) - (mime/decode-text/enriched-region beg (point-max)) + (enriched-decode beg (point-max)) )) @@ -186,4 +53,4 @@ (run-hooks 'tm-rich-load-hook) -(provide 'tm-rich) +(provide 'richtext) diff --git a/tm-rmail.el b/tm-rmail.el index e771e0a..45c4718 100644 --- a/tm-rmail.el +++ b/tm-rmail.el @@ -1,5 +1,5 @@ ;;; -;;; $Id: tm-rmail.el,v 6.5 1995/06/26 06:58:11 morioka Exp $ +;;; $Id: tm-rmail.el,v 6.6 1995/06/26 22:52:13 morioka Exp $ ;;; (require 'tl-header) @@ -7,6 +7,7 @@ (require 'tl-misc) (autoload 'mime/viewer-mode "tm-view" "View MIME message." t) +(autoload 'mime/Content-Type "tm-view" "parse Content-Type field.") (autoload 'mime/decode-message-header "tiny-mime" "Decode MIME header." t) (defun tm-rmail/show-all-header-p () @@ -23,7 +24,7 @@ (let ((ret (rmail-widen-to-current-msgbeg (function (lambda () - (cons (mime/Content-Type (mail-fetch-field "Content-Type")) + (cons (mime/Content-Type) (mail-fetch-field "Content-Transfer-Encoding")) ))))) (mime/viewer-mode nil (car ret)(cdr ret)) diff --git a/tm-view.el b/tm-view.el index ea5b3a8..59a78ac 100644 --- a/tm-view.el +++ b/tm-view.el @@ -21,7 +21,7 @@ ;;; (defconst mime-viewer/RCS-ID - "$Id: tm-view.el,v 6.63 1995/06/25 21:33:51 morioka Exp $") + "$Id: tm-view.el,v 6.67 1995/07/03 07:41:02 morioka Exp $") (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID)) (defconst mime/viewer-version mime-viewer/version) @@ -554,6 +554,9 @@ it is regarded as current-buffer. [tm-view]" (re-search-forward "^$" nil t) (+ (match-end 0) 1) )) + (if (> he (point-max)) + (setq he (point-max)) + ) (switch-to-buffer obuf) (setq nb (point)) (narrow-to-region nb nb) @@ -862,7 +865,7 @@ it is regarded as current-buffer. [tm-view]" (defun mime-viewer/default-code-convert-region (beg end charset &optional encoding) - (if (member charset '("quoted-printable" "base64")) + (if (member encoding '("quoted-printable" "base64")) (mime/code-convert-region-to-emacs beg (point-max) charset) )) @@ -885,6 +888,10 @@ it is regarded as current-buffer. [tm-view]" (mime-viewer/default-code-convert-region beg (point-max) charset encoding) ))) + (goto-char (point-max)) + (if (not (eq (char-after (1- (point))) ?\n)) + (insert "\n") + ) ;;(hide-sublevels 1) (run-hooks 'mime-viewer/plain-text-preview-hook) ) -- 1.7.10.4