From 424f06342096f9fcf57986cb6985c010911a4320 Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 2 Mar 1998 15:09:57 +0000 Subject: [PATCH] tm 6.63 --- Makefile | 31 ++++++---- Makefile.bc | 2 +- README.eng | 10 ++-- doc/rel-6eng.ol | 179 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/rel-6jp.ol | 171 ++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/tm-eng.tex | 4 +- gnus/d-path | 23 +++---- gnus/g3-path | 21 ++++--- gnus/g4-path | 21 ++++--- make-lpath | 1 + mh-e/tm-mh-e.el | 14 ++++- tm-rich.el | 24 ++++---- tm-rmail.el | 57 +++++++++++++++--- tm-view.el | 67 ++++++--------------- 14 files changed, 507 insertions(+), 118 deletions(-) create mode 100644 doc/rel-6eng.ol create mode 100644 doc/rel-6jp.ol diff --git a/Makefile b/Makefile index 8e784e5..d17e499 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# $Id: Makefile,v 6.12 1995/06/22 05:00:00 morioka Exp morioka $ +# $Id: Makefile,v 6.14 1995/06/26 08:13:11 morioka Exp morioka $ # # Please specify emacs executables: @@ -17,11 +17,11 @@ MULE2 = mule2 # TMDIR18 = for Emacs 18.* (NEMACS, NEpoch or MULE 1) # TMDIR19 = for Emacs 19.* (FSF original, XEmacs or MULE 2) -TMDIR18 = /usr/local/lib/emacs/local.lisp/tm -TMDIR19 = /usr/local/lib/mule/site-lisp +#TMDIR18 = /usr/local/lib/emacs/local.lisp/tm +#TMDIR19 = /usr/local/lib/mule/site-lisp -#TMDIR18 = $(HOME)/lib/emacs18/lisp -#TMDIR19 = $(HOME)/lib/emacs19/lisp +TMDIR18 = $(HOME)/lib/emacs18/lisp +TMDIR19 = $(HOME)/lib/emacs19/lisp # Please specify GNUS type (`gnus3' or `gnus4') if you use Emacs 18.* EMACS18_GNUS = gnus3 @@ -48,18 +48,20 @@ FILES = tm/README.eng tm/rel-*.ol \ 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 -# tl/README.eng \ -# tl/Makefile tl/Makefile.bc tl/loadpath \ -# tl/*.el tl/doc/*.texi + 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.58.tar +TARFILE = tm6.63.tar lpath-nemacs: ./make-lpath $(NEMACS_OPT) nemacs: lpath-nemacs + cd ../mel; PWD=`pwd` make nemacs EMACS=$(NEMACS) make -f Makefile.bc all EMACS=$(NEMACS) EMACS_TYPE=nemacs cd gnus; PWD=`pwd` make gnus3 EMACS=$(NEMACS) cd mh-e; PWD=`pwd` \ @@ -69,6 +71,7 @@ nemacs-vm: lpath-nemacs make -f Makefile.bc tm-vm EMACS=$(NEMACS) EMACS_TYPE=nemacs install-nemacs: nemacs install-mua-18 + cd ../mel; PWD=`pwd` make install-nemacs EMACS=$(NEMACS) make -f Makefile.bc install TMDIR=$(TMDIR18) EMACS_TYPE=nemacs cd gnus; PWD=`pwd` make install-18 EMACS=$(NEMACS) TMDIR18=$(TMDIR18) @@ -76,6 +79,7 @@ lpath-mule1: ./make-lpath $(MULE1_OPT) mule1: lpath-mule1 + cd ../mel; PWD=`pwd` make mule1 EMACS=$(MULE1) make -f Makefile.bc all EMACS=$(MULE1) EMACS_TYPE=mule cd gnus; PWD=`pwd` make gnus3 EMACS=$(MULE1) cd mh-e; PWD=`pwd` \ @@ -85,6 +89,7 @@ mule1-vm: lpath-nemacs make -f Makefile.bc tm-vm EMACS=$(MULE1) EMACS_TYPE=mule install-mule1: mule1 install-mua-18 + cd ../mel; PWD=`pwd` make install-mule1 EMACS=$(MULE1) make -f Makefile.bc install TMDIR=$(TMDIR18) EMACS_TYPE=mule cd gnus; PWD=`pwd` make install-18 EMACS=$(MULE1) TMDIR18=$(TMDIR18) @@ -97,8 +102,10 @@ lpath-orig19: ./make-lpath $(ORIG19_OPT) orig19: lpath-orig19 + cd ../mel; PWD=`pwd` make orig19 EMACS=$(ORIG19) make -f Makefile.bc all EMACS=$(ORIG19) EMACS_TYPE=orig cd gnus; PWD=`pwd` make gnus4 EMACS=$(ORIG19) +# If you use (ding) GNUS, please comment use following: # cd gnus; PWD=`pwd` make dgnus EMACS=$(ORIG19) cd mh-e; PWD=`pwd` make orig19 ORIG19=$(ORIG19) @@ -106,6 +113,7 @@ orig19-vm: lpath-nemacs make -f Makefile.bc tm-vm EMACS=$(ORIG19) EMACS_TYPE=orig install-orig19: orig19 install-mua-19 + cd ../mel; PWD=`pwd` make install-orig19 EMACS=$(ORIG19) make -f Makefile.bc install TMDIR=$(TMDIR19) EMACS_TYPE=orig cd gnus; PWD=`pwd` make install-19 EMACS=$(ORIG19) TMDIR19=$(TMDIR19) @@ -113,8 +121,10 @@ lpath-mule2: ./make-lpath $(MULE2_OPT) mule2: lpath-mule2 + cd ../mel; PWD=`pwd` make mule2 EMACS=$(MULE2) make -f Makefile.bc all EMACS=$(MULE2) EMACS_TYPE=mule cd gnus; PWD=`pwd` make gnus4 EMACS=$(MULE2) +# If you use (ding) GNUS, please comment use following: # cd gnus; PWD=`pwd` make dgnus EMACS=$(MULE2) cd mh-e; PWD=`pwd` make mule2 MULE2=$(MULE2) @@ -122,6 +132,7 @@ mule2-vm: lpath-nemacs make -f Makefile.bc tm-vm EMACS=$(MULE2) EMACS_TYPE=mule install-mule2: mule2 install-mua-19 + cd ../mel; PWD=`pwd` make install-mule2 EMACS=$(MULE2) make -f Makefile.bc install TMDIR=$(TMDIR19) EMACS_TYPE=mule cd gnus; PWD=`pwd` make install-19 EMACS=$(MULE2) TMDIR19=$(TMDIR19) diff --git a/Makefile.bc b/Makefile.bc index 269f3a6..d146798 100644 --- a/Makefile.bc +++ b/Makefile.bc @@ -1,5 +1,5 @@ # -# $Id: Makefile.bc,v 6.4 1995/05/18 16:46:28 morioka Exp morioka $ +# $Id: Makefile.bc,v 6.5 1995/06/26 08:08:51 morioka Exp $ # TM_EL = signature.el \ diff --git a/README.eng b/README.eng index f5cfcc0..eba4aaf 100644 --- a/README.eng +++ b/README.eng @@ -1,6 +1,6 @@ [README for tm (English Version)] by MORIOKA Tomohiko -$Id: README.eng,v 2.0 1995/05/19 12:54:14 morioka Exp $ +$Id: README.eng,v 3.0 1995/06/26 08:16:34 morioka Exp morioka $ 1 What's tm? @@ -119,13 +119,11 @@ tl. Please read tl/README.eng. (2) make - Run `make nemacs', if you use NEmacs. + Run `make gnus3', if you use GNUS 3.*. - Run `make mule1', if you use Mule 1.* (based on Emacs 18.*). + Run `make gnus4', if you use GNUS 4.*. - Run `make orig19', if you use Original Emacs 19.* or XEmacs. - - Run `make mule2', if you use Mule 2.* (based on Emacs 19.*). + Run `make dgnus', if you use (ding) GNUS. (3) install diff --git a/doc/rel-6eng.ol b/doc/rel-6eng.ol new file mode 100644 index 0000000..f0a07db --- /dev/null +++ b/doc/rel-6eng.ol @@ -0,0 +1,179 @@ +* tm/Makefile + + Not only do `make mule2' or `make orig19' compile normal tm modules +but also tm-mh-e and tm-gnus. + + Similarly, not only do `make install-mule2' or `make install-orig19' +install normal tm modules but also tm-mh-e and tm-gnus. + + +* tm-comp + +** message/rfc822 + + We add a message/rfc822 style message inserting command. Its +function name is `tm-comp/insert-message', standard key bind is `C-c +C-x m'. + + Function `tm-comp/insert-message' requires message-inserter function +for your MUA. message-inserter functions are registerd at variable +`tm-comp/message-inserter-alist' which is a assoc-list whose element +is a pair that major-mode is key and message-inserter function is value. + + Now, tm-mh-e is a only implementation for this function. + + +* changed points of tm-view + + Internal structure of tm-view 6.* is changed from tm-view 5.21, such +as, data structures, symbol names. I write main differences between tm +5.21. + +** internal structure + +*** content-info + + Buffer local variable of article buffer `mime/content-list', which +memorizes content structres of message in article buffer, is renamed +to `mime::article/content-info', and data structure is changed. + + Old data structure ``content-list'' used in buffer local variable +`mime/content-list' was a following list: + + content-list = (Ba Ea children) + + Ba: point-min of this content in article buffer + Ea: point-max of this content in article buffer + children: content-list's list of contents included in + this content. nil when this content is not + multipart + + + New data structure ``content-info'' used in buffer local variable +`mime::article/content-info' is following vector: + + content-info + = [point-min point-max type parameters encoding children] + + point-min: point-min of this content in article buffer + point-max: point-max of this content in article buffer + (This value is not equal Ea. + point-max = Ea + 1) + type: content-type/subtype of this content + parameters: assoc-list which represents parameters of + Content-Type field of this content + encoding: Content-Transfer-Encoding of this content + children: content-info's list of contents included + in this content. nil when this content is + not multipart + + + In tm-view 5.21, this data structure was generated and referenced by +list processing functions (basic lisp functions) dynamically. In +tm-view 6.*, however, it is generated by generator function +`mime::make-content-info', and it is referenced by reference functions +mime::content-info/FOO (FOO = { point-min | point-max | type | +parameters | encoding | children }). + + +*** preview-content-info + + Buffer local variable of preview buffer +`mime/preview-flat-content-list', which memorizes content structres of +message in preview buffer, is renamed to `mime::preview/content-list, +and data structure is changed. + + Old data structure used in buffer local variable +`mime/preview-flat-content-list' was a list which elements are +following list: + + (Bp Ep buf Ba Ea) + + Bp: point-min of this content in preview buffer + Ep: point-max of this content in preview buffer + buf: article buffer for this content + Ba: point-min of this content in article buffer + Ea: point-max of this content in article buffer + + + New data structure ``preview-content-info'' used in buffer local +variable `mime::preview/content-list'' is a list which elements are +following vector: + + [Bp Ep buf cinfo] + + Bp: point-min of this content in preview buffer + Ep: point-max of this content in preview buffer + buf: article buffer for this content + cinfo: content-info which represents this content + + + In tm-view 5.21, this data structure was generated and referenced by +list processing functions (basic lisp functions) dynamically. In +tm-view 6.*, however, it is generated by generator function +`mime::make-preview-content-info', and it is referenced by reference +functions mime::preview-content-info/FOO (FOO = { Bp | Ep | buf | +cinfo }). + + +*** etc + +- parser is changed + +- naming rule is changed + +- buffer local variable in article buffer `mime/preview-buffer' is + renamed to `mime::article/preview-buffer' + +- function `mime/exit-view-mode' is renamed to `mime-viewer/kill-buffer' + +- command functions of mime/viewer-mode are renamed from mime/FOO to + mime-viewer/FOO. (ex. `mime/up-content' --> `mime-viewer/up-content') + +- command function `mime/quit-view-mode' is renamed to `mime-viewer/quit' + +- etc... + + +** variables + +(1) variable `mime/content-filter-alist' is renamed to + `mime-viewer/content-filter-alist' + +(2) variable `mime/make-content-subject-function' is renamed to + `mime-viewer/content-subject-function' and arguments are changed + +(3) variable `mime/make-content-header-filter' is renamed to + `mime-viewer/content-header-filter-function' + +(4) variable `mime/default-showing-Content-Type-list' is renamed to + `mime-viewer/default-showing-Content-Type-list' + +(5) variable `mime/go-to-top-node-method-alist' is renamed to + `mime-viewer/quitting-method-alist' and changed initial value + because of changes between tm-view 5.21 and tm-view 6.*. + + +** new variables + +*** mime-viewer/childrens-header-showing-Content-Type-list + + list of content-type/subtype whose children's header should be +displayed. + + This variable is used in function +`mime-viewer/default-content-header-filter-function' which defined as +default value of variable +`mime-viewer/content-header-filter-function'. Therefore if you set +another function, it may not work this variable. + + +*** mime-viewer/ignored-field-list + + list of field-name which is not displayed when header is displayed. + + This variable is used in function +`mime-viewer/default-content-header-filter-function' which defined as +default value of variable +`mime-viewer/content-header-filter-function'. Therefore if you set +another function, it may not work this variable. diff --git a/doc/rel-6jp.ol b/doc/rel-6jp.ol new file mode 100644 index 0000000..dca39f1 --- /dev/null +++ b/doc/rel-6jp.ol @@ -0,0 +1,171 @@ +* tm/Makefile + + Emacs 19.* (Mule 2.*) では、tm の {byte-compile | install} を行う際 +に、tm-mh-e, tm-gnus の {byte-compile | install} も行います。 + + +* tm-comp + +** message/rfc822 + + MUA が保存している message を message/rfc822 形式で取り込むものを追 +加しました。関数名は tm-comp/insert-message で、標準の key bind は C-c +C-x m です。 + + 関数 tm-comp/insert-message は MUA 毎の message-inserter 関数を必要 +とします。message-inserter は変数 tm-comp/message-inserter-alist に登 +録されます。この変数は、major-mode が key で、それに対する値が +message-inserter 関数である連想リスト構造をしています。 + + 現在のところ、tm-mh-e のみ、この機能を実装しています。 + + +* tm-view の変更点について + + tm-view 6.* では内部構造が変更され、データ構造や symbol 名などが変更 +されています。以下では、tm-view 5.21 からの主な変更点を挙げます。 + +** 内部構造の変更 + +*** content-info + + article buffer において、message に含まれる content の構造を記憶する +buffer local 変数 mime/content-list を mime::article/content-info に改 +名し、データ構造を変更した。具体的には、従来、 + + content-list = (Ba Ea Children) + + 但し、 + Ba: article buffer でのこの content の先頭 point + Ea: article buffer でのこの content の末尾 point + Children: この content に含まれる content の情報。 + content-list を要素とする list で表し、 + multipart の content でない場合は nil が入る + +という list で表現していたのを、 + + content-info + = [point-min point-max type parameters encoding children] + + 但し、 + point-min: article buffer でのこの content の先頭 + point + point-max: article buffer でのこの content の末尾 + point(Ea とは異なり、point-min と + point-max で作られる region がその content + になるようになっている。point-max = Ea + 1 + の関係が成り立つ) + type: この content の content-type/subtype + parameters: この content の Content-Type field の + paraeter を表す連想リスト + encoding: この content の Content-Transfer-Encoding. + children: この content に含まれる content の情報。 + content-info を要素とする list で表し、 + multipart の content でない場合は nil が入る + +という vector で表現するようにした。 + + また、従来、list 処理関数を使って直接 list を生成・参照していたのを、 +生成関数 mime::make-content-info, 参照関数 mime::content-info/FOO (FOO += {point-min|point-max|type|parameters|encoding|children}) を使うよう +にした。 + + また、従来、Content-Type, Content-Transfer-Encoding field の情報をい +ちいち buffer を検索して求めていたのを、content-info を参照するように +した。 + +*** preview-content-info + + preview buffer において、message に含まれる content の構造を記憶する +buffer local 変数 mime/preview-flat-content-list を +mime::preview/content-list に改名し、データ構造を変更した。具体的には、 +従来、 + + (Bp Ep buf Ba Ea) + + 但し、 + Bp: preview buffer でのこの content の先頭 point + Ep: preview buffer でのこの content の末尾 point + buf: この content に対応する article buffer + Ba: article buffer でのこの content の先頭 point + Ea: article buffer でのこの content の末尾 point + +という list で表現していたのを、 + + [Bp Ep buf cinfo] + + 但し、 + Bp: preview buffer でのこの content の先頭 point + Ep: preview buffer でのこの content の末尾 point + buf: この content に対応する article buffer + cinfo: この content を表す content-info + +という vector で表現するようにした。 + + また、従来、list 処理関数を使って直接 list を生成・参照していたのを、 +生成関数 mime::make-preview-content-info, 参照関数 +mime::preview-content-info/FOO (FOO = {Bp|Ep|buf|cinfo}) を使うように +した。 + + +*** その他 + +・parser を変更した + +・命名規則を変更した + +・article buffer の buffer local 変数 mime/preview-buffer を + mime::article/preview-buffer に改名した。 + +・関数 mime/exit-view-mode を mime-viewer/kill-buffer に改名した。 + +・mime/viewer-mode の各関数を mime/FOO から mime-viewer/FOO に改名した。 + (例:mime/up-content → mime-viewer/up-content) + +・関数 mime/quit-view-mode を mime-viewer/quit に改名した。 + +・その他 + + +** 主な変数名の変更 + +(1) 変数 mime/content-filter-alist を mime-viewer/content-filter-alist + に改名した。 + +(2) 変数 mime/make-content-subject-function を + mime-viewer/content-subject-function に改名し、引数を変更した。 + +(3) 変数 mime/make-content-header-filter を + mime-viewer/content-header-filter-function に改名し、引数を変更し + た。 + +(4) 変数 mime/default-showing-Content-Type-list を + mime-viewer/default-showing-Content-Type-list に改名した。 + +(5) 変数 mime/go-to-top-node-method-alist を + mime-viewer/quitting-method-alist に改名した。また、symbol 名や仕 + 様の変更にともない、初期設定を変更した。 + + +** 新しい変数 + +*** 変数 mime-viewer/childrens-header-showing-Content-Type-list + + 子供の header を表示すべき content-type/subtype の list. + + この変数は、変数 mime-viewer/content-header-filter-function の既定値 +として定義されている関数 +mime-viewer/default-content-header-filter-function が参照しているので、 +もし、変数 mime-viewer/content-header-filter-function の値を別の関数に +すれば無効になる。 + + +*** 変数 mime-viewer/ignored-field-list + + header を表示する場合でも表示しない field の field-name の list. + + この変数は、変数 mime-viewer/content-header-filter-function の既定値 +として定義されている関数 +mime-viewer/default-content-header-filter-function が参照しているので、 +もし、変数 mime-viewer/content-header-filter-function の値を別の関数に +すれば無効になる。 diff --git a/doc/tm-eng.tex b/doc/tm-eng.tex index 877fc62..527b4cd 100644 --- a/doc/tm-eng.tex +++ b/doc/tm-eng.tex @@ -7,7 +7,7 @@ {\large translated by \Large Ueno Hiroshi} \\ {\normalsize $<$jl07715@yamato.ibm.co.jp$>$} } -\date{\verb$Id: tm-eng.tex,v 5.6 1995/01/09 20:35:16 morioka Exp $} +\date{\verb$Id: tm-eng.tex,v 5.7 1995/06/26 06:03:21 morioka Exp $} \begin{document} @@ -246,7 +246,7 @@ the functions and their key bindings which can be used in mime/viewer-mode. \bigskip \newcounter{asteriskcount} -\noindent{\bf [Note]} +\noindent{\bf [Note]} \vspace{-1ex} {\list{(*\arabic{asteriskcount})}{\usecounter{asteriskcount}\leftmargin=8ex} \item Not return to the Summary mode unless tm-view has been setup using diff --git a/gnus/d-path b/gnus/d-path index 939a8a0..2b993de 100644 --- a/gnus/d-path +++ b/gnus/d-path @@ -2,15 +2,16 @@ (setq load-path (append - '("." ".." "../../tl" - ;; - ;; (ding) GNUS path - ;; - ;; please edit this - ;; - "/usr/local/lib/emacs/site-lisp/dgnus/lisp" - ;; - ) + (mapcar (function + (lambda (path) + (expand-file-name path (getenv "PWD")) + )) + '("." ".." "../../tl/" "../../mel/")) + ;; + ;; (ding) GNUS path + ;; + ;; please edit this + ;; + '("/usr/local/lib/emacs/site-lisp/dgnus/lisp") + ;; load-path)) - - diff --git a/gnus/g3-path b/gnus/g3-path index 325f649..62523cc 100644 --- a/gnus/g3-path +++ b/gnus/g3-path @@ -5,13 +5,16 @@ ;;; (setq load-path (append - '("." ".." "../../tl" - ;; - ;; (ding) GNUS path - ;; - ;; please edit this - ;; - ;;"/usr/local/lib/emacs/local.lisp/gnus-3.14.4" - ;; - ) + (mapcar (function + (lambda (path) + (expand-file-name path (getenv "PWD")) + )) + '("." ".." "../../tl/" "../../mel/")) + ;; + ;; additional path + ;; + ;; please edit this + ;; + ;;'("/usr/local/lib/emacs/local.lisp/gnus-3.14.4") + ;; load-path)) diff --git a/gnus/g4-path b/gnus/g4-path index 00922bb..a0cf7a4 100644 --- a/gnus/g4-path +++ b/gnus/g4-path @@ -5,13 +5,16 @@ ;;; (setq load-path (append - '("." ".." "../../tl" - ;; - ;; (ding) GNUS path - ;; - ;; please edit this - ;; - ;;"/usr/local/lib/emacs/local.lisp/gnus-4.1/lisp - ;; - ) + (mapcar (function + (lambda (path) + (expand-file-name path (getenv "PWD")) + )) + '("." ".." "../../tl/" "../../mel/")) + ;; + ;; additional path + ;; + ;; please edit this + ;; + ;;'("/usr/local/lib/emacs/local.lisp/gnus-4.1/lisp") + ;; load-path)) diff --git a/make-lpath b/make-lpath index 41e2d32..737fbbe 100755 --- a/make-lpath +++ b/make-lpath @@ -4,6 +4,7 @@ echo "(setq load-path" > loadpath echo " (nconc '("'"."' >> loadpath echo ' "'`pwd`'"' >> loadpath echo ' "'`(cd ../tl; pwd)`'"' >> loadpath +echo ' "'`(cd ../mel; pwd)`'"' >> loadpath foreach i ($argv) echo ' "'$i'"' >> loadpath end diff --git a/mh-e/tm-mh-e.el b/mh-e/tm-mh-e.el index 3a4b886..87d73cc 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.20 1995/06/22 04:58:44 morioka Exp $") + "$Id: tm-mh-e.el,v 6.21 1995/06/22 12:02:13 morioka Exp $") (defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID)) @@ -302,6 +302,18 @@ With arg, turn MIME processing on if arg is positive." (define-key mh-letter-mode-map "\C-c\C-y" (function tm-mh-e/cite)) ))) +(defun tm-mh-e/summary-before-quit () + (let ((buf (get-buffer mh-show-buffer))) + (if buf + (save-window-excursion + (switch-to-buffer buf) + (if mime::article/preview-buffer + (if (setq buf (get-buffer mime::article/preview-buffer)) + (kill-buffer buf) + )))))) + +(add-hook 'mh-before-quit-hook (function tm-mh-e/summary-before-quit)) + (set-alist 'mime-viewer/quitting-method-alist 'mh-show-mode (function tm-mh-e/quitting-method)) diff --git a/tm-rich.el b/tm-rich.el index 8c2bfc3..ac1121e 100644 --- a/tm-rich.el +++ b/tm-rich.el @@ -1,15 +1,12 @@ ;;; -;;; $Id: tm-rich.el,v 6.0 1995/06/11 10:33:34 morioka Exp $ +;;; $Id: tm-rich.el,v 6.2 1995/06/24 05:04:05 morioka Exp $ ;;; ;;; by MORIOKA Tomohiko ;;; modified by YAMATE Keiichirou ;;; -(provide 'tm-rich) - (require 'tm-view) - (defvar mime/text/richtext-face-list '("bold" "italic" "fixed" "underline")) @@ -17,17 +14,12 @@ '("bold" "italic" "fixed" "underline")) -(cond ((and (>= (string-to-int emacs-version) 19) window-system) - (require 'hilit19) +(cond ((and (>= emacs-major-version 19) window-system) (defun mime/set-face-region (b e face) (let ((sym (intern face))) - (if (eq sym 'italic) - (setq sym 'modeline) - ) (if (member sym (face-list)) - (progn - (hilit-unhighlight-region b e) - (hilit-region-set-face b e sym) + (let ((overlay (make-overlay b e))) + (overlay-put overlay 'face 'bold) )))) ) ((and (boundp 'NEMACS) NEMACS) @@ -44,8 +36,7 @@ beg end)) ) (t - (setq mime/text/richtext-face-list - nil) + (setq mime/text/richtext-face-list nil) (defun mime/set-face-region (beg end sym) ) )) @@ -191,3 +182,8 @@ (set-alist 'mime-viewer/content-filter-alist "text/enriched" (function mime-viewer/filter-text/enriched)) + + +(run-hooks 'tm-rich-load-hook) + +(provide 'tm-rich) diff --git a/tm-rmail.el b/tm-rmail.el index d1e1d76..e771e0a 100644 --- a/tm-rmail.el +++ b/tm-rmail.el @@ -1,15 +1,46 @@ ;;; -;;; $Id: tm-rmail.el,v 5.1 1994/10/17 06:31:29 morioka Exp $ +;;; $Id: tm-rmail.el,v 6.5 1995/06/26 06:58:11 morioka Exp $ ;;; -(provide 'tm-rmail) +(require 'tl-header) +(require 'tl-list) +(require 'tl-misc) -(if (< (string-to-int emacs-version) 19) - (require 'tl-18) - ) (autoload 'mime/viewer-mode "tm-view" "View MIME message." t) (autoload 'mime/decode-message-header "tiny-mime" "Decode MIME header." t) +(defun tm-rmail/show-all-header-p () + (save-restriction + (narrow-to-region (point-min) + (and (re-search-forward "^$" nil t) + (match-beginning 0))) + (goto-char (point-min)) + (re-search-forward rmail-ignored-headers nil t) + )) + +(defun tm-rmail/view-message () + (interactive) + (let ((ret (rmail-widen-to-current-msgbeg + (function + (lambda () + (cons (mime/Content-Type (mail-fetch-field "Content-Type")) + (mail-fetch-field "Content-Transfer-Encoding")) + ))))) + (mime/viewer-mode nil (car ret)(cdr ret)) + )) + +(defun tm-rmail/quitting-method-to-summary () + (mime-viewer/kill-buffer) + (rmail-summary) + (delete-other-windows) + ) + +(defun tm-rmail/quitting-method-to-article () + (mime-viewer/kill-buffer) + ) + +(defalias 'tm-rmail/quitting-method 'tm-rmail/quitting-method-to-article) + (add-hook 'rmail-show-message-hook (function (lambda () @@ -22,7 +53,7 @@ (add-hook 'rmail-mode-hook (function (lambda () - (local-set-key "v" 'mime/viewer-mode) + (local-set-key "v" (function tm-rmail/view-message)) ))) (add-hook 'rmail-summary-mode-hook @@ -33,6 +64,18 @@ (lambda () (interactive) (pop-to-buffer rmail-buffer) - (mime/viewer-mode) + (tm-rmail/view-message) ))) ))) + +(call-after-loaded 'tm-view + (function + (lambda () + (set-alist 'mime-viewer/quitting-method + 'rmail-mode + (function tm-rmail/quitting-method)) + ))) + +(provide 'tm-rmail) + +(run-hooks 'tm-rmail-load-hook) diff --git a/tm-view.el b/tm-view.el index 4110f29..ea5b3a8 100644 --- a/tm-view.el +++ b/tm-view.el @@ -4,16 +4,15 @@ ;;; by Morioka Tomohiko, 1994/07/13 ;;; -(provide 'tm-view) - - ;;; @ require modules ;;; (require 'tl-str) (require 'tl-list) +(require 'tl-atype) (require 'tl-misc) (require 'tl-header) +(require 'mel) (require 'tiny-mime) (require 'tm-misc) @@ -22,7 +21,7 @@ ;;; (defconst mime-viewer/RCS-ID - "$Id: tm-view.el,v 6.58 1995/06/22 04:11:58 morioka Exp $") + "$Id: tm-view.el,v 6.63 1995/06/25 21:33:51 morioka Exp $") (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID)) (defconst mime/viewer-version mime-viewer/version) @@ -258,15 +257,8 @@ (gnus-summary-select-article nil t) )) -(defun mime::viewer/quitting-method-for-rmail () - (mime-viewer/kill-buffer) - (rmail-summary) - (delete-other-windows) - ) - (defvar mime-viewer/quitting-method-alist '((gnus-article-mode . mime::viewer/quitting-method-for-gnus4) - (rmail-mode . mime::viewer/quitting-method-for-rmail) (mime/show-message-mode . (lambda () (set-window-configuration @@ -542,6 +534,9 @@ it is regarded as current-buffer. [tm-view]" (setq mime::preview/original-major-mode mode) (setq major-mode 'mime/viewer-mode) (setq mode-name "MIME-View") + (make-variable-buffer-local 'outline-regexp) + ;;(setq outline-regexp "\\[.*\\]\\|\C-L") + ;;(outline-minor-mode t) (setq dest (mapcar (function @@ -550,6 +545,7 @@ it is regarded as current-buffer. [tm-view]" (end (mime::content-info/point-max cell)) (ctype (mime::content-info/type cell)) (params (mime::content-info/parameters cell)) + (encoding (mime::content-info/encoding cell)) he cnum e nb ne subj str) (setq cnum (mime::get-point-content-number beg cinfo)) (switch-to-buffer the-buf) @@ -698,40 +694,6 @@ it is regarded as current-buffer. [tm-view]" ;;; @ decoder ;;; -(defun mime/Quoted-Printable-decode-region (beg end) - (interactive "*r") - (save-excursion - (save-restriction - (narrow-to-region beg end) - (goto-char (point-min)) - (while (re-search-forward "=\n" nil t) - (replace-match "") - ) - (goto-char (point-min)) - (let (b e str) - (while (re-search-forward mime/Quoted-Printable-octet-regexp nil t) - (setq b (match-beginning 0)) - (setq e (match-end 0)) - (setq str (buffer-substring b e)) - (delete-region b e) - (insert (mime/Quoted-Printable-decode-string str)) - )) - ))) - -(defun mime/Base64-decode-region (beg end) - (interactive "*r") - (save-excursion - (save-restriction - (narrow-to-region beg end) - (goto-char (point-min)) - (while (search-forward "\n" nil t) - (replace-match "") - ) - (let ((str (buffer-substring (point-min)(point-max)))) - (delete-region (point-min)(point-max)) - (insert (mime/base64-decode-string str)) - )))) - (defun mime/make-method-args (cal format) (mapcar (function (lambda (arg) @@ -910,10 +872,10 @@ it is regarded as current-buffer. [tm-view]" ) (goto-char (point-min)) (cond ((string= encoding "quoted-printable") - (mime/Quoted-Printable-decode-region beg end) + (quoted-printable-decode-region beg end) ) ((string= encoding "base64") - (mime/Base64-decode-region beg end) + (base64-decode-region beg end) )) (let* ((mode mime::preview/original-major-mode) (m (assq mode mime-viewer/code-converter-alist)) @@ -923,6 +885,7 @@ it is regarded as current-buffer. [tm-view]" (mime-viewer/default-code-convert-region beg (point-max) charset encoding) ))) + ;;(hide-sublevels 1) (run-hooks 'mime-viewer/plain-text-preview-hook) ) @@ -1160,7 +1123,9 @@ q Quit (forward-line h) (if (> (point) np) (goto-char np) - ))) + ) + ;;(show-subtree) + )) (defun mime-viewer/scroll-down-content (&optional h) (interactive) @@ -1222,4 +1187,10 @@ q Quit (kill-buffer (current-buffer)) ) + +;;; @ end +;;; + +(provide 'tm-view) + (run-hooks 'tm-view-load-hook) -- 1.7.10.4