From: morioka Date: Mon, 9 Mar 1998 19:40:35 +0000 (+0000) Subject: tm 7.73. X-Git-Tag: tm7_73~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3f524f440605e1ed3ccdfba05579755b23815d5;p=elisp%2Ftm.git tm 7.73. --- diff --git a/ChangeLog b/ChangeLog index 3002bf2..7c093c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,80 @@ +Wed Jul 24 10:08:38 1996 MORIOKA Tomohiko + + * tl: Version 7.43.1 was released. + * tm: Version 7.73 was released. + * tm/gnus: Version 7.79 was released. + * tm/mh-e: Version 7.65 was released. + +Mon Jul 22 19:29:42 1996 MORIOKA Tomohiko + + * tm-edit.el: Variable `mime/editor-mode-old-selective-display' + was abolished. + + (mime/editor-mode): DOC-string was modified; Use macro + `enable-invisible'. + + (mime-editor/exit): Use macro `end-of-invisible'. + +Mon Jul 22 18:29:22 1996 MORIOKA Tomohiko + + * inst-tm (install-el-and-elc-files): code to make directory if it + is not exist was moved to function `install-el-files'. + +Thu Jul 18 12:46:20 1996 MORIOKA Tomohiko + + * tm-text.el (mime-preview/decode-text-buffer): local variable + `beg' was abolished. + +Thu Jul 18 12:42:40 1996 MORIOKA Tomohiko + + * tm-text.el (mime-preview/decode-text-buffer): fixed for new spec + of code-converter. + + * tm-pgp.el (mime-article/view-application/pgp): set function + `mime-charset/decode-buffer' as code-converter for decryption. + + * tm-text.el (mime-viewer/code-converter-alist): spec of + converters were changed; they work for buffer instead of region. + + (mime-charset/decode-buffer): New function; renamed from + `mime-charset-decode-region'. + + (mime-charset/maybe-decode-buffer): New function; renamed from + `mime-viewer/default-code-convert-region'. + +Thu Jul 18 06:50:09 1996 MORIOKA Tomohiko + + * tm-text.el (mime-preview/decode-text-buffer): New function; + renamed from function `mime-preview/decode-text-region'. + + (mime-preview/filter-for-text/plain, + mime-preview/filter-for-text/richtext, + mime-preview/filter-for-text/enriched): Use function + `mime-preview/decode-text-buffer' instead of + `mime-preview/decode-text-region'. + +Thu Jul 18 06:24:23 1996 MORIOKA Tomohiko + + * tm-text.el (mime-viewer/default-code-convert-region): New + implementation. + +Thu Jul 18 06:21:31 1996 MORIOKA Tomohiko + + * tm-text.el (mime-preview/filter-for-text/enriched): Use function + `mime-preview/decode-text-region'. + + * tm-text.el (mime-preview/filter-for-text/richtext): Use function + `mime-preview/decode-text-region'. + +Thu Jul 18 06:06:25 1996 MORIOKA Tomohiko + + * tm-text.el (mime-charset-decode-region): New function; moved + from tm-def.el. + + * tm-def.el: Function `mime-charset-decode-region' was moved to + tm-text.el. + + Wed Jul 17 05:36:50 1996 MORIOKA Tomohiko * tl: Version 7.43 was released. diff --git a/Makefile b/Makefile index c4e6159..16cc42e 100644 --- a/Makefile +++ b/Makefile @@ -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.72.tar.gz +TARFILE = tm7.73.tar.gz elc: $(EMACS) $(FLAGS) -l inst-tm -f compile-tm diff --git a/doc/tm-charset_ja.ol b/doc/tm-charset_ja.ol new file mode 100644 index 0000000..4b04faa --- /dev/null +++ b/doc/tm-charset_ja.ol @@ -0,0 +1,187 @@ +$B!X(Btm $B$K$*$1$kJ8;z(B code $B$N$K@8$N!JB($A!"(Bcode $BJQ49$5$l$F$*$i(B +$B$:(B network code $B$N$^$^$N!K(Bmessage $B$,F~$C$?(B buffer (original article +buffer, raw buffer) $B$rMQ$$$k$3$H$H$9$k!#$3$N>r7o$,K~$?$5$l$l$P!"(Bbase64 +$B$d(B quoted-printable $BEy$N(B encode $B$r9T$J$C$F$$$J$$>l9g$G$b!"#1$D$N(B +message $B$KJ#?t$NJ8;z(B code $B$r:.:_$5$;$k$3$H$,$G$-$k!#(B + + $B$7$+$7$J$,$i!"8=e5-$N$h$&$JJ}K!$r$H$k$3$H$,:$Fq$J(B MUA $B$r(B +$BMxMQ$9$k>l9g$G$"$k!#Hs(B MIME message $B$KBP$7$F$O!"(Btm $B$O(B default $B$N(B +charset $B$r2>Dj$9$k$3$H$GBP=h$7$F$$$k!#8el(B +$B9g!"(B7bit, 8bit, binary $B$N$h$&$J(B encode $B$5$l$F$$$J$$(B message $B$N(B charset +$B$K$h$k(B code $BJQ49$r$d$a$k$h$&$K$9$k$3$H$GBP=h$7$F$$$k!#(B + + $B0J22A7A<0$NDj?t$GI=8=$5$l$k(B coding-system $B$H$$$&35G0$,F3F~$5$l$?!#(B + + XEmacs $B$K(B mule $B5!G=$rF3F~$7$h$&$H$7$??MC#$O<+8JI>2A7A<0$NDj?t$NBe$o(B +$B$j$K(B coding-system $B$rI=$9?7$?$J7?$rF3F~$9$k$3$H$K$7$?!#$^$?!"$3$N7?$K(B +$BBP1~$9$kL>A0$r(B symbol $B$GM?$($?!#$3$N$?$a!"(Bcoding-system $B$rI=$9BgNL$NDj(B +$B?t$O0lA]$5$l$?!#(B + + $B$3$N$h$&$K!"8=B8$9$k(B emacs variants $B$N4V$G$OJ8;z(B code $B$NI=8=K!$O$5$^(B +$B$6$^$G$"$k!#$b$H$b$H!"(Bemu $B$O$3$NJ,Ln$G$b$C$H$b5!G=$N9b$$(B MULE $B$r$*(B +$B$$!"(Bcoding-system $B5!G=$r$=$N$^$^;H$&$N$OF@:v$G$O$J$$$HH=CG$9$k$K;j$C$?!#(B +$BBe$o$j$K$h$jCj>]EY$N9b$$(B MIME charset $B$K4X$9$k(B API $B$rMQ0U$9$k$3$H$K$7(B +$B$?!#(B + + MIME charset $B$OJ8;z(B code $B$rI=$9$b$N$G$"$j!"(BMULE $B$G$$$&$H$3$m$N(B +leading-char $B$d(B EMACS/MULE $B$d(B XEmacs/mule $B$G$$$&$H$3$m$N(B charset $B$KAj(B +$BEv$9$k$b$N$G$O$J$/!"(Bmule $B$N(B coding-system $B$KAjEv$9$k5!G=$G$"$k!#A0$H(B MIME charset $B$NL>A0$O6&DL$9$k$b$N$b>/$J(B +$B$/$J$$!#(B + + MIME charset $B$NI=8=$N;EJ}$H$7$F!"(Bemu API $B$G$O(B XEmacs/mule $B$HF1MM!"(B +symbol $B$rMQ$$$k$3$H$K$7$?!#(BMULE $B$N$h$&$JJQ?t$r;H$&$HB+G{$K4X$9$k(B check +$B$,I,MW$G$"$k$,!"(Bsymbol $B$G$O$3$N$h$&$J(B check $B$OITMW$G$"$k!#$^$?!">-MhE*(B +$B$K!"(BXEmacs/mule $B$NJ}K!$KE}9g$5$l$k$3$H$r4|BT$9$k0UL#$b$"$k!#/$J$/!">-Mh!"A4$F$N(B MIME charset +$B$,(B XEmacs/mule $B$N(B coding-system $B$H$7$FDj5A$5$l$l$P!"(Bemu $B$H$7$F$3$l$rMQ(B +$B0U$9$kI,MW$O$J$/$J$k$@$m$&!#(B + + $B$5$F!"0J2<$G$OH$9$k!#(B + +[$BJQ?t(B] default-mime-charset + + $BJQ?t(B charsets-mime-charset-alist $B$GDj5A$5$l$F$$$J$$(B charset $B$N(B + list $B$KBP$7$F$D$1$k(B MIME charset $B$r<($9!#4X?t(B + charsets-to-mime-charset $B$d4X?t(B detect-mime-charset-region $B$,(B + $B$3$NJQ?t$r;2>H$9$k!#(B + +[$B4X?t(B] charsets-to-mime-charset CHARSETS + + charset $B$N(B list `CHARSETS' $B$KBP1~$9$k(B MIME charset $B$rJV$9!#(B + +[$B4X?t(B] detect-mime-charset-region start end + + `START' $B$H(B `END' $B$G0O$^$l$?NN0h$KBP1~$9$k(B MIME charset $B$rJV$9!#(B + +[$B4X?t(B] encode-mime-charset-region START END CHARSET + + `START' $B$H(B `END' $B$G0O$^$l$?NN0h$r(B MIME charset `CHARSET' $B$G(B + encode $B$9$k!#(B + +[$B4X?t(B] encode-mime-charset-string STRING CHARSET + + $BJ8;zNs(B `STRING' $B$r(B MIME charset `CHARSET' $B$G(B encode $B$9$k!#(B + +[$B4X?t(B] decode-mime-charset-string STRING CHARSET + + $BJ8;zNs(B `STRING' $B$r(B MIME charset `CHARSET' $B$G(B decode $B$9$k!#(B + + +* $BJ8;z(B code $B$K4X$9$k(B tm $B$N$K(B charset $B$rH$5$l(B + $B$k!#(B + +[$B4X?t(B] mime-preview/decode-text-buffer charset encoding + + MIME charset `charset', MIME encoding `encoding' $B$GId9f2=$5$l(B + $B$?(B current buffer $B$r(B decode $B$9$k!#(Bcode $BJQ49$OJQ?t(B + `mime::article/code-converter' $B$*$h$S(B + `mime-viewer/code-converter-alist' $B$r;2>H$7$FF@$i$l$?4X?t$K$h$C(B + $B$F$C$F(B +decode $B$9$k>l9g$O4X?t(B mime-preview/decode-text-buffer $B$rMQ$$$k$3$H$H$9(B +$B$k!#(B + + tm-view $B$N(B method $B$K$*$$$F!"$"$k(B content $B$KBP$7$F:F5"E*$K(B preview +buffer $B$r:n@.$9$k$h$&$J>l9g$G!"JQ?t(B mime::article/code-converter $B$r@_(B +$BDj$9$kI,MW$,$"$k>l9g$O!"4X?t(B mime-charset/decode-buffer $B$*$h$S(B +mime-charset/maybe-decode-buffer $B$rMQ$$$k$3$H$H$9$k!#(B + + $B$=$l0J30$N>l9g$K$*$$$F!"l9g$O!"(Bemu +API $B$N5!G=$rMQ$$$k$3$H$H$9$k!#(B diff --git a/doc/tm-charset_ja.tex b/doc/tm-charset_ja.tex new file mode 100644 index 0000000..4e03bcf --- /dev/null +++ b/doc/tm-charset_ja.tex @@ -0,0 +1,245 @@ +\documentstyle[a4j]{jarticle} +\setcounter{secnumdepth}{6} +\setcounter{tocdepth}{6} +\topsep=0.1cm +\parsep=0.1cm +\itemsep=0.0cm +\begin{document} +\title{ +tm ¤Ë¤ª¤±¤ëʸ»ú code ¤Î¼è¤ê°·¤¤¤Ë¤Ä¤¤¤Æ} +\author{ +¼é²¬ ÃÎɧ\\ +} +\date{ +1996ǯ7·î18Æü} +\maketitle +\medskip + +\section{charset ¼è¤ê°·¤¤¤Ë´Ø¤¹¤ë´ðËܸ¶Â§} +\medskip +\par +tm ¤Ç¤Ï¸¶Â§¤È¤·¤Æ MIME ¤ÇÄê¤á¤é¤ì¤¿ charset µ¡¹½¤Ë´ð¤Å¤¤¤Æʸ»ú code +¤ò¼è¤ê°·¤¦¡£¤³¤ì¤ò¼Â¸½¤¹¤ë¤¿¤á¤Ë¡¢message ¤òɽ¼¨¤¹¤ë¤¿¤á¤Î buffer +(preview buffer; cooked buffer) ¤Î¾¤ËÀ¸¤Î¡Ê¨¤Á¡¢code ÊÑ´¹¤µ¤ì¤Æ¤ª¤é +¤º network code ¤Î¤Þ¤Þ¤Î¡Ëmessage ¤¬Æþ¤Ã¤¿ buffer (original article +buffer, raw buffer) ¤òÍѤ¤¤ë¤³¤È¤È¤¹¤ë¡£¤³¤Î¾ò·ï¤¬Ëþ¤¿¤µ¤ì¤ì¤Ð¡¢base64 +¤ä quoted-printable Åù¤Î encode ¤ò¹Ô¤Ê¤Ã¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ç¤â¡¢£±¤Ä¤Î +message ¤ËÊ£¿ô¤Îʸ»ú code ¤òº®ºß¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ +\medskip +\par +¤·¤«¤·¤Ê¤¬¤é¡¢¸½¼Â¤Ë¤Ï´ö¤Ä¤«¤ÎÌäÂ꤬¸ºß¤¹¤ë¡££±¤Ä¤ÏÈó MIME message +¤Î¼è¤ê°·¤¤¤Ç¤¢¤ê¡¢¤â¤¦°ì¤Ä¤Ï¾åµ­¤Î¤è¤¦¤ÊÊýË¡¤ò¤È¤ë¤³¤È¤¬º¤Æñ¤Ê MUA ¤ò +ÍøÍѤ¹¤ë¾ì¹ç¤Ç¤¢¤ë¡£Èó MIME message ¤ËÂФ·¤Æ¤Ï¡¢tm ¤Ï default ¤Î +charset ¤ò²¾Äꤹ¤ë¤³¤È¤ÇÂн褷¤Æ¤¤¤ë¡£¸å¼Ô¤ÎÌäÂê¤Ë´Ø¤·¤Æ¤Ï MUA Ëè¤Ë +code ÊÑ´¹ program ¤òÀßÄꤷ¡¢raw buffer ¤òºîÀ®¤¹¤ë¤³¤È¤¬º¤Æñ¤Ê MUA ¤Î¾ì +¹ç¡¢7bit, 8bit, binary ¤Î¤è¤¦¤Ê encode ¤µ¤ì¤Æ¤¤¤Ê¤¤ message ¤Î charset +¤Ë¤è¤ë code ÊÑ´¹¤ò¤ä¤á¤ë¤è¤¦¤Ë¤¹¤ë¤³¤È¤ÇÂн褷¤Æ¤¤¤ë¡£ +\medskip +\par +°Ê²¼¡¢¼ÂºÝ¤Îµ¡¹½¤Ë´Ø¤·¤ÆÀâÌÀ¤¹¤ë¡£ +\medskip +\medskip + +\section{ʸ»ú code ¤Î¼è¤ê°·¤¤¤Ë´Ø¤¹¤ë layer ¹½Â¤} +\medskip +\par +tm ¤Ï +\medskip +{\baselineskip=10pt +\begin{verbatim} + (4) user interface layer (tm) + (3) non-interactive MIME feature layer (tm) + (2) MIME encoding layer (MEL) / utility function layer (tl) + (1) emu API layer + (0) (API of emacs variants) +\end{verbatim}} +\medskip +\par +¤È¤¤¤¦£µÁع½Â¤¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤¬¡¢Ê¸»ú code ¤Î¼è¤ê°·¤¤¤âƱÍͤǤ¢¤ë¡£ +\medskip +\par +Â裱ÁؤǤ¢¤ë emu API ¤ÇÁ´¤Æ¤Î emacs variant ¤ÇÍøÍѲÄǽ¤Ê´ðËÜ´Ø¿ô¤òÄó +¶¡¤·¡¢Â裳ÁØ¤Ç tm-view ¤ÇÍøÍѤ¹¤ë¤¿¤á¤Î´ðËÜŪ¤Êµ¡Ç½¤ò¼Â¸½¤·¡¢Â裴ÁØ¤Ç +¤½¤Î³¦Ì̤òÄêµÁ¤¹¤ë¡£ +\medskip +\medskip + +\section{ʸ»ú code ¤Ë´Ø¤¹¤ë emu API ¤Îµ¡Ç½} +\medskip +\par +EMACS ¤Ë¤Ï¡¢¸µÍ衢ʸ»ú¤È¤¤¤¦³µÇ°¤Ï¸ºß¤·¤Ê¤«¤Ã¤¿¡£¤è¤Ã¤Æ¡¢¤½¤ì¤ò°·¤¦ +¤¿¤á¤Îµ¡Ç½¤Ï¸ºß¤·¤Ê¤«¤Ã¤¿¡£ +\medskip +\par +emacs ¤ÎÀ¤³¦¤Ëʸ»ú code ¤È¤¤¤¦³µÇ°¤ò»ý¤Á¹þ¤ó¤À¤Î¤Ï NEmacs ¤Ç¤¢¤ë¡Ê¿ +ʬ(\verb+^+\_\verb+^+;¡Ë¡£NEmacs ¤Ï `JIS', `EUC', `Shift JIS'¡Ê¤ª¤è¤Ó̵ÊÑ´¹¡Ë¤È¤¤¤¦£³ +¼ïÎà¤Î¡Ø´Á»ú code¡Ù¤òƳÆþ¤·¤¿¡£¤½¤·¤Æ¡¢¤³¤ì¤ò¿ôÃͤÇɽ¸½¤·¤¿¡£ +\medskip +\par +NEmacs ¤ÏÆüËܸì¡Ê¤Î subset¡Ë¤·¤«°·¤¦É¬Íפ¬¤Ê¤«¤Ã¤¿¤Î¤Ç¹â¡¹£³¼ïÎà¤Îʸ +»ú code ¤¬»È¤¨¤ì¤Ð½½Ê¬¤Ç¤¢¤Ã¤¿¤¬¡¢¤³¤ì¤ò¿¸À¸ì²½¤·¤¿ MULE ¤Ç¤Ï¤è¤ê¿¿ô +¤Îʸ»ú code ¤¬°·¤¦¤³¤È¤¬Í׵ᤵ¤ì¡¢¤Þ¤¿¡¢user ¤¬Ê¸»ú code ¤òÄêµÁ¤Ç¤­¤ë +¤³¤È¤âɬÍפǤ¢¤Ã¤¿¡£¤³¤Î¤¿¤á¡¢¿ôÃͤǤϤʤ¯¡¢ÀèƬ¤ÈËöÈø¤Ë `*' ¤òÉÕ¤±¤¿ +¼«¸Êɾ²Á·Á¼°¤ÎÄê¿ô¤Çɽ¸½¤µ¤ì¤ë coding-system ¤È¤¤¤¦³µÇ°¤¬Æ³Æþ¤µ¤ì¤¿¡£ +\medskip +\par +XEmacs ¤Ë mule µ¡Ç½¤òƳÆþ¤·¤è¤¦¤È¤·¤¿¿Íã¤Ï¼«¸Êɾ²Á·Á¼°¤ÎÄê¿ô¤ÎÂå¤ï +¤ê¤Ë coding-system ¤òɽ¤¹¿·¤¿¤Ê·¿¤òƳÆþ¤¹¤ë¤³¤È¤Ë¤·¤¿¡£¤Þ¤¿¡¢¤³¤Î·¿¤Ë +Âбþ¤¹¤ë̾Á°¤ò symbol ¤ÇÍ¿¤¨¤¿¡£¤³¤Î¤¿¤á¡¢coding-system ¤òɽ¤¹ÂçÎ̤ÎÄê +¿ô¤Ï°ìÁݤµ¤ì¤¿¡£ +\medskip +\par +¤³¤Î¤è¤¦¤Ë¡¢¸½Â¸¤¹¤ë emacs variants ¤Î´Ö¤Ç¤Ïʸ»ú code ¤Îɽ¸½Ë¡¤Ï¤µ¤Þ +¤¶¤Þ¤Ç¤¢¤ë¡£¤â¤È¤â¤È¡¢emu ¤Ï¤³¤ÎʬÌî¤Ç¤â¤Ã¤È¤âµ¡Ç½¤Î¹â¤¤ MULE ¤ò¤ª¼êËÜ +¤Ë¤³¤ì¤Îµ¡Ç½¤ò emulate ¤¹¤ë´Ø¿ô¤ò³Æ emacs variant ¤ËÂФ·¤ÆÄêµÁ¤¹¤ëÊýË¡ +¤òºÎ¤Ã¤¿¤¬¡¢MULE ¤ò¸µ¤Ë EMACS/MULE Åý¹çÈǤä XEmacs/mule ¤¬À¸¤Þ¤ì¤ë¤Ë½¾ +¤¤¡¢coding-system µ¡Ç½¤ò¤½¤Î¤Þ¤Þ»È¤¦¤Î¤ÏÆÀºö¤Ç¤Ï¤Ê¤¤¤ÈȽÃǤ¹¤ë¤Ë»ê¤Ã¤¿¡£ +Âå¤ï¤ê¤Ë¤è¤êÃê¾ÝÅ٤ι⤤ MIME charset ¤Ë´Ø¤¹¤ë API ¤òÍÑ°Õ¤¹¤ë¤³¤È¤Ë¤· +¤¿¡£ +\medskip +\par +MIME charset ¤Ïʸ»ú code ¤òɽ¤¹¤â¤Î¤Ç¤¢¤ê¡¢MULE ¤Ç¤¤¤¦¤È¤³¤í¤Î +leading-char ¤ä EMACS/MULE ¤ä XEmacs/mule ¤Ç¤¤¤¦¤È¤³¤í¤Î charset ¤ËÁê +Åö¤¹¤ë¤â¤Î¤Ç¤Ï¤Ê¤¯¡¢mule ¤Î coding-system ¤ËÁêÅö¤¹¤ëµ¡Ç½¤Ç¤¢¤ë¡£¼ÂºÝ¡¢ +mule ¤Î coding-system ¤Î̾Á°¤È MIME charset ¤Î̾Á°¤Ï¶¦Ä̤¹¤ë¤â¤Î¤â¾¯¤Ê +¤¯¤Ê¤¤¡£ +\medskip +\par +MIME charset ¤Îɽ¸½¤Î»ÅÊý¤È¤·¤Æ¡¢emu API ¤Ç¤Ï XEmacs/mule ¤ÈƱÍÍ¡¢ +symbol ¤òÍѤ¤¤ë¤³¤È¤Ë¤·¤¿¡£MULE ¤Î¤è¤¦¤ÊÊÑ¿ô¤ò»È¤¦¤È«Çû¤Ë´Ø¤¹¤ë check +¤¬É¬ÍפǤ¢¤ë¤¬¡¢symbol ¤Ç¤Ï¤³¤Î¤è¤¦¤Ê check ¤ÏÉÔÍפǤ¢¤ë¡£¤Þ¤¿¡¢¾­ÍèŪ +¤Ë¡¢XEmacs/mule ¤ÎÊýË¡¤ËÅý¹ç¤µ¤ì¤ë¤³¤È¤ò´üÂÔ¤¹¤ë°ÕÌ£¤â¤¢¤ë¡£¼ÂºÝ¡¢ +XEmacs/mule ¤È emu API ¤Î´Ö¤Î gap ¤Ï¾¯¤Ê¤¯¡¢¾­Íè¡¢Á´¤Æ¤Î MIME charset +¤¬ XEmacs/mule ¤Î coding-system ¤È¤·¤ÆÄêµÁ¤µ¤ì¤ì¤Ð¡¢emu ¤È¤·¤Æ¤³¤ì¤òÍÑ +°Õ¤¹¤ëɬÍפϤʤ¯¤Ê¤ë¤À¤í¤¦¡£ +\medskip +\par +¤µ¤Æ¡¢°Ê²¼¤Ç¤Ï¼ÂºÝ¤Îµ¡Ç½¤ò²òÀ⤹¤ë¡£ +\medskip +\begin{description} +\item[{[}ÊÑ¿ô{]}]charsets-mime-charset-alist +\medskip +\par +Key Éô¤Ë charset ¤Î list, value Éô¤Ë mime-charset ¤ò¤È¤ëÏ¢ÁÛ¥ê +¥¹¥È¡£´Ø¿ô charsets-to-mime-charset ¤ä´Ø¿ô +detect-mime-charset-region ¤¬¤³¤ÎÊÑ¿ô¤ò»²¾È¤¹¤ë¡£ +\medskip +\item[{[}ÊÑ¿ô{]}]default-mime-charset +\medskip +\par +ÊÑ¿ô charsets-mime-charset-alist ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤ charset ¤Î +list ¤ËÂФ·¤Æ¤Ä¤±¤ë MIME charset ¤ò¼¨¤¹¡£´Ø¿ô +charsets-to-mime-charset ¤ä´Ø¿ô detect-mime-charset-region ¤¬ +¤³¤ÎÊÑ¿ô¤ò»²¾È¤¹¤ë¡£ +\medskip +\item[{[}´Ø¿ô{]}]charsets-to-mime-charset CHARSETS +\medskip +\par +charset ¤Î list `CHARSETS' ¤ËÂбþ¤¹¤ë MIME charset ¤òÊÖ¤¹¡£ +\medskip +\item[{[}´Ø¿ô{]}]detect-mime-charset-region start end +\medskip +\par +`START' ¤È `END' ¤Ç°Ï¤Þ¤ì¤¿Îΰè¤ËÂбþ¤¹¤ë MIME charset ¤òÊÖ¤¹¡£ +\medskip +\item[{[}´Ø¿ô{]}]encode-mime-charset-region START END CHARSET +\medskip +\par +`START' ¤È `END' ¤Ç°Ï¤Þ¤ì¤¿Îΰè¤ò MIME charset `CHARSET' ¤Ç +encode ¤¹¤ë¡£ +\medskip +\item[{[}´Ø¿ô{]}]encode-mime-charset-string STRING CHARSET +\medskip +\par +ʸ»úÎó `STRING' ¤ò MIME charset `CHARSET' ¤Ç encode ¤¹¤ë¡£ +\medskip +\item[{[}´Ø¿ô{]}]decode-mime-charset-string STRING CHARSET +\medskip +\par +ʸ»úÎó `STRING' ¤ò MIME charset `CHARSET' ¤Ç decode ¤¹¤ë¡£ +\medskip +\medskip +\end{description} + +\section{ʸ»ú code ¤Ë´Ø¤¹¤ë tm ¤Î¼ÂÁõ} +\medskip +\par +¤â¤·¡¢ÁÇľ¤Ë charset ¤ò¼Â¸½¤¹¤ë¤À¤±¤Ê¤é emu API ¤ò¤½¤Î¤Þ¤Þ»È¤¨¤ÐÎɤ¤ +¤Î¤À¤¬¡¢¼ÂºÝ¤Ë¤Ï VM ¤ä RMAIL¡Ê¤ª¤è¤ÓÀΤΠGNUS, Gnus¡Ë¤È¤¤¤Ã¤¿ raw +buffer ¤ò¼Â¸½¤·¤Ë¤¯¤¤ MUA ¤Ç¤Ï charset ¤ËÂбþ¤¹¤ë¤³¤È¤¬º¤Æñ¤Ç¤¢¤ë¡£¤³ +¤Î¤¿¤á¡¢tm-view ¤Ï¤³¤Î¤è¤¦¤Ê MUA ¤Ç¤Ï½ã¿è¤Ê°ÕÌ£¤Ç¤Î raw buffer ¤Î¼Â¸½ +¤òÄü¤á original article buffer Ãæ¤Ë´û¤Ë charset ¤Ë°Í¤é¤º¤Ë code ÊÑ´¹¤· +¤¿ message ¤òÆþ¤ì¤ë¤³¤È¤òǧ¤á¤Æ¤¤¤ë¡£ +\medskip +\par +¤è¤Ã¤Æ¡¢°Ê²¼¤Î£²¼ïÎà¤Î code ÊÑ´¹´Ø¿ô¤ò»È¤¤Ê¬¤±¤ëɬÍפ¬¤¢¤ë¡£ +\medskip +\begin{description} +\item[{[}´Ø¿ô{]}]mime-charset/decode-buffer charset \&optional encoding +\medskip +\par +current buffer ¤ò MIME charset `charset' ¤ÇÆâÉô code ¤ËÊÑ´¹¤¹ +¤ë¡£¤³¤Î´Ø¿ô¤Ï `encoding' ¤Ë°Í¤é¤ºÉ¬¤º code ÊÑ´¹¤ò¹Ô¤Ê¤¦¡£ +\medskip +\item[{[}´Ø¿ô{]}]mime-charset/maybe-decode-buffer charset \&optional encoding +\medskip +\par +`encoding' ¤¬ nil, "7bit", "8bit", "binary" °Ê³°¤Î»þ¡¢Â¨¤Á¡¢ +ASCII printable ¤Ê encode ¤¬»Ü¤µ¤ì¤Æ¤¤¤ë»þ¤Î¤ß¡¢¼ÂºÝ¤Ë¡¢ +current buffer ¤ò MIME charset `charset' ¤ÇÆâÉô code ¤ËÊÑ´¹¤¹ +¤ë¡£¤½¤ì°Ê³°¤Î»þ¤Ï¡¢²¿¤â¤·¤Ê¤¤¡£ +\medskip +\medskip +\end{description} + +\section{ʸ»ú code ¤Ë´Ø¤¹¤ë tm ¤Î³¦ÌÌ} +\medskip +\par +MUA ¤Ë¤è¤Ã¤Æʸ»ú code ¤ò»È¤¤Ê¬¤±¤ë¤¿¤á¤Ë tm ¤Ï¤³¤³¤Ç½Ò¤Ù¤ë¤è¤¦¤Ê³¦ÌÌ +¤òÄ󶡤¹¤ë¡£ +\medskip +\begin{description} +\item[{[}ÊÑ¿ô{]}]mime-viewer/code-converter-alist +\medskip +\par +¤³¤ÎÊÑ¿ô¤Ï key Éô¤ò major-mode, value Éô¤ò code ÊÑ´¹´Ø¿ô¤È¤¹¤ë +Ï¢ÁÛ list ¤Ç¤¢¤ë¡£¤³¤ì¤òÍѤ¤¤Æ³Æ MUA Ëè¤Î code ÊÑ´¹´Ø¿ô¤òÀßÄê +¤¹¤ë¡£code ÊÑ´¹´Ø¿ô¤ÏÁ´Àá¤Ç½Ò¤Ù¤¿¼ÂÁõ¤òÍѤ¤¤ë¤³¤È¡£ +\medskip +\item[{[}ÊÑ¿ô{]}]mime::article/code-converter +\medskip +\par +method ¤ÇÍѤ¤¤é¤ì¤ë code ÊÑ´¹´Ø¿ô¤ò»ØÄꤹ¤ë¤¿¤á¤Î original +article buffer ¤Î buffer local ÊÑ¿ô¤Ç¤¢¤ë¡£ÊÑ¿ô +`mime-viewer/code-converter-alist' ¤è¤ê¤â¹â¤¤Í¥ÀèÅ٤ǻ²¾È¤µ¤ì +¤ë¡£ +\medskip +\item[{[}´Ø¿ô{]}]mime-preview/decode-text-buffer charset encoding +\medskip +\par +MIME charset `charset', MIME encoding `encoding' ¤ÇÉä¹æ²½¤µ¤ì +¤¿ current buffer ¤ò decode ¤¹¤ë¡£code ÊÑ´¹¤ÏÊÑ¿ô +`mime::article/code-converter' ¤ª¤è¤Ó +`mime-viewer/code-converter-alist' ¤ò»²¾È¤·¤ÆÆÀ¤é¤ì¤¿´Ø¿ô¤Ë¤è¤Ã +¤Æ¼Â¹Ô¤µ¤ì¤ë¡£ +\medskip +\medskip +\end{description} + +\section{ʸ»ú code ´Ø·¸¤Î´Ø¿ô¤Î»È¤¤Êý¤Î»Ø¿Ë} +\medskip +\par +tm-view ¤Î method ¤¬¤¢¤ë content ¤ò¤¢¤ë charset, encoding ¤Ë½¾¤Ã¤Æ +decode ¤¹¤ë¾ì¹ç¤Ï´Ø¿ô mime-preview/decode-text-buffer ¤òÍѤ¤¤ë¤³¤È¤È¤¹ +¤ë¡£ +\medskip +\par +tm-view ¤Î method ¤Ë¤ª¤¤¤Æ¡¢¤¢¤ë content ¤ËÂФ·¤ÆºÆµ¢Åª¤Ë preview +buffer ¤òºîÀ®¤¹¤ë¤è¤¦¤Ê¾ì¹ç¤Ç¡¢ÊÑ¿ô mime::article/code-converter ¤òÀß +Äꤹ¤ëɬÍפ¬¤¢¤ë¾ì¹ç¤Ï¡¢´Ø¿ô mime-charset/decode-buffer ¤ª¤è¤Ó +mime-charset/maybe-decode-buffer ¤òÍѤ¤¤ë¤³¤È¤È¤¹¤ë¡£ +\medskip +\par +¤½¤ì°Ê³°¤Î¾ì¹ç¤Ë¤ª¤¤¤Æ¡¢¼ÂºÝ¤Ë code ÊÑ´¹¤ò¹Ô¤Ê¤¦¤è¤¦¤Ê¾ì¹ç¤Ï¡¢emu +API ¤Îµ¡Ç½¤òÍѤ¤¤ë¤³¤È¤È¤¹¤ë¡£ +\end{document} diff --git a/gnus/ChangeLog b/gnus/ChangeLog index 2079d1e..d7a2f5c 100644 --- a/gnus/ChangeLog +++ b/gnus/ChangeLog @@ -1,3 +1,18 @@ +Wed Jul 24 10:04:54 1996 MORIOKA Tomohiko + + * tm/gnus: Version 7.79 was released. + +Thu Jul 18 12:17:11 1996 MORIOKA Tomohiko + + * tm-gnus5.el (tm-gnus/content-header-filter): Use function + `decode-mime-charset-region' instead of + `tm-gnus/content-header-filter'. + + (mime-viewer/code-converter-alist): set + `mime-charset/decode-buffer' instead of + `mime-charset-decode-region'. + + Wed Jul 17 05:39:11 1996 MORIOKA Tomohiko * tm/gnus: Version 7.78 was released. diff --git a/gnus/tm-gnus5.el b/gnus/tm-gnus5.el index 6933782..b3b6bb7 100644 --- a/gnus/tm-gnus5.el +++ b/gnus/tm-gnus5.el @@ -8,7 +8,7 @@ ;;; Maintainer: MORIOKA Tomohiko ;;; and KOBAYASHI Shuhei ;;; Created: 1995/09/24 -;;; Version: $Revision: 7.78 $ +;;; Version: $Revision: 7.79 $ ;;; Keywords: news, MIME, multimedia, multilingual, encoded-word ;;; ;;; This file is part of tm (Tools for MIME). @@ -42,7 +42,7 @@ ;;; (defconst tm-gnus/RCS-ID - "$Id: tm-gnus5.el,v 7.78 1996/07/14 16:37:27 morioka Exp $") + "$Id: tm-gnus5.el,v 7.79 1996/07/18 12:17:11 morioka Exp $") (defconst tm-gnus/version (concat (get-version-string tm-gnus/RCS-ID) " for Gnus 5.2 or later")) @@ -114,7 +114,7 @@ This variable is set to `gnus-show-mime'.") (defun tm-gnus/content-header-filter () (goto-char (point-min)) (mime-preview/cut-header) - (mime-charset-decode-region (point-min)(point-max) default-mime-charset) + (decode-mime-charset-region (point-min)(point-max) default-mime-charset) (mime/decode-message-header) ) @@ -124,7 +124,7 @@ This variable is set to `gnus-show-mime'.") (set-alist 'mime-viewer/code-converter-alist 'gnus-original-article-mode - (function mime-charset-decode-region)) + (function mime-charset/decode-buffer)) (defun mime-viewer/quitting-method-for-gnus5 () (if (not gnus-show-mime) diff --git a/inst-tm b/inst-tm index 6387e40..c0ae129 100644 --- a/inst-tm +++ b/inst-tm @@ -1,6 +1,6 @@ ;;; -*-Emacs-Lisp-*- ;;; -;;; $Id: inst-tm,v 7.7 1996/06/27 15:49:37 morioka Exp $ +;;; $Id: inst-tm,v 7.8 1996/07/22 18:29:22 morioka Exp $ ;;; (load-file "TM-CFG") @@ -119,6 +119,9 @@ )) (defun install-el-files (src dest &rest files) + (or (file-exists-p dest) + (make-directory dest t) + ) (mapcar (function (lambda (file) (install-el-file src dest file) )) @@ -149,9 +152,6 @@ files)) (defun install-el-and-elc-files (src dest el-files elc-files) - (if (not (file-exists-p dest)) - (make-directory dest t) - ) (apply (function install-el-files) src dest el-files) (apply (function install-elc-files) src dest elc-files) ) diff --git a/mh-e/ChangeLog b/mh-e/ChangeLog index df9b47b..733fc9a 100644 --- a/mh-e/ChangeLog +++ b/mh-e/ChangeLog @@ -1,3 +1,27 @@ +Wed Jul 24 10:07:45 1996 MORIOKA Tomohiko + + * tm/mh-e: Version 7.65 was released. + +Mon Jul 22 18:24:08 1996 MORIOKA Tomohiko + + * tm-mh-e3.el (mh-send-prog): New variable. + +Thu Jul 18 12:29:17 1996 MORIOKA Tomohiko + + * tm-mh-e.el (tm-mh-e/decode-charset-buffer): New alias; renamed + from `tm-mh-e/charset-decode-region'; Use function + `mime-charset/decode-buffer' instead of + `mime-charset-decode-region'. + + (mime-viewer/code-converter-alist): set + `tm-mh-e/decode-charset-buffer' instead of + `tm-mh-e/charset-decode-region'. + + (tm-mh-e/content-header-filter): Use function + `tm-mh-e/decode-charset-buffer' instead of + `tm-mh-e/charset-decode-region'. + + Wed Jul 17 05:38:04 1996 MORIOKA Tomohiko * tm/mh-e: Version 7.64 was released. diff --git a/mh-e/tm-mh-e.el b/mh-e/tm-mh-e.el index 7c71725..d2458c2 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.64 $ +;;; Version: $Revision: 7.65 $ ;;; 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.64 1996/07/14 15:08:16 morioka Exp $") + "$Id: tm-mh-e.el,v 7.65 1996/07/18 12:29:17 morioka Exp $") (defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID)) @@ -251,17 +251,17 @@ digest are inserted into the folder after that message." ;;; @ for tm-view ;;; -(fset 'tm-mh-e/charset-decode-region - (symbol-function 'mime-charset-decode-region)) +(fset 'tm-mh-e/decode-charset-buffer + (symbol-function 'mime-charset/decode-buffer)) (set-alist 'mime-viewer/code-converter-alist 'mh-show-mode - (function tm-mh-e/charset-decode-region)) + (function tm-mh-e/decode-charset-buffer)) (defun tm-mh-e/content-header-filter () (goto-char (point-min)) (mime-preview/cut-header) - (tm-mh-e/charset-decode-region (point-min)(point-max) default-mime-charset) + (tm-mh-e/decode-charset-buffer default-mime-charset) (mime/decode-message-header) ) diff --git a/mh-e/tm-mh-e3.el b/mh-e/tm-mh-e3.el index 68d5a2c..0ac7f9c 100644 --- a/mh-e/tm-mh-e3.el +++ b/mh-e/tm-mh-e3.el @@ -1,14 +1,39 @@ ;;; -;;; $Id: tm-mh-e3.el,v 7.1 1995/12/04 03:43:30 morioka Exp $ +;;; tm-mh-e3.el --- tm-mh-e module for mh-e 3.* to emulate mh-e 4.*. ;;; -;;; This is a part of tm-mh-e.el which is a module for old mh-e -;;; to emulate mh-e 4.*. +;;; Copyright (C) 1995 Free Software Foundation, Inc. +;;; Copyright (C) 1993 .. 1996 MORIOKA Tomohiko ;;; -;;; This module imports from mh-e 4.1. +;;; Author: MORIOKA Tomohiko +;;; (This module was imported from mh-e 4.1) +;;; Created: 1994/7/10 +;;; Version: +;;; $Id: tm-mh-e3.el,v 7.2 1996/07/22 18:24:08 morioka Exp $ +;;; Keywords: mail, MH, mh-e 3, MIME, multimedia, encoded-word, multilingual ;;; +;;; 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 'mh-e) +(defvar mh-send-prog "send" + "Name of the MH send program. +Some sites need to change this because of a name conflict.") (defvar mail-citation-hook nil "*Hook for modifying a citation just inserted in the mail buffer. @@ -72,3 +97,5 @@ message and the original subject line.") ;;; (provide 'tm-mh-e3) + +;;; tm-mh-e3.el ends here diff --git a/tm-def.el b/tm-def.el index 321a2e9..d8688aa 100644 --- a/tm-def.el +++ b/tm-def.el @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: tm-def.el,v 7.61 1996/07/15 14:03:57 morioka Exp $ +;;; $Id: tm-def.el,v 7.62 1996/07/18 06:04:28 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia, definition ;;; ;;; This file is part of tm (Tools for MIME). @@ -98,14 +98,6 @@ mime-charset-type-list)) -;;; @ coding-system -;;; - -(defun mime-charset-decode-region (beg end charset &optional encoding) - (decode-mime-charset-region beg end (or charset default-mime-charset)) - ) - - ;;; @ button ;;; diff --git a/tm-edit.el b/tm-edit.el index a1061a5..2852cb7 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.72 $ +;;; Version: $Revision: 7.73 $ ;;; 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.72 1996/07/15 08:19:01 morioka Exp $") + "$Id: tm-edit.el,v 7.73 1996/07/22 19:29:42 morioka Exp $") (defconst mime-editor/version (get-version-string mime-editor/RCS-ID)) @@ -502,7 +502,6 @@ Each elements are regexp of field-name. [tm-edit.el]") ;;; (defvar mime/editor-mode-old-local-map nil) -(defvar mime/editor-mode-old-selective-display nil) (defvar mime/editing-buffer nil) @@ -665,32 +664,46 @@ Tspecials means any character that matches with it in header must be quoted.") "MIME minor mode for editing the tagged MIME message. In this mode, basically, the message is composed in the tagged MIME -format. The message tag looks like: +format. The message tag looks like: `--[[text/plain; charset=ISO-2022-JP][7bit]]'. The tag specifies the MIME content type, subtype, optional parameters -and transfer encoding of the message following the tag. Messages -without any tag are treated as `text/plain' by default. Charset and +and transfer encoding of the message following the tag. Messages +without any tag are treated as `text/plain' by default. Charset and transfer encoding are automatically defined unless explicitly -specified. Binary messages such as audio and image are usually hidden -using selective-display facility. The messages in the tagged MIME -format are automatically translated into a MIME compliant message when -exiting this mode. +specified. Binary messages such as audio and image are usually hidden. +The messages in the tagged MIME format are automatically translated +into a MIME compliant message when exiting this mode. -Available charsets depend on Emacs version being used. The following +Available charsets depend on Emacs version being used. The following lists the available charsets of each emacs. -Emacs18: US-ASCII is only available. +EMACS 18: US-ASCII is only available. NEmacs: US-ASCII and ISO-2022-JP are available. -Emacs19: US-ASCII and ISO-8859-1 are available. -Mule: US-ASCII, ISO-8859-* (except for ISO-8859-6), - ISO-2022-JP, ISO-2022-JP-2 and ISO-2022-INT-1 are available. - -ISO-2022-JP-2 and ISO-2022-INT-1 charsets used in Mule is expected to -be used to represent multilingual text in intermixed manner. Any +EMACS 19: US-ASCII and ISO-8859-1 (or other charset) are available. +XEmacs 19: US-ASCII and ISO-8859-1 (or other charset) are available. +Mule: US-ASCII, ISO-8859-* (except for ISO-8859-5), KOI8-R, + ISO-2022-JP, ISO-2022-JP-2, ISO-2022-KR, BIG5 and + ISO-2022-INT-1 are available. + +ISO-2022-JP-2 and ISO-2022-INT-1 charsets used in mule is expected to +be used to represent multilingual text in intermixed manner. Any languages that has no registered charset are represented as either -ISO-2022-JP-2 or ISO-2022-INT-1 in Mule. +ISO-2022-JP-2 or ISO-2022-INT-1 in mule. + +If you want to use non-ISO-8859-1 charset in EMACS 19 or XEmacs 19, +please set variable `default-mime-charset'. This variable must be +symbol of which name is a MIME charset. + +If you want to add more charsets in mule, please set variable +`charsets-mime-charset-alist'. This variable must be alist of which +key is list of leading-char/charset and value is symbol of MIME +charset. (leading-char is a term of MULE 1.* and 2.*. charset is a +term of XEmacs/mule, mule merged EMACS and MULE 3.*) If name of +coding-system is different as MIME charset, please set variable +`mime-charset-coding-system-alist'. This variable must be alist of +which key is MIME charset and value is coding-system. Following commands are available in addition to major mode commands: \\[mime-editor/insert-text] insert a text message. @@ -798,10 +811,8 @@ User customizable variables (not documented all of them): )) ;; end - ;; Remember old selective-display. - (make-local-variable 'mime/editor-mode-old-selective-display) - (setq mime/editor-mode-old-selective-display selective-display) - (setq selective-display t) + (enable-invisible) + ;; I don't care about saving these. (setq paragraph-start (regexp-or mime-editor/single-part-tag-regexp @@ -839,7 +850,7 @@ just return to previous mode." (t (use-local-map mime/editor-mode-old-local-map))) - (setq selective-display mime/editor-mode-old-selective-display) + (end-of-invisible) (set-buffer-modified-p (buffer-modified-p)) (run-hooks 'mime-editor/exit-hook) (message "Exit MIME editor mode.") diff --git a/tm-pgp.el b/tm-pgp.el index 4e8635e..e5196d4 100644 --- a/tm-pgp.el +++ b/tm-pgp.el @@ -8,7 +8,7 @@ ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1995/12/7 ;;; Version: -;;; $Id: tm-pgp.el,v 7.18 1996/07/15 14:03:34 morioka Exp $ +;;; $Id: tm-pgp.el,v 7.19 1996/07/18 12:20:32 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia, PGP, security ;;; ;;; This file is part of tm (Tools for MIME). @@ -95,7 +95,7 @@ (and (search-forward "\n\n") (match-end 0))) - (setq code-converter (function mime-charset-decode-region)) + (setq code-converter (function mime-charset/decode-buffer)) )) (setq major-mode 'mime/show-message-mode) (setq mime::article/code-converter code-converter) diff --git a/tm-text.el b/tm-text.el index 5b64ee9..058c0e8 100644 --- a/tm-text.el +++ b/tm-text.el @@ -1,5 +1,5 @@ ;;; -;;; tm-text.el --- a tm-view content filter to display +;;; tm-text.el --- a content filter module of tm-view to display ;;; text/plain, text/richtext and text/enriched ;;; in Emacs buffers ;;; @@ -8,7 +8,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: tm-text.el,v 7.12 1996/05/27 08:14:11 morioka Exp $ +;;; $Id: tm-text.el,v 7.20 1996/07/18 12:46:20 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia, text ;;; ;;; This file is part of tm (Tools for MIME). @@ -33,19 +33,23 @@ ;;; (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) + '((mime/show-message-mode . mime-charset/decode-buffer) + (mime/temporary-message-mode . mime-charset/decode-buffer) + (t . mime-charset/maybe-decode-buffer) )) -(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-charset/decode-buffer (charset &optional encoding) + (decode-mime-charset-region (point-min)(point-max) + (or charset default-mime-charset)) + ) -(defun mime-preview/decode-text-region (beg end charset encoding) - (mime-decode-region beg end encoding) +(defun mime-charset/maybe-decode-buffer (charset &optional encoding) + (or (member encoding '(nil "7bit" "8bit" "binary")) + (mime-charset/decode-buffer beg end charset) + )) + +(defun mime-preview/decode-text-buffer (charset encoding) + (mime-decode-region (point-min) (point-max) encoding) (let* ((mode mime::preview/original-major-mode) (m (or (save-excursion (set-buffer mime::preview/article-buffer) @@ -55,7 +59,7 @@ )) ) (and (functionp m) - (funcall m beg (point-max) charset encoding) + (funcall m charset encoding) ))) @@ -63,11 +67,7 @@ ;;; (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) - ) + (mime-preview/decode-text-buffer (cdr (assoc "charset" params)) encoding) (goto-char (point-max)) (if (not (eq (char-after (1- (point))) ?\n)) (insert "\n") @@ -88,36 +88,22 @@ (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)) + (charset (cdr (assoc "charset" params))) + (beg (point-min)) ) - (remove-text-properties beg end '(face nil)) - (mime-decode-region beg end encoding) - (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) - ) + (remove-text-properties beg (point-max) '(face nil)) + (mime-preview/decode-text-buffer 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)) + (charset (cdr (assoc "charset" params))) + (beg (point-min)) ) - (remove-text-properties beg end '(face nil)) - (mime-decode-region beg end encoding) - (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) - ) + (remove-text-properties beg (point-max) '(face nil)) + (mime-preview/decode-text-buffer charset encoding) (enriched-decode beg (point-max)) ))