From: morioka Date: Mon, 9 Mar 1998 11:28:01 +0000 (+0000) Subject: tm 7.23. X-Git-Tag: tm7_23~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b8e54451b6d4b008a242a124e6233b77f6b2506;p=elisp%2Ftm.git tm 7.23. --- diff --git a/Changes-7.23.en b/Changes-7.23.en new file mode 100644 index 0000000..2c02cd8 --- /dev/null +++ b/Changes-7.23.en @@ -0,0 +1,182 @@ +* tl + + Attached version 7.01.4. + + +* tm + +tm/tm-def.el +---------------------------- +revision 7.1 +date: 1995/11/10 10:43:15; author: morioka; state: Exp; lines: +56 -1 +Function `mime-editor/caesar-region' was moved from tm-edit.el, and +defined as `tm:caesar-region'. +---------------------------- + +tm/tm-edit.el +---------------------------- +revision 7.23 +date: 1995/11/11 12:48:30; author: morioka; state: Exp; lines: +2 -25 +Function `rfc822/get-header-string-except' was moved to tl-822.el. +---------------------------- +revision 7.22 +date: 1995/11/11 11:53:08; author: morioka; state: Exp; lines: +10 -24 +(1) Variable `mime-editor/message-sender-alist' was renamed to + `mime-editor/split-message-sender-alist'. +(2) Variable `mime-editor/message-before-send-hook-alist' and variable + `mime-editor/message-after-send-hook-alist' were abolished. (They + have not already been used.) +---------------------------- +revision 7.21 +date: 1995/11/11 11:31:31; author: morioka; state: Exp; lines: +34 -13 +Variable `mime-editor/blind-fields-regexp' was renamed to +`mime-editor/split-blind-fields-regexp'. +---------------------------- +revision 7.20 +date: 1995/11/11 11:16:47; author: morioka; state: Exp; lines: +18 -17 +Constant `mime-editor/message-nuke-headers' was renamed to +`mime-editor/split-ignored-fields-regexp'. +---------------------------- +revision 7.19 +date: 1995/11/11 10:50:07; author: morioka; state: Exp; lines: +4 -4 +Variable `mime-editor/ignored-fields-regexp' was renamed to +`mime-editor/yank-ignored-fields-regexp'. +---------------------------- +revision 7.18 +date: 1995/11/10 12:43:39; author: morioka; state: Exp; lines: +19 -4 +(1) Variable `mime-editor/mail-inserter-alist' and function + `mime-editor/insert-mail' were added. +(2) Key of function `mime-editor/insert-tag' was changed to `C-c C-x + t', and function `mime-editor/mail-inserter-alist was bound to + `C-c C-x C-m'. +---------------------------- +revision 7.17 +date: 1995/11/10 11:51:23; author: morioka; state: Exp; lines: +24 -2 +Variable `mime-editor/ignored-fields-regexp' and function +`mime-editor/inserted-message-filter' were added. +---------------------------- +revision 7.16 +date: 1995/11/10 10:43:50; author: morioka; state: Exp; lines: +6 -57 +Function `mime-editor/caesar-region' was moved to tm-def.el. +---------------------------- + +tm/tm-play.el +---------------------------- +revision 7.1 +date: 1995/11/10 11:13:32; author: morioka; state: Exp; lines: +20 -2 +Function `mime-article/view-message/rfc822' was moved from +tm-mail.el. tm-mail.el was abolished. +---------------------------- +revision 7.0 +date: 1995/11/10 10:54:46; author: morioka; state: Exp; lines: +16 -1 +Function `mime-viewer/quitting-method-for-mime/show-message-mode' was +moved from tm-view.el. +---------------------------- +revision 6.0 +date: 1995/11/10 10:44:54; author: morioka; state: Exp; lines: +35 -1 +function `mime-article/decode-caesar' was moved from tm-mail.el. +---------------------------- +revision 5.0 +date: 1995/11/08 07:32:41; author: morioka; state: Exp; lines: +26 -2 +Variable `mime-article/coding-system-alist' and variable +`mime-article/kanji-code-alist' were added. In function +`mime-article/decode-message/partial', they were used as character +coding system when partial part was wrote. +---------------------------- + +tm/tm-rmail.el +---------------------------- +revision 7.15 +date: 1995/11/12 15:15:15; author: morioka; state: Exp; lines: +3 -2 +Function `tm-rmail/preview-message' was fixed problem of judgement of +unnecessary null line. +---------------------------- +revision 7.14 +date: 1995/11/10 10:04:18; author: morioka; state: Exp; lines: +8 -1 +Function `tm-rmail/preview-message' was modified to narrow to remove +unnecessary null line added by RMAIL. +---------------------------- +revision 7.13 +date: 1995/11/09 17:58:49; author: morioka; state: Exp; lines: +2 -2 +Function `tm-rmail/preview-message' was modified to use function +`mime/Content-Transfer-Encoding'. (measure for Emacs 19.29 text +property) +---------------------------- + +tm/tm-view.el +---------------------------- +revision 7.23 +date: 1995/11/10 11:15:31; author: morioka; state: Exp; lines: +11 -12 +(1) Function `mime-viewer/quitting-method-for-mime/show-message-mode' + was moved to tm-play.el. +(2) setting for function `mime-article/decode-caesar' and function + `mime-article/view-message/rfc822'. +---------------------------- + + +* tm/gnus + + Attached version 7.15. + +tm/gnus/tm-gnus.el +---------------------------- +revision 7.4 +date: 1995/11/13 09:28:17; author: morioka; state: Exp; lines: +2 -2 +Variable `mime-editor/ignored-fields-regexp' was renamed to +`mime-editor/yank-ignored-fields-regexp'. +---------------------------- +revision 7.3 +date: 1995/11/11 10:48:11; author: morioka; state: Exp; lines: +3 -3 +Function `tm-gnus/yank-message' was renamed to `tm-gnus/insert-article'. +---------------------------- +revision 7.2 +date: 1995/11/11 10:45:21; author: morioka; state: Exp; lines: +21 -21 +Function `tm-gnus/yank-message' was modified to change `let*' to `let'. +---------------------------- +revision 7.1 +date: 1995/11/11 10:33:08; author: morioka; state: Exp; lines: +42 -2 +New function `tm-gnus/yank-message'. setting for tm-edit.el. +---------------------------- + +tm/gnus/tm-gnus5.el +---------------------------- +revision 7.8 +date: 1995/11/10 10:07:15; author: morioka; state: Exp; lines: +38 -4 +(1) fixed problem of judgement of automatic MIME preview mode. +(2) redefine function `gnus-article-setup-buffer'. +---------------------------- + +tm/gnus/tm-sgnus.el +---------------------------- +revision 7.14 +date: 1995/11/10 10:09:52; author: morioka; state: Exp; lines: +12 -4 +fixed problem of judgement of automatic MIME preview mode. +---------------------------- + + +* tm/mh-e + + Attached version 7.16. + +tm/mh-e/tm-mh-e.el +---------------------------- +revision 7.16 +date: 1995/11/11 13:02:40; author: morioka; state: Exp; lines: +7 -2 +In function `tm-mh-e/view-message', judgement which preview +buffer was exist or not was fixed. +---------------------------- +revision 7.15 +date: 1995/11/11 10:42:32; author: morioka; state: Exp; lines: +2 -2 +Function `tm-mh-e/prompt-for-message' was fixed to check buffer local +variable `mh-sent-from-msg' is bound. +---------------------------- +revision 7.14 +date: 1995/11/10 12:47:01; author: morioka; state: Exp; lines: +7 -2 +setting to use function `tm-mh-e/insert-message' as mail-inserter for +mh-letter-mode and news-reply-mode. +---------------------------- +revision 7.13 +date: 1995/11/10 12:00:58; author: morioka; state: Exp; lines: +2 -1 +Function `tm-mh-e/insert-message' was modified to call function +`mime-editor/inserted-message-filter'. +---------------------------- diff --git a/Changes-7.23.ja b/Changes-7.23.ja new file mode 100644 index 0000000..349c73d --- /dev/null +++ b/Changes-7.23.ja @@ -0,0 +1,185 @@ +* tl + + Version 7.01.4 を添付した。 + + +* tm + +tm/tm-def.el +---------------------------- +revision 7.1 +date: 1995/11/10 10:43:15; author: morioka; state: Exp; lines: +56 -1 +関数 mime-editor/caesar-region を tm-edit.el から移し、 +`tm:caesar-region' として定義した。 +---------------------------- + +tm/tm-edit.el +---------------------------- +revision 7.23 +date: 1995/11/11 12:48:30; author: morioka; state: Exp; lines: +2 -25 +関数 rfc822/get-header-string-except を tl-822.el に移した。 +---------------------------- +revision 7.22 +date: 1995/11/11 11:53:08; author: morioka; state: Exp; lines: +10 -24 +(1) 変数 mime-editor/message-sender-alist を + `mime-editor/split-message-sender-alist' に改名した。 +(2) 変数 mime-editor/message-before-send-hook-alist と変数 + mime-editor/message-after-send-hook-alist を廃止した。(既に使って + いなかったため) +---------------------------- +revision 7.21 +date: 1995/11/11 11:31:31; author: morioka; state: Exp; lines: +34 -13 +変数 mime-editor/blind-fields-regexp を +`mime-editor/split-blind-fields-regexp' に改名した。 +---------------------------- +revision 7.20 +date: 1995/11/11 11:16:47; author: morioka; state: Exp; lines: +18 -17 +定数 mime-editor/message-nuke-headers を +`mime-editor/split-ignored-fields-regexp' に改名した。 +---------------------------- +revision 7.19 +date: 1995/11/11 10:50:07; author: morioka; state: Exp; lines: +4 -4 +変数 mime-editor/ignored-fields-regexp を +`mime-editor/yank-ignored-fields-regexp' に改名した。 +---------------------------- +revision 7.18 +date: 1995/11/10 12:43:39; author: morioka; state: Exp; lines: +19 -4 +(1) 変数 mime-editor/mail-inserter-alist と関数 + mime-editor/insert-mail を追加した。 +(2) 関数 mime-editor/insert-tag の key を C-c C-x t に変更し、C-c C-x + C-m に関数 mime-editor/mail-inserter-alist を割り当てた。 +---------------------------- +revision 7.17 +date: 1995/11/10 11:51:23; author: morioka; state: Exp; lines: +24 -2 +変数 mime-editor/ignored-fields-regexp と関数 +mime-editor/inserted-message-filter を追加した。 +---------------------------- +revision 7.16 +date: 1995/11/10 10:43:50; author: morioka; state: Exp; lines: +6 -57 +関数 mime-editor/caesar-region を tm-def.el に移した。 +---------------------------- + +tm/tm-play.el +---------------------------- +revision 7.1 +date: 1995/11/10 11:13:32; author: morioka; state: Exp; lines: +20 -2 +関数 mime-article/view-message/rfc822 を tm-mail.el から移し、 +tm-mail.el を廃止した。 +---------------------------- +revision 7.0 +date: 1995/11/10 10:54:46; author: morioka; state: Exp; lines: +16 -1 +関数 mime-viewer/quitting-method-for-mime/show-message-mode を +tm-view.el から移した。 +---------------------------- +revision 6.0 +date: 1995/11/10 10:44:54; author: morioka; state: Exp; lines: +35 -1 +関数 mime-article/decode-caesar を tm-mail.el から移した。 +---------------------------- +revision 5.0 +date: 1995/11/08 07:32:41; author: morioka; state: Exp; lines: +26 -2 +変数 mime-article/coding-system-alist と変数 +mime-article/kanji-code-alist を設け、関数 +mime-article/decode-message/partial で partial part を書き出す時の文字 +code としてこれを用いることにした。 +---------------------------- + +tm/tm-rmail.el +---------------------------- +revision 7.15 +date: 1995/11/12 15:15:15; author: morioka; state: Exp; lines: +3 -2 +関数 tm-rmail/preview-message において、余分な空行の判定に関する不具合 +を修正した。 +---------------------------- +revision 7.14 +date: 1995/11/10 10:04:18; author: morioka; state: Exp; lines: +8 -1 +関数 tm-rmail/preview-message で、RMAIL が余分につける空行を除いた領域 +に mime/viewer-mode を実行するようにした。 +---------------------------- +revision 7.13 +date: 1995/11/09 17:58:49; author: morioka; state: Exp; lines: +2 -2 +関数 tm-rmail/preview-message で関数 mime/Content-Transfer-Encoding を +使うようにした。 +---------------------------- + +tm/tm-view.el +---------------------------- +revision 7.23 +date: 1995/11/10 11:15:31; author: morioka; state: Exp; lines: +11 -12 +(1) 関数 mime-viewer/quitting-method-for-mime/show-message-mode を + tm-play.el に移した。 +(2) 関数 mime-article/decode-caesar と関数 + mime-article/view-message/rfc822 の設定を行った。 +---------------------------- + + +* tm/gnus + + Version 7.15 を添付した。 + +tm/gnus/tm-gnus.el +---------------------------- +revision 7.4 +date: 1995/11/13 09:28:17; author: morioka; state: Exp; lines: +2 -2 +変数 mime-editor/ignored-fields-regexp を +`mime-editor/yank-ignored-fields-regexp' に改名した。 +---------------------------- +revision 7.3 +date: 1995/11/11 10:48:11; author: morioka; state: Exp; lines: +3 -3 +関数 tm-gnus/yank-message を `tm-gnus/insert-article' に改名した。 +---------------------------- +revision 7.2 +date: 1995/11/11 10:45:21; author: morioka; state: Exp; lines: +21 -21 +関数 tm-gnus/yank-message で `let*' を `let' に変えた。 +---------------------------- +revision 7.1 +date: 1995/11/11 10:33:08; author: morioka; state: Exp; lines: +42 -2 +関数 tm-gnus/yank-message を追加し、tm-edit.el 用の設定を行った。 +---------------------------- + +tm/gnus/tm-gnus5.el +---------------------------- +revision 7.8 +date: 1995/11/10 10:07:15; author: morioka; state: Exp; lines: +38 -4 +(1) automatic MIME preview mode の判定に関する不具合を修正した。 +(2) 関数 gnus-article-setup-buffer を再定義するようにした。 +---------------------------- + +tm/gnus/tm-sgnus.el +---------------------------- +revision 7.15 +date: 1995/11/13 09:29:19; author: morioka; state: Exp; lines: +9 -5 +automatic MIME preview mode の判定結果を変数 +tm-gnus/automatic-mime-preview に保存するようにした。 +---------------------------- +revision 7.14 +date: 1995/11/10 10:09:52; author: morioka; state: Exp; lines: +12 -4 +automatic MIME preview mode の判定に関する不具合を修正した。 +---------------------------- + + +* tm/mh-e + + Version 7.16 を添付した。 + +tm/mh-e/tm-mh-e.el +---------------------------- +revision 7.16 +date: 1995/11/11 13:02:40; author: morioka; state: Exp; lines: +7 -2 +関数 tm-mh-e/view-message での preview buffer が存在しているかどうかの +判定の不具合を修正した。 +---------------------------- +revision 7.15 +date: 1995/11/11 10:42:32; author: morioka; state: Exp; lines: +2 -2 +関数 tm-mh-e/prompt-for-message で buffer local 変数 mh-sent-from-msg +が束縛されているかどうかの check を行うようにした。 +---------------------------- +revision 7.14 +date: 1995/11/10 12:47:01; author: morioka; state: Exp; lines: +7 -2 +mh-letter-mode と news-reply-mode に対する mail-inserter として、関数 +tm-mh-e/insert-message を使うように設定した。 +---------------------------- +revision 7.13 +date: 1995/11/10 12:00:58; author: morioka; state: Exp; lines: +2 -1 +関数 tm-mh-e/insert-message で関数 mime-editor/inserted-message-filter +を呼ぶことにした。 +---------------------------- diff --git a/Makefile b/Makefile index 8ce3c65..8568aca 100644 --- a/Makefile +++ b/Makefile @@ -1,26 +1,27 @@ # -# $Id: Makefile,v 7.1 1995/10/03 05:14:34 morioka Exp morioka $ +# $Id: Makefile,v 7.2 1995/11/11 13:21:34 morioka Exp morioka $ # include config.tm -UTILS = ol2 decode-b +UTILS = src/ol2 src/decode-b GOMI = $(UTILS) *.elc loadpath -TM_FILES = tm/README.eng tm/rel-*.ol tm/Changes* \ +TM_FILES = tm/README.eng tm/Changes* \ tm/config.tm tm/Makefile tm/mk-tm \ tm/tm-mule.el tm/tm-nemacs.el tm/tm-orig.el tm/tm-def.el \ tm/tm-eword.el tm/tm-ew-d.el tm/tm-ew-e.el \ tm/tm-view.el tm/tm-parse.el tm/tm-play.el \ - tm/tm-partial.el tm/tm-mail.el \ + tm/tm-partial.el \ tm/tm-ftp.el tm/tm-latex.el tm/tm-w3.el tm/tm-file.el \ tm/tm-tar.el \ tm/tm-rich.el tm/richtext.el tm/tinyrich.el \ tm/tm-edit.el tm/signature.el \ tm/tm-setup.el tm/mime-setup.el \ - tm/sc-setup.el tm/gnushook.el \ - tm/*.c tm/methods/tm* \ - tm/doc/Makefile tm/doc/*.pln tm/doc/*.ol tm/doc/*.tex \ + tm/sc-setup.el \ + tm/methods/tm* \ + tm/src/*.c \ + tm/doc/Makefile tm/doc/*.ol tm/doc/*.tex \ tm/doc/*.texi TM_MUA_FILES = tm/tm-rmail.el tm/tm-vm.el \ @@ -36,7 +37,7 @@ TL_FILES = tl/README.eng tl/Makefile tl/mk-tl tl/*.el tl/doc/*.texi \ FILES = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES) -TARFILE = tm7.22.tar +TARFILE = tm7.23.tar.gz nemacs: @@ -125,11 +126,11 @@ install-mule2: mule2 all: $(UTILS) $(DVI) -ol2: ol2.c - $(CC) $(CFLAGS) ol2.c -o ol2 +src/ol2: src/ol2.c + $(CC) $(CFLAGS) src/ol2.c -o src/ol2 -decode-b: decode-b.c - $(CC) $(CFLAGS) decode-b.c -o decode-b +src/decode-b: src/decode-b.c + $(CC) $(CFLAGS) src/decode-b.c -o src/decode-b tex: ol2 @@ -157,4 +158,4 @@ clean: tar: cd doc; make tex - cd ..; tar cvf $(TARFILE) $(FILES); gzip -9 $(TARFILE) + cd ..; gtar cvzf $(TARFILE) $(FILES) diff --git a/gnus/Makefile b/gnus/Makefile index 4574af6..061bfd9 100644 --- a/gnus/Makefile +++ b/gnus/Makefile @@ -17,7 +17,7 @@ TMDIR19 = $(HOME)/lib/emacs19/lisp FILES = tm/gnus/*.el tm/doc/tm-gnus*.texi -TARFILE = tm-gnus7.12.1.tar +TARFILE = tm-gnus7.15.tar gnus3: diff --git a/gnus/g5-path b/gnus/g5-path index d2567ac..60c90bd 100644 --- a/gnus/g5-path +++ b/gnus/g5-path @@ -12,6 +12,6 @@ ;; ;; please edit this ;; - '("/usr/local/lib/emacs/site-lisp/gnus-5.0.10/lisp") + '("/usr/local/lib/emacs/site-lisp/gnus-5.0.12/lisp") ;; load-path)) diff --git a/gnus/gnushook.el b/gnus/gnushook.el new file mode 100644 index 0000000..c455f72 --- /dev/null +++ b/gnus/gnushook.el @@ -0,0 +1,52 @@ +;;; +;;; $Id: gnushook.el,v 1.1 1994/10/25 06:42:57 morioka Exp morioka $ +;;; + +(provide 'gnushook) + +(require 'gnus) + +(cond ((string-match "^GNUS 3" gnus-version) + (if (and (null gnus-Startup-hook) + (boundp 'gnus-startup-hook)) + (setq gnus-Startup-hook gnus-startup-hook) + ) + (if (and (null gnus-Select-group-hook) + (boundp 'gnus-select-group-hook)) + (setq gnus-Select-group-hook gnus-select-group-hook) + ) + (if (and (null gnus-Subject-mode-hook) + (boundp 'gnus-summary-mode-hook)) + (setq gnus-Subject-mode-hook gnus-summary-mode-hook) + ) + (if (and (null gnus-Article-mode-hook) + (boundp 'gnus-article-mode-hook)) + (setq gnus-Article-mode-hook gnus-article-mode-hook) + ) + (if (and (null gnus-Article-prepare-hook) + (boundp 'gnus-article-prepare-hook)) + (setq gnus-Article-prepare-hook gnus-article-prepare-hook) + ) + ) + ((string-match "^GNUS 4" gnus-version) + (if (and (null gnus-startup-hook) + (boundp 'gnus-Startup-hook)) + (setq gnus-startup-hook gnus-Startup-hook) + ) + (if (and (null gnus-select-group-hook) + (boundp 'gnus-Select-group-hook)) + (setq gnus-select-group-hook gnus-Select-group-hook) + ) + (if (and (null gnus-summary-mode-hook) + (boundp 'gnus-Subject-mode-hook)) + (setq gnus-summary-mode-hook gnus-Subject-mode-hook) + ) + (if (and (null gnus-article-mode-hook) + (boundp 'gnus-Article-mode-hook)) + (setq gnus-article-mode-hook gnus-Article-mode-hook) + ) + (if (and (null gnus-article-prepare-hook) + (boundp 'gnus-Article-prepare-hook)) + (setq gnus-article-prepare-hook gnus-Article-prepare-hook) + ) + )) diff --git a/gnus/mk-tgnus b/gnus/mk-tgnus index 8adb000..6879d5e 100644 --- a/gnus/mk-tgnus +++ b/gnus/mk-tgnus @@ -1,11 +1,13 @@ ;;; -*-Emacs-Lisp-*- (require 'emu) -(require 'tm-partial) (defun compile-tm-gnus () (require 'gnus) + (require 'tm-gnus) (require 'tm-view) + (require 'tm-partial) + (require 'tm-edit) (princ (format "%s\n" gnus-version)) (cond ((boundp 'gnus-original-article-buffer) (byte-compile-file "tm-sgnus.el") diff --git a/gnus/tm-gnus.el b/gnus/tm-gnus.el index 657d1cd..1191297 100644 --- a/gnus/tm-gnus.el +++ b/gnus/tm-gnus.el @@ -6,7 +6,7 @@ ;;; ;;; Author: Morioka Tomohiko ;;; Version: -;;; $Id: tm-gnus.el,v 7.0 1995/10/29 09:13:16 morioka Exp $ +;;; $Id: tm-gnus.el,v 7.4 1995/11/13 09:28:17 morioka Exp $ ;;; Keywords: news, MIME, multimedia, encoded-word, multilingual ;;; ;;; This file is part of tm (Tools for MIME). @@ -36,11 +36,51 @@ ((string-match "^GNUS 4" gnus-version) (require 'tm-gnus4) ) - ((string-match "^GNUS [0-3]" gnus-version) + ((string-match "^GNUS 3" gnus-version) (require 'tm-gnus3) + (defvar gnus-article-buffer gnus-Article-buffer) )) +;;; @ for tm-edit +;;; +;; suggested by OKABE Yasuo +;; 1995/11/08 (c.f. [tm ML:1067]) +(defun tm-gnus/insert-article (&optional message) + (interactive) + (let (;; for Emacs 19 + (mail-citation-hook '(mime-editor/inserted-message-filter)) + news-reply-header-hook + mail-yank-hooks + + ;; for Emacs 18 + (mail-yank-ignored-headers mime-editor/yank-ignored-fields-regexp) + (news-make-reply-yank-header (function + (lambda (message-id from) "") + )) + (news-yank-original-quoting-indicator "") + + ;; select raw article buffer + (mail-reply-buffer + (save-excursion + (set-buffer gnus-article-buffer) + (if (eq major-mode 'mime/viewer-mode) + mime::preview/article-buffer + gnus-article-buffer))) + ) + (news-reply-yank-original 0) + )) + +(call-after-loaded + 'tm-edit + (function + (lambda () + (set-alist + 'mime-editor/message-inserter-alist + 'news-reply-mode (function tm-gnus/insert-article)) + ))) + + ;;; @ end ;;; diff --git a/gnus/tm-gnus5.el b/gnus/tm-gnus5.el index 2065e8b..f92c6a0 100644 --- a/gnus/tm-gnus5.el +++ b/gnus/tm-gnus5.el @@ -22,7 +22,7 @@ ;;; (defconst tm-gnus/RCS-ID - "$Id: tm-gnus5.el,v 7.7 1995/10/31 15:24:49 morioka Exp $") + "$Id: tm-gnus5.el,v 7.8 1995/11/10 10:07:15 morioka Exp $") (defconst tm-gnus/version (concat (get-version-string tm-gnus/RCS-ID) " for GNUS 5.0.x")) @@ -75,7 +75,12 @@ This variable is set to `gnus-show-mime'.") (defun tm-gnus/summary-toggle-header (&optional arg) (interactive "P") - (if gnus-show-mime + (if (and gnus-show-mime + (or (not gnus-strict-mime) + (save-excursion + (set-buffer gnus-article-buffer) + (gnus-fetch-field "Mime-Version") + ))) (let ((mime-viewer/ignored-field-list (if (save-excursion (set-buffer gnus-article-buffer) @@ -173,6 +178,7 @@ This variable is set to `gnus-show-mime'.") (kill-buffer tm-gnus/original-article-buffer) ) (rename-buffer tm-gnus/original-article-buffer) + (gnus-article-mode) (set-buffer (get-buffer-create gnus-article-buffer)) (make-local-variable 'tm:mother-button-dispatcher) (setq tm:mother-button-dispatcher @@ -182,6 +188,31 @@ This variable is set to `gnus-show-mime'.") (run-hooks 'tm-gnus/article-prepare-hook) ) +(or (fboundp 'tm::gnus-article-setup-buffer) + (fset 'tm::gnus-article-setup-buffer + (symbol-function 'gnus-article-setup-buffer) + )) + +(defun gnus-article-setup-buffer () + "Initialize article mode buffer." + ;; Returns the article buffer. + (if (get-buffer gnus-article-buffer) + (save-excursion + (set-buffer gnus-article-buffer) + (buffer-disable-undo (current-buffer)) + (setq buffer-read-only t) + (gnus-add-current-to-buffer-list) + (or (eq major-mode 'gnus-article-mode) + (eq major-mode 'mime/viewer-mode) + (gnus-article-mode)) + (current-buffer)) + (save-excursion + (set-buffer (get-buffer-create gnus-article-buffer)) + (gnus-add-current-to-buffer-list) + (gnus-article-mode) + (current-buffer) + ))) + (setq gnus-show-mime-method (function tm-gnus/preview-article)) (or (fboundp 'tm::gnus-article-hide-headers-if-wanted) @@ -190,9 +221,12 @@ This variable is set to `gnus-show-mime'.") ) (defun gnus-article-hide-headers-if-wanted () - (if (not gnus-show-mime) + (or (and gnus-show-mime + (or (not gnus-strict-mime) + (gnus-fetch-field "Mime-Version") + )) (tm::gnus-article-hide-headers-if-wanted) - )) + )) ;;; @ for mh-e diff --git a/gnus/tm-sgnus.el b/gnus/tm-sgnus.el index 13f182e..23afbaa 100644 --- a/gnus/tm-sgnus.el +++ b/gnus/tm-sgnus.el @@ -21,7 +21,7 @@ ;;; (defconst tm-gnus/RCS-ID - "$Id: tm-sgnus.el,v 7.13 1995/10/31 08:53:36 morioka Exp $") + "$Id: tm-sgnus.el,v 7.15 1995/11/13 09:29:19 morioka Exp $") (defconst tm-gnus/version (concat (get-version-string tm-gnus/RCS-ID) " for September")) @@ -64,7 +64,12 @@ This variable is set to `gnus-show-mime'.") (defun tm-gnus/summary-toggle-header (&optional arg) (interactive "P") - (if gnus-show-mime + (if (and gnus-show-mime + (or (not gnus-strict-mime) + (save-excursion + (set-buffer gnus-article-buffer) + (gnus-fetch-field "Mime-Version") + ))) (let ((mime-viewer/ignored-field-list (if (save-excursion (set-buffer gnus-article-buffer) @@ -155,12 +160,19 @@ This variable is set to `gnus-show-mime'.") ;;; @ article filter ;;; +(defun tm-gnus/article-reset-variable () + (setq tm-gnus/automatic-mime-preview nil) + ) + +(add-hook 'gnus-article-prepare-hook 'tm-gnus/article-reset-variable) + (defun tm-gnus/preview-article () (make-local-variable 'tm:mother-button-dispatcher) (setq tm:mother-button-dispatcher (function gnus-article-push-button)) (mime/viewer-mode nil nil nil gnus-original-article-buffer gnus-article-buffer) + (setq tm-gnus/automatic-mime-preview t) (run-hooks 'tm-gnus/article-prepare-hook) ) @@ -172,9 +184,9 @@ This variable is set to `gnus-show-mime'.") ) (defun gnus-article-hide-headers-if-wanted () - (if (not gnus-show-mime) + (or tm-gnus/automatic-mime-preview (tm::gnus-article-hide-headers-if-wanted) - )) + )) ;;; @ for BBDB diff --git a/mh-e/Makefile b/mh-e/Makefile index 7ab2b2d..8413e61 100644 --- a/mh-e/Makefile +++ b/mh-e/Makefile @@ -23,7 +23,7 @@ TMDIR19 = $(HOME)/lib/emacs19/lisp FILES = tm/mh-e/*.el tm/mh-e/Makefile tm/mh-e/mk-tmh tm/mh-e/*.ol -TARFILE = tm-mh-e7.12.tar +TARFILE = tm-mh-e7.16.tar elc: diff --git a/mh-e/tm-mh-e.el b/mh-e/tm-mh-e.el index 74c51f4..56f7d88 100644 --- a/mh-e/tm-mh-e.el +++ b/mh-e/tm-mh-e.el @@ -26,7 +26,7 @@ ;;; (defconst tm-mh-e/RCS-ID - "$Id: tm-mh-e.el,v 7.12 1995/10/31 15:27:51 morioka Exp $") + "$Id: tm-mh-e.el,v 7.16 1995/11/11 13:02:40 morioka Exp $") (defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID)) @@ -140,7 +140,12 @@ (defun tm-mh-e/view-message (&optional msg) "MIME decode and play this message." (interactive) - (if (null tm-mh-e/decode-all) + (if (or (null tm-mh-e/decode-all) + (null (get-buffer mh-show-buffer)) + (save-excursion + (set-buffer mh-show-buffer) + (not (eq major-mode 'mime/viewer-mode)) + )) (let ((tm-mh-e/decode-all t)) (mh-invalidate-show-buffer) (mh-show-msg msg) @@ -288,7 +293,7 @@ With arg, turn MIME processing on if arg is positive." (let ((files (directory-files (mh-expand-file-name folder) nil "^[0-9]+$") ) - (default mh-sent-from-msg) + (default (and (boundp 'mh-sent-from-msg) mh-sent-from-msg)) ) (setq default (if default @@ -318,6 +323,7 @@ With arg, turn MIME processing on if arg is positive." (setq message (tm-mh-e/query-message)) ) (insert-file (tm-mh-e::message/file-name message)) + (mime-editor/inserted-message-filter) ) (call-after-loaded @@ -327,10 +333,15 @@ With arg, turn MIME processing on if arg is positive." (set-alist 'mime-editor/message-inserter-alist 'mh-letter-mode (function tm-mh-e/insert-message)) + (set-alist + 'mime-editor/mail-inserter-alist + 'mh-letter-mode (function tm-mh-e/insert-message)) + (set-alist + 'mime-editor/mail-inserter-alist + 'news-reply-mode (function tm-mh-e/insert-message)) ))) - ;;; @ set up ;;; diff --git a/mk-tm b/mk-tm index 68431f9..b8a2135 100644 --- a/mk-tm +++ b/mk-tm @@ -1,6 +1,6 @@ ;;; -*-Emacs-Lisp-*- ;;; -;;; $Id: mk-tm,v 6.0 1995/10/26 09:32:03 morioka Exp morioka $ +;;; $Id: mk-tm,v 7.0 1995/11/12 13:45:18 morioka Exp morioka $ ;;; (setq load-path (append @@ -13,9 +13,6 @@ load-path)) (require 'tl-misc) -(require 'gnus) -(require 'tm-rich) -(require 'mel-u) (setq tm-modules (append @@ -33,7 +30,7 @@ "tm-def" "tm-ew-d" "tm-ew-e" "tm-eword" "tm-parse" "tm-view" "tm-play" "tm-partial" - "tm-latex" "tm-w3" "tm-tar" "tm-file" "tm-mail" + "tm-latex" "tm-w3" "tm-tar" "tm-file" "tm-rmail" "tm-edit" "tm-setup" "mime-setup" )) @@ -76,7 +73,10 @@ (append tm-uncompile-el-files '("tm-vm.el"))) ) -(if (file-exists-p "tm-evs.el") +(if (and (file-exists-p "tm-evs.el") + (or (boundp 'MULE) + (boundp 'NEMACS)) + ) (setq tm-modules (append tm-modules '("tm-evs"))) ) @@ -93,6 +93,9 @@ tm-modules)) (defun compile-tm () + (require 'gnus) + (require 'tm-rich) + (require 'mel-u) (mapcar (function byte-compile-file file) tm-el-files) ) diff --git a/src/decode-b.c b/src/decode-b.c new file mode 100644 index 0000000..8eece33 --- /dev/null +++ b/src/decode-b.c @@ -0,0 +1,71 @@ +/* + * $Id: decode-b.c,v 1.2 1995/02/04 02:51:53 morioka Exp $ + * + * modified by Kenji Rikitake + * based on Henry Spencer's un64 shell script + * + */ + +#include +#include + +int get_base64_char_value(int chr) +{ + if( ('A' <= chr) && (chr <= 'Z') ){ + return chr - 'A'; + } + else if( ('a' <= chr) && (chr <= 'z') ){ + return chr - 'a' + 26; + } + else if( ('0' <= chr) && (chr <= '9') ){ + return chr - '0' + 52; + } + else if(chr == '+'){ + return 62; + } + else if(chr == '/'){ + return 63; + } + return -1; +} + +main() +{ + FILE* rfp = stdin; + FILE* wfp = stdout; + char str[128]; + char* sp; + int ret; + unsigned int v1, v2, v3, v4, o1, o2, o3; + + while (fgets(str, 128, rfp)) { + for (sp = str; *sp; ) { + if ((*sp == '\r') || (*sp == '\n')) break; + v1 = get_base64_char_value(*sp++); + v2 = get_base64_char_value(*sp++); + if (0 <= (v3 = get_base64_char_value(*sp++))) { + if (0 <= (v4 = get_base64_char_value(*sp++))) { + o1 = (v1 << 2) + (v2 >> 4); + o2 = ((v2 & 0x0f) << 4) + (v3 >> 2); + o3 = ((v3 & 0x03) << 6) + v4; + putc(o1, wfp); + putc(o2, wfp); + putc(o3, wfp); + } + else { + o1 = (v1 << 2) + (v2 >> 4); + o2 = ((v2 & 0x0f) << 4) + (v3 >> 2); + putc(o1, wfp); + putc(o2, wfp); + return 0; + } + } + else { + o1 = (v1 << 2) + (v2 >> 4); + putc(o1, wfp); + return 0; + } + } + } + return 0; +} diff --git a/src/ol2.c b/src/ol2.c new file mode 100644 index 0000000..3190414 --- /dev/null +++ b/src/ol2.c @@ -0,0 +1,76 @@ +/* + * 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'. + * + * Copyright 1992, Timtia Software. + * + * This program is Copyfree. + */ + +#include + +main() +{ + unsigned char depth=0, offset=1; + + for(;;){ + char str[256], *cp; + unsigned short section[255]; + unsigned char d; + unsigned short i; + unsigned short code; + + if(gets(str)==NULL) break; + + for(d=0, cp=str; ;d++){ + if(*cp++!='*') break; + } + if(*--cp==' ') cp++; + if(d==0){ + puts(str); + } + else if(d==1){ + if(d>depth){ + depth=d; + section[0]=0; + } + else if(d==depth){ + section[0]++; + } + else{ + depth=d; + section[0]++; + } + code=0xa3b0+section[0]+offset; + printf("%c%c %s\n", code>>8,code&0xff, cp); + } + else if(d==depth){ + section[depth-1]++; + for(i=0; idepth){ + for(i=0; i ;;; Version: -;;; $Id: tm-def.el,v 7.0 1995/10/05 13:27:34 morioka Exp $ +;;; $Id: tm-def.el,v 7.1 1995/11/10 10:43:15 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia, definition ;;; ;;; This file is part of tm (Tools for MIME). @@ -149,6 +149,61 @@ (concat "\\(Q\\)\\?" mime/Q-encoded-text-regexp)) +;;; @ rot13-47 +;;; +;; caesar-region written by phr@prep.ai.mit.edu Nov 86 +;; modified by tower@prep Nov 86 +;; gnus-caesar-region +;; Modified by umerin@flab.flab.Fujitsu.JUNET for ROT47. +(defun tm:caesar-region (&optional n) + "Caesar rotation of region by N, default 13, for decrypting netnews. +ROT47 will be performed for Japanese text in any case." + (interactive (if current-prefix-arg ; Was there a prefix arg? + (list (prefix-numeric-value current-prefix-arg)) + (list nil))) + (cond ((not (numberp n)) (setq n 13)) + (t (setq n (mod n 26)))) ;canonicalize N + (if (not (zerop n)) ; no action needed for a rot of 0 + (progn + (if (or (not (boundp 'caesar-translate-table)) + (/= (aref caesar-translate-table ?a) (+ ?a n))) + (let ((i 0) (lower "abcdefghijklmnopqrstuvwxyz") upper) + (message "Building caesar-translate-table...") + (setq caesar-translate-table (make-vector 256 0)) + (while (< i 256) + (aset caesar-translate-table i i) + (setq i (1+ i))) + (setq lower (concat lower lower) upper (upcase lower) i 0) + (while (< i 26) + (aset caesar-translate-table (+ ?a i) (aref lower (+ i n))) + (aset caesar-translate-table (+ ?A i) (aref upper (+ i n))) + (setq i (1+ i))) + ;; ROT47 for Japanese text. + ;; Thanks to ichikawa@flab.fujitsu.junet. + (setq i 161) + (let ((t1 (logior ?O 128)) + (t2 (logior ?! 128)) + (t3 (logior ?~ 128))) + (while (< i 256) + (aset caesar-translate-table i + (let ((v (aref caesar-translate-table i))) + (if (<= v t1) (if (< v t2) v (+ v 47)) + (if (<= v t3) (- v 47) v)))) + (setq i (1+ i)))) + (message "Building caesar-translate-table...done"))) + (let ((from (region-beginning)) + (to (region-end)) + (i 0) str len) + (setq str (buffer-substring from to)) + (setq len (length str)) + (while (< i len) + (aset str i (aref caesar-translate-table (aref str i))) + (setq i (1+ i))) + (goto-char from) + (delete-region from to) + (insert str))))) + + ;;; @ end ;;; diff --git a/tm-edit.el b/tm-edit.el index 56afc1d..5aee31a 100644 --- a/tm-edit.el +++ b/tm-edit.el @@ -107,7 +107,7 @@ ;; LCD Archive Entry: ;; mime|Masanobu UMEDA|umerin@mse.kyutech.ac.jp| ;; Simple MIME Composer| -;; $Date: 1995/11/03 08:32:03 $|$Revision: 7.15 $|~/misc/mime.el.Z| +;; $Date: 1995/11/11 12:48:30 $|$Revision: 7.23 $|~/misc/mime.el.Z| ;;; Code: @@ -125,7 +125,7 @@ ;;; (defconst mime-editor/RCS-ID - "$Id: tm-edit.el,v 7.15 1995/11/03 08:32:03 morioka Exp morioka $") + "$Id: tm-edit.el,v 7.23 1995/11/11 12:48:30 morioka Exp $") (defconst mime-editor/version (get-version-string mime-editor/RCS-ID)) @@ -297,6 +297,18 @@ To insert a signature file specified by mime-signature-file "*Alist of file name, types, parameters, and default encoding. If encoding is nil, it is determined from its contents.") +;;; @@ about message inserting +;;; + +(defvar mime-editor/yank-ignored-fields-regexp + "^\\(Received\\|X-UIDL\\|Sender\\|Approved\\|Path\\):") + +(defvar mime-editor/message-inserter-alist nil) +(defvar mime-editor/mail-inserter-alist nil) + +;;; @@ about message splitting +;;; + (defvar mime-editor/split-message t) (defvar mime-editor/message-default-max-length 1000) @@ -304,10 +316,11 @@ If encoding is nil, it is determined from its contents.") (defvar mime-editor/message-max-length-alist '((news-reply-mode . 500))) -(defconst mime-editor/message-nuke-headers +(defconst mime-editor/split-ignored-fields-regexp "\\(^Content-\\|^Subject:\\|^Mime-Version:\\)") -(defvar mime-editor/blind-fields-regexp "\\(^[BDFbdf]cc:\\|^cc:[ \t]*$\\)") +(defvar mime-editor/split-blind-fields-regexp + "\\(^[BDFbdf]cc:\\|^cc:[ \t]*$\\)") (defvar mime-editor/message-default-sender-alist '((mail-mode . mail-send-and-exit) @@ -315,7 +328,7 @@ If encoding is nil, it is determined from its contents.") (news-reply-mode . gnus-inews-news) )) -(defvar mime-editor/message-sender-alist +(defvar mime-editor/split-message-sender-alist '((mail-mode . (lambda () (interactive) @@ -362,28 +375,8 @@ If encoding is nil, it is determined from its contents.") (defvar mime-editor/news-reply-mode-server-running nil) -(defvar mime-editor/message-before-send-hook-alist - '((mh-letter-mode . mh-before-send-letter-hook))) - -(defvar mime-editor/message-after-send-hook-alist - '((mh-letter-mode - . (lambda () - (if mh-annotate-char - (mh-annotate-msg mh-sent-from-msg - mh-sent-from-folder - mh-annotate-char - "-component" mh-annotate-field - "-text" - (format "\"%s %s\"" - (mh-get-field "To:") - (mh-get-field "Cc:")))))) - )) - -(defvar mime-editor/message-inserter-alist nil) - -(defvar mime-tspecials-regexp "[][()<>@,;:\\\"/?.= \t]" - "*Specify MIME tspecials. -Tspecials means any character that matches with it in header must be quoted.") +;;; @@ about tag +;;; (defconst mime-editor/single-part-tag-regexp "^--[[][[]\\([^]]*\\)]\\([[]\\([^]]*\\)]\\|\\)]" @@ -412,6 +405,9 @@ Tspecials means any character that matches with it in header must be quoted.") (defvar mime-tag-format-with-encoding "--[[%s][%s]]" "*Control-string making a MIME tag with encoding.") +;;; @@ multipart boundary +;;; + (defvar mime-multipart-boundary "Multipart" "*Boundary of a multipart message.") @@ -427,10 +423,18 @@ Tspecials means any character that matches with it in header must be quoted.") ;;; @ constants ;;; +(defconst mime-tspecials-regexp "[][()<>@,;:\\\"/?.= \t]" + "*Specify MIME tspecials. +Tspecials means any character that matches with it in header must be quoted.") + (defconst mime-editor/mime-version-value (format "1.0 (generated by tm-edit %s)" mime-editor/version) "MIME version number.") + +;;; @ keymap and menu +;;; + (defvar mime/editor-mode-flag nil) (make-variable-buffer-local 'mime/editor-mode-flag) @@ -445,9 +449,10 @@ Tspecials means any character that matches with it in header must be quoted.") (define-key keymap "\C-e" 'mime-editor/insert-external) (define-key keymap "\C-v" 'mime-editor/insert-voice) (define-key keymap "\C-y" 'mime-editor/insert-message) + (define-key keymap "\C-m" 'mime-editor/insert-mail) (define-key keymap "\C-w" 'mime-editor/insert-signature) (define-key keymap "\C-s" 'mime-editor/insert-signature) - (define-key keymap "\C-m" 'mime-editor/insert-tag) + (define-key keymap "t" 'mime-editor/insert-tag) (define-key keymap "a" 'mime-editor/enclose-alternative-region) (define-key keymap "p" 'mime-editor/enclose-parallel-region) (define-key keymap "m" 'mime-editor/enclose-mixed-region) @@ -464,7 +469,8 @@ Tspecials means any character that matches with it in header must be quoted.") (file "Insert File" mime-editor/insert-file) (external "Insert External" mime-editor/insert-external) (voice "Insert Voice" mime-editor/insert-voice) - (mail "Insert Mail" mime-editor/insert-message) + (message "Insert Message" mime-editor/insert-message) + (mail "Insert Mail" mime-editor/insert-mail) (signature "Insert Signature" mime-editor/insert-signature) (text "Insert Text" mime-editor/insert-text) (tag "Insert Tag" mime-editor/insert-tag) @@ -510,6 +516,10 @@ Tspecials means any character that matches with it in header must be quoted.") ))) ;;; end + +;;; @ functions +;;; + ;;;###autoload (defun mime/editor-mode () "MIME minor mode for editing the tagged MIME message. @@ -548,6 +558,7 @@ Following commands are available in addition to major mode commands: \\[mime-editor/insert-external] insert a reference to external body. \\[mime-editor/insert-voice] insert a voice message. \\[mime-editor/insert-message] insert a mail or news message. +\\[mime-editor/insert-mail] insert a mail message. \\[mime-editor/insert-signature] insert a signature file at end. \\[mime-editor/insert-tag] insert a new MIME tag. \\[mime-editor/enclose-alternative-region] enclose as multipart/alternative. @@ -1418,7 +1429,7 @@ while if FLAG is `\\^M' (control-M) the text is hidden." (forward-line) (set-mark (point)) (goto-char (mime-editor/content-end)) - (mime-editor/caesar-region) + (tm:caesar-region) )) ;; Point is now on current tag. ;; Define encoding and encode text if necessary. @@ -1696,6 +1707,36 @@ a recording host instead of local host." (message "Sorry, I don't have message inserter for your MUA.") ))) +(defun mime-editor/insert-mail (&optional message) + (interactive) + (let ((inserter (assoc-value major-mode mime-editor/mail-inserter-alist))) + (if (and inserter (fboundp inserter)) + (progn + (mime-editor/insert-tag "message" "rfc822") + (funcall inserter message) + ) + (message "Sorry, I don't have mail inserter for your MUA.") + ))) + +(defun mime-editor/inserted-message-filter () + (save-excursion + (save-restriction + (let ((header-start (point)) + (case-fold-search t) + beg end) + (if (re-search-forward "^$" (mark t)) + (narrow-to-region header-start (match-beginning 0)) + ) + (goto-char header-start) + (while (and (re-search-forward + mime-editor/yank-ignored-fields-regexp nil t) + (setq beg (match-beginning 0)) + (setq end (1+ (rfc822/field-end))) + ) + (delete-region beg end) + ) + )))) + ;;; mime.el ends here (defun mime-editor/translate-region (beg end &optional boundary multipart) @@ -1823,60 +1864,6 @@ a recording host instead of local host." boundary)))) -;;; caesar-region written by phr@prep.ai.mit.edu Nov 86 -;;; modified by tower@prep Nov 86 -;;; gnus-caesar-region -;;; Modified by umerin@flab.flab.Fujitsu.JUNET for ROT47. - -(defun mime-editor/caesar-region (&optional n) - "Caesar rotation of region by N, default 13, for decrypting netnews. -ROT47 will be performed for Japanese text in any case." - (interactive (if current-prefix-arg ; Was there a prefix arg? - (list (prefix-numeric-value current-prefix-arg)) - (list nil))) - (cond ((not (numberp n)) (setq n 13)) - (t (setq n (mod n 26)))) ;canonicalize N - (if (not (zerop n)) ; no action needed for a rot of 0 - (progn - (if (or (not (boundp 'caesar-translate-table)) - (/= (aref caesar-translate-table ?a) (+ ?a n))) - (let ((i 0) (lower "abcdefghijklmnopqrstuvwxyz") upper) - (message "Building caesar-translate-table...") - (setq caesar-translate-table (make-vector 256 0)) - (while (< i 256) - (aset caesar-translate-table i i) - (setq i (1+ i))) - (setq lower (concat lower lower) upper (upcase lower) i 0) - (while (< i 26) - (aset caesar-translate-table (+ ?a i) (aref lower (+ i n))) - (aset caesar-translate-table (+ ?A i) (aref upper (+ i n))) - (setq i (1+ i))) - ;; ROT47 for Japanese text. - ;; Thanks to ichikawa@flab.fujitsu.junet. - (setq i 161) - (let ((t1 (logior ?O 128)) - (t2 (logior ?! 128)) - (t3 (logior ?~ 128))) - (while (< i 256) - (aset caesar-translate-table i - (let ((v (aref caesar-translate-table i))) - (if (<= v t1) (if (< v t2) v (+ v 47)) - (if (<= v t3) (- v 47) v)))) - (setq i (1+ i)))) - (message "Building caesar-translate-table...done"))) - (let ((from (region-beginning)) - (to (region-end)) - (i 0) str len) - (setq str (buffer-substring from to)) - (setq len (length str)) - (while (< i len) - (aset str i (aref caesar-translate-table (aref str i))) - (setq i (1+ i))) - (goto-char from) - (delete-region from to) - (insert str))))) - - ;;; @ multipart enclosure ;;; @@ -1940,7 +1927,8 @@ ROT47 will be performed for Japanese text in any case." ;;; @ split ;;; -(defun mime-editor/insert-partial-header (fields subject id number total separator) +(defun mime-editor/insert-partial-header + (fields subject id number total separator) (insert fields) (insert (format "Subject: %s (%d/%d)\n" subject number total)) (insert (format "Mime-Version: 1.0 (split by tm-edit %s)\n" @@ -1957,7 +1945,8 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" mime-editor/message-default-max-length)) (lines (count-lines (point-min) (point-max))) ) - (if (and (> lines mime-editor/message-max-length) mime-editor/split-message) + (if (and (> lines mime-editor/message-max-length) + mime-editor/split-message) (let* ((mime-editor/draft-file-name (or (buffer-file-name) (make-temp-name @@ -1970,7 +1959,7 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" "@" (system-name) "\""))) (run-hooks 'mime-editor/before-split-hook) (let* ((header (rfc822/get-header-string-except - mime-editor/message-nuke-headers separator)) + mime-editor/split-ignored-fields-regexp separator)) (subject (mail-fetch-field "subject")) (total (+ (/ lines mime-editor/message-max-length) (if (> (mod lines mime-editor/message-max-length) 0) @@ -1979,10 +1968,13 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" (buf (get-buffer "*tmp-send*")) (command (or cmd - (cdr (assq major-mode - mime-editor/message-sender-alist)) - (cdr (assq major-mode - mime-editor/message-default-sender-alist)))) + (cdr + (assq major-mode + mime-editor/split-message-sender-alist)) + (cdr + (assq major-mode + mime-editor/message-default-sender-alist)) + )) data) (goto-char (point-min)) (if (re-search-forward (concat "^" (regexp-quote separator) "$") @@ -2012,9 +2004,8 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" )) (delete-region (point-min)(point)) (switch-to-buffer buf) - (mime-editor/insert-partial-header header subject - id mime-editor/partial-number total - separator) + (mime-editor/insert-partial-header + header subject id mime-editor/partial-number total separator) (insert data) (save-excursion (save-restriction @@ -2027,7 +2018,8 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" (point-max) )) (goto-char (point-min)) - (while (re-search-forward mime-editor/blind-fields-regexp nil t) + (while (re-search-forward + mime-editor/split-blind-fields-regexp nil t) (delete-region (match-beginning 0) (let ((e (rfc822/field-end))) (if (< e (point-max)) @@ -2054,9 +2046,8 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" )) (delete-region (point-min)(point)) (switch-to-buffer buf) - (mime-editor/insert-partial-header header subject - id mime-editor/partial-number total - separator) + (mime-editor/insert-partial-header + header subject id mime-editor/partial-number total separator) (insert data) (save-excursion (message (format "Sending %d/%d..." @@ -2067,12 +2058,12 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" ) (erase-buffer) (switch-to-buffer the-buf) - (setq mime-editor/partial-number (1+ mime-editor/partial-number)) + (setq mime-editor/partial-number + (1+ mime-editor/partial-number)) ) (goto-char (point-min)) - (mime-editor/insert-partial-header header subject - id mime-editor/partial-number total - separator) + (mime-editor/insert-partial-header + header subject id mime-editor/partial-number total separator) (message (format "Sending %d/%d..." mime-editor/partial-number total)) )))))) @@ -2192,29 +2183,6 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" ;;; @ etc ;;; -(defun rfc822/get-header-string-except (pat boundary) - (let ((case-fold-search t)) - (save-excursion - (save-restriction - (narrow-to-region (goto-char (point-min)) - (progn - (re-search-forward - (concat "^\\(" (regexp-quote boundary) "\\)?$") - nil t) - (match-beginning 0) - )) - (goto-char (point-min)) - (let (field header) - (while (re-search-forward rfc822/field-top-regexp nil t) - (setq field (buffer-substring (match-beginning 0) - (rfc822/field-end) - )) - (if (not (string-match pat field)) - (setq header (concat header field "\n")) - )) - header) - )))) - (defun replace-space-with-underline (str) (mapconcat (function (lambda (arg) diff --git a/tm-play.el b/tm-play.el index ef3cc3f..7fbe1f0 100644 --- a/tm-play.el +++ b/tm-play.el @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: tm-play.el,v 4.0 1995/11/04 07:51:22 morioka Exp $ +;;; $Id: tm-play.el,v 7.1 1995/11/10 11:13:32 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia ;;; ;;; This file is part of tm (Tools for MIME). @@ -173,9 +173,54 @@ ))) +;;; @ mail/news message +;;; + +(defun mime-viewer/quitting-method-for-mime/show-message-mode () + (set-window-configuration mime/show-mode-old-window-configuration) + (let ((mother mime::preview/mother-buffer)) + (kill-buffer + (mime::preview-content-info/buffer (car mime::preview/content-list))) + (mime-viewer/kill-buffer) + (pop-to-buffer mother) + ;;(goto-char (point-min)) + ;;(mime-viewer/up-content) + )) + +(defun mime-article/view-message/rfc822 (beg end cal) + (let* ((cnum (mime-article/point-content-number beg)) + (cur-buf (current-buffer)) + (new-name (format "%s-%s" (buffer-name) cnum)) + (mother mime::article/preview-buffer) + str) + (setq str (buffer-substring beg end)) + (switch-to-buffer new-name) + (erase-buffer) + (insert str) + (goto-char (point-min)) + (if (re-search-forward "^\n" nil t) + (delete-region (point-min) (match-end 0)) + ) + (setq major-mode 'mime/show-message-mode) + (mime/viewer-mode mother) + )) + + ;;; @ message/partial ;;; +(defvar mime-article/coding-system-alist + (and (boundp 'MULE) + '((mh-show-mode . *noconv*) + (t . *ctext*) + ))) + +(defvar mime-article/kanji-code-alist + (and (boundp 'NEMACS) + '((mh-show-mode . nil) + (t . 2) + ))) + (defun mime-article/decode-message/partial (beg end cal) (goto-char beg) (let* ((root-dir (expand-file-name @@ -200,7 +245,19 @@ (re-search-forward "^$") (goto-char (1+ (match-end 0))) (setq file (concat root-dir "/" number)) - (write-region (point) (point-max) file) + (let ((file-coding-system + (cdr + (or (assq major-mode mime-article/coding-system-alist) + (assq t mime-article/coding-system-alist) + ))) + (kanji-fileio-code + (cdr + (or (assq major-mode mime-article/kanji-code-alist) + (assq t mime-article/kanji-code-alist) + ))) + ) + (write-region (point) (point-max) file) + ) (if (get-buffer "*MIME-temp*") (kill-buffer "*MIME-temp*") ) @@ -243,6 +300,40 @@ )) +;;; @ rot13-47 +;;; + +(defun mime-article/decode-caesar (beg end cal) + (let* ((cnum (mime-article/point-content-number beg)) + (cur-buf (current-buffer)) + (new-name (format "%s-%s" (buffer-name) cnum)) + (mother mime::article/preview-buffer) + (charset (cdr (assoc "charset" params))) + (mode major-mode) + str) + (setq str (buffer-substring beg end)) + (switch-to-buffer new-name) + (erase-buffer) + (insert str) + (goto-char (point-min)) + (if (re-search-forward "^\n" nil t) + (delete-region (point-min) (match-end 0)) + ) + (let ((m (assq mode mime-viewer/code-converter-alist))) + (if (and m (fboundp (setq m (cdr m)))) + (funcall m (point-min) (point-max) charset encoding) + (mime-viewer/default-code-convert-region (point-min) (point-max) + charset encoding) + )) + (save-excursion + (set-mark (point-min)) + (goto-char (point-max)) + (tm:caesar-region) + ) + (view-mode) + )) + + ;;; @ end ;;; diff --git a/tm-rmail.el b/tm-rmail.el index dc001cd..bf52029 100644 --- a/tm-rmail.el +++ b/tm-rmail.el @@ -4,7 +4,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: tm-rmail.el,v 7.12 1995/11/02 12:20:51 morioka Exp $ +;;; $Id: tm-rmail.el,v 7.15 1995/11/12 15:15:15 morioka Exp $ ;;; Keywords: mail, MIME, multimedia, multilingual, encoded-word ;;; ;;; This file is part of tm (Tools for MIME). @@ -57,9 +57,17 @@ (function (lambda () (cons (mime/Content-Type) - (rfc822/get-field-body "Content-Transfer-Encoding") + (mime/Content-Transfer-Encoding "7bit") ) ))))) + (narrow-to-region (point-min) + (save-excursion + (goto-char (point-max)) + (if (and (re-search-backward "^\n") + (eq (match-end 0)(point-max))) + (match-beginning 0) + (point-max) + ))) (mime/viewer-mode nil (car ret)(cdr ret) nil (format "*Preview-%s [%d/%d]*" (buffer-name) diff --git a/tm-view.el b/tm-view.el index 823a268..5b9d83b 100644 --- a/tm-view.el +++ b/tm-view.el @@ -25,7 +25,7 @@ ;;; (defconst mime-viewer/RCS-ID - "$Id: tm-view.el,v 7.22 1995/11/03 09:05:23 morioka Exp $") + "$Id: tm-view.el,v 7.23 1995/11/10 11:15:31 morioka Exp $") (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID)) (defconst mime/viewer-version mime-viewer/version) @@ -39,8 +39,12 @@ (method "tm-plain" nil 'file 'type 'encoding 'mode 'name)) ;;((type . "text/x-latex") ;; (method "tm-latex" nil 'file 'type 'encoding 'mode 'name)) + ((type . "text/x-rot13-47") + (method . mime-article/decode-caesar)) + ((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") @@ -53,16 +57,22 @@ (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/external-body") ;; (method "xterm" nil ;; "-e" "showexternal" ;; 'file '"access-type" '"name" '"site" '"directory")) + ((type . "message/rfc822") + (method . mime-article/view-message/rfc822)) ((type . "message/partial") (method . mime-article/decode-message/partial)) + ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file)(mode . "play")) ((method "tm-file" nil 'file 'type 'encoding 'mode 'name) @@ -251,17 +261,6 @@ ;;; @@ quitting method ;;; -(defun mime-viewer/quitting-method-for-mime/show-message-mode () - (set-window-configuration mime/show-mode-old-window-configuration) - (let ((mother mime::preview/mother-buffer)) - (kill-buffer - (mime::preview-content-info/buffer (car mime::preview/content-list))) - (mime-viewer/kill-buffer) - (pop-to-buffer mother) - (goto-char (point-min)) - (mime-viewer/up-content) - )) - (defvar mime-viewer/quitting-method-alist '((mime/show-message-mode . mime-viewer/quitting-method-for-mime/show-message-mode)))