From 95847857479f2e557aff29531db213b89b5117bb Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 9 Mar 1998 11:24:59 +0000 Subject: [PATCH] tm 7.22. --- Changes-7.22.en | 136 +++++++++++++++++++++++++++ Changes-7.22.ja | 134 +++++++++++++++++++++++++++ Makefile | 10 +- gnus/Makefile | 2 +- gnus/g5-path | 2 +- gnus/s-path | 2 +- gnus/tm-gnus5.el | 269 +++++++++++++++++++++++++----------------------------- gnus/tm-sgnus.el | 9 +- mh-e/Makefile | 2 +- mh-e/tm-mh-e.el | 3 +- mh-e/tm-mh-e3.el | 6 +- mk-tm | 4 +- tm-edit.el | 89 ++++++++++++++++-- tm-file.el | 64 +++++++++++++ tm-mail.el | 78 ++++++++++++++++ tm-play.el | 12 ++- tm-rmail.el | 11 ++- tm-view.el | 36 +++++--- 18 files changed, 675 insertions(+), 194 deletions(-) create mode 100644 Changes-7.22.en create mode 100644 Changes-7.22.ja create mode 100644 tm-file.el create mode 100644 tm-mail.el diff --git a/Changes-7.22.en b/Changes-7.22.en new file mode 100644 index 0000000..d3d1499 --- /dev/null +++ b/Changes-7.22.en @@ -0,0 +1,136 @@ +* tl + + Attached version 7.01.3. + + +* mel + + Attached version 3.2. + + +* tm + +tm/tm-edit.el +---------------------------- +revision 7.15 +date: 1995/11/03 08:32:03; author: morioka; state: Exp; lines: +77 -9 +Addition for image/tiff and text/x-rot13-47. +---------------------------- + +tm/tm-file.el +---------------------------- +revision 2.0 +date: 1995/11/06 16:05:29; author: morioka; state: Exp; lines: +17 -5 +(1) Function `mime/extract-file' was renamed to + `mime-article/extract-file'. +(2) took measure for jam-zcat and jka-compr. +---------------------------- +revision 1.1 +date: 1995/11/03 08:32:58; author: morioka; state: Exp; +It was created as a tm-view internal method module for file +extraction. +---------------------------- + +tm/tm-mail.el +---------------------------- +revision 1.1 +date: 1995/11/04 08:22:24; author: morioka; state: Exp; +It was created as a tm-view internal method module for message/rfc822 +and text/x-rot13-47. +---------------------------- + +tm/tm-play.el +---------------------------- +revision 4.0 +date: 1995/11/04 07:51:22; author: morioka; state: Exp; lines: +4 -2 +Don't code convert when reading partial part files. +---------------------------- +revision 3.0 +date: 1995/11/03 08:53:58; author: morioka; state: Exp; lines: +6 -2 +Function `mime-article/decode-message/partial' was modified not to +code convert when reading FULL file. +---------------------------- + +tm/tm-view.el +---------------------------- +revision 7.22 +date: 1995/11/03 09:05:23; author: morioka; state: Exp; lines: +21 -15 +(1) New function `mime-preview/decode-text-region'. +(2) use function `mime/code-convert-region-to-emacs' as code converter + for mime/show-message-mode. +(3) Buffer local variable `mime/mother-buffer' was renamed to + `mime::preview/mother-buffer'. +---------------------------- + +tm/tm-rmail.el +---------------------------- +revision 7.12 +date: 1995/11/02 12:20:51; author: morioka; state: Exp; lines: +2 -2 +In function `tm-rmail/view-message', fixed renaming mistake of +`tm-rmail/preview-message'. +---------------------------- +revision 7.11 +date: 1995/11/02 07:03:01; author: morioka; state: Exp; lines: +3 -2 +Function `tm-rmail/preview-message' was modified to use function +`rfc822/get-field-body' instead of function +`mail-fetch-field'. (because of text property problem in Emacs 19.29) +---------------------------- +revision 7.10 +date: 1995/11/02 06:04:48; author: morioka; state: Exp; lines: +2 -2 +In function `tm-rmail/forward', fixed renaming mistake of +`tm-edit/insert-tag' -> `mime-editor/insert-tag'. +---------------------------- +revision 7.9 +date: 1995/10/31 14:20:25; author: morioka; state: Exp; lines: +2 -2 +Function `tm-rmail/forward-from-gnus' was renamed to +`gnus-mail-forward-using-mail-mime'. +---------------------------- + +tm/mh-e + + Attached version 7.12. + +tm/mh-e/tm-mh-e.el +---------------------------- +revision 7.12 +date: 1995/10/31 15:27:51; author: morioka; state: Exp; lines: +1 -46 +Function `gnus-mail-forward-using-mhe-mime' was moved to tm-gnus5.el +again. +---------------------------- +revision 7.11 +date: 1995/10/31 14:17:09; author: morioka; state: Exp; lines: +47 -1 +Insert (require 'mh-comp) in function +`gnus-mail-forward-using-mhe-mime'. +---------------------------- + +tm/mh-e/tm-mh-e3.el +---------------------------- +revision 6.0 +date: 1995/10/31 14:24:41; author: morioka; state: Exp; lines: +5 -1 +Insert (provide 'mh-comp). +---------------------------- + + +tm/gnus + + Attached version 7.13. + +tm/gnus/tm-gnus5.el +---------------------------- +revision 7.7 +date: 1995/10/31 15:24:49; author: morioka; state: Exp; lines: +58 -1 +Function `gnus-mail-forward-using-mhe-mime' was defined in this module +again. +---------------------------- +revision 7.6 +date: 1995/10/31 13:52:48; author: morioka; state: Exp; lines: +1 -47 +Function `gnus-mail-forward-using-mhe-mime' was moved to tm-mh-e.el. +---------------------------- +revision 7.5 +date: 1995/10/31 13:45:21; author: morioka; state: Exp; lines: +108 -136 +(1) automatic MIME preview support for original Gnus 5.0.x. + (``with tm patch'' is regarded as original Gnus 5.0.x) +(2) tm-gnus/decode-all was abolished and changed like tm-sgnus way. +(3) setting for BBDB. +(4) Function `gnus-mail-forward-using-mhe-mime' was modified. +---------------------------- diff --git a/Changes-7.22.ja b/Changes-7.22.ja new file mode 100644 index 0000000..da2428a --- /dev/null +++ b/Changes-7.22.ja @@ -0,0 +1,134 @@ +* tl + + Version 7.01.3 を添付した。 + + +* mel + + Version 3.2 を添付した。 + + +* tm + +tm/tm-edit.el +---------------------------- +revision 7.15 +date: 1995/11/03 08:32:03; author: morioka; state: Exp; lines: +77 -9 +image/tiff と text/x-rot13-47 を追加した。 +---------------------------- + +tm/tm-file.el +---------------------------- +revision 2.0 +date: 1995/11/06 16:05:29; author: morioka; state: Exp; lines: +17 -5 +(1) 関数 mime/extract-file を mime-article/extract-file に改名した。 +(2) jam-zcat と jka-compr に対する対策を行った。 +---------------------------- +revision 1.1 +date: 1995/11/03 08:32:58; author: morioka; state: Exp; +file extraction 用の internal method module として新設した。 +---------------------------- + +tm/tm-mail.el +---------------------------- +revision 1.1 +date: 1995/11/04 08:22:24; author: morioka; state: Exp; +message/rfc822 と text/x-rot13-47 用の internal method module として新 +設した。 +---------------------------- + +tm/tm-play.el +---------------------------- +revision 4.0 +date: 1995/11/04 07:51:22; author: morioka; state: Exp; lines: +4 -2 +書き出した各 part を読み込む時に code 変換を行わないようにした。 +---------------------------- +revision 3.0 +date: 1995/11/03 08:53:58; author: morioka; state: Exp; lines: +6 -2 +関数 mime-article/decode-message/partial で FULL file を code 変換せず +に読み込むようにした。 +---------------------------- + +tm/tm-view.el +---------------------------- +revision 7.22 +date: 1995/11/03 09:05:23; author: morioka; state: Exp; lines: +21 -15 +(1) 関数 mime-preview/decode-text-region を設けた。 +(2) mime/show-message-mode 用の code converter として、関数 + mime/code-convert-region-to-emacs を用いるようにした。 +(3) buffer local 変数 `mime/mother-buffer' を + `mime::preview/mother-buffer' に改名した。 +---------------------------- + +tm/tm-rmail.el +---------------------------- +revision 7.12 +date: 1995/11/02 12:20:51; author: morioka; state: Exp; lines: +2 -2 +関数 tm-rmail/view-message を `tm-rmail/preview-message' に rename す +るのを忘れていたのを修正した。 +---------------------------- +revision 7.11 +date: 1995/11/02 07:03:01; author: morioka; state: Exp; lines: +3 -2 +関数 tm-rmail/preview-message で、関数 mail-fetch-field を使うのをやめ +て、関数 rfc822/get-field-body を使うようにした。 +---------------------------- +revision 7.10 +date: 1995/11/02 06:04:48; author: morioka; state: Exp; lines: +2 -2 +関数 tm-rmail/forward で `tm-edit/insert-tag' を +`mime-editor/insert-tag' に rename し忘れていた部分を修正した。 +---------------------------- +revision 7.9 +date: 1995/10/31 14:20:25; author: morioka; state: Exp; lines: +2 -2 +関数 tm-rmail/forward-from-gnus を `gnus-mail-forward-using-mail-mime' +に改名した。 +---------------------------- + +tm/mh-e + + Version 7.12 を添付した。 + +tm/mh-e/tm-mh-e.el +---------------------------- +revision 7.12 +date: 1995/10/31 15:27:51; author: morioka; state: Exp; lines: +1 -46 +やっぱり、関数 gnus-mail-forward-using-mhe-mime は tm-gnus5.el の中で +定義することにした。 +---------------------------- +revision 7.11 +date: 1995/10/31 14:17:09; author: morioka; state: Exp; lines: +47 -1 +関数 gnus-mail-forward-using-mhe-mime の中に (require 'mh-comp) を入れ +た。 +---------------------------- + +tm/mh-e/tm-mh-e3.el +---------------------------- +revision 6.0 +date: 1995/10/31 14:24:41; author: morioka; state: Exp; lines: +5 -1 +(provide 'mh-comp) を入れた。 +---------------------------- + + +tm/gnus + + Version 7.13 を添付した。 + +tm/gnus/tm-gnus5.el +---------------------------- +revision 7.7 +date: 1995/10/31 15:24:49; author: morioka; state: Exp; lines: +58 -1 +やっぱり、関数 gnus-mail-forward-using-mhe-mime はこの中で定義すること +にした。 +---------------------------- +revision 7.6 +date: 1995/10/31 13:52:48; author: morioka; state: Exp; lines: +1 -47 +関数 gnus-mail-forward-using-mhe-mime を tm-mh-e.el に移した。 +---------------------------- +revision 7.5 +date: 1995/10/31 13:45:21; author: morioka; state: Exp; lines: +108 -136 +(1) original の Gnus 5.0.x の場合でも automatic MIME preview support + が行えるようにした。(``with tm patch'' の場合も original として扱 + われる) +(2) tm-gnus/decode-all を廃止して、tm-sgnus と同様の方式に変えた。 +(3) BBDB 用の設定を行った。 +(4) 関数 gnus-mail-forward-using-mhe-mime を修正した。 +---------------------------- diff --git a/Makefile b/Makefile index 91dc3cc..8ce3c65 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,8 @@ TM_FILES = tm/README.eng tm/rel-*.ol tm/Changes* \ 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-ftp.el tm/tm-latex.el tm/tm-w3.el tm/tm-partial.el \ + tm/tm-partial.el tm/tm-mail.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 \ @@ -28,13 +29,14 @@ TM_MUA_FILES = tm/tm-rmail.el tm/tm-vm.el \ tm/mh-e/Makefile tm/mh-e/mk-tmh tm/mh-e/code-jp.ol \ tm/mh-e/*.el -MEL_FILES = mel/*.el mel/Makefile mel/mk-mel +MEL_FILES = mel/*.el mel/Makefile mel/mk-mel mel/Changes* -TL_FILES = tl/README.eng tl/Makefile tl/mk-tl tl/*.el tl/doc/*.texi +TL_FILES = tl/README.eng tl/Makefile tl/mk-tl tl/*.el tl/doc/*.texi \ + tl/Changes* FILES = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES) -TARFILE = tm7.21.tar +TARFILE = tm7.22.tar nemacs: diff --git a/gnus/Makefile b/gnus/Makefile index 94915f4..4574af6 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.tar +TARFILE = tm-gnus7.12.1.tar gnus3: diff --git a/gnus/g5-path b/gnus/g5-path index 1fba7f4..d2567ac 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.8/lisp") + '("/usr/local/lib/emacs/site-lisp/gnus-5.0.10/lisp") ;; load-path)) diff --git a/gnus/s-path b/gnus/s-path index f4d0ad7..eb04849 100644 --- a/gnus/s-path +++ b/gnus/s-path @@ -12,6 +12,6 @@ ;; ;; please edit this ;; - '("/usr/local/lib/emacs/site-lisp/sgnus-0.11/lisp") + '("/usr/local/lib/emacs/site-lisp/sgnus-0.12/lisp") ;; load-path)) diff --git a/gnus/tm-gnus5.el b/gnus/tm-gnus5.el index b4cc192..2065e8b 100644 --- a/gnus/tm-gnus5.el +++ b/gnus/tm-gnus5.el @@ -15,47 +15,29 @@ (require 'tl-misc) (require 'tl-822) (require 'gnus) - -(autoload 'mime/viewer-mode "tm-view" "View MIME message." t) -(autoload 'mime/decode-message-header - "tm-ew-d" "Decode MIME encoded-words in message header." t) -(autoload 'mime-eword/decode-string - "tm-ew-d" "Decode MIME encoded-words in string." t) +(require 'tm-view) ;;; @ version ;;; (defconst tm-gnus/RCS-ID - "$Id: tm-gnus5.el,v 7.4 1995/10/22 12:13:50 morioka Exp $") + "$Id: tm-gnus5.el,v 7.7 1995/10/31 15:24:49 morioka Exp $") (defconst tm-gnus/version - (concat (get-version-string tm-gnus/RCS-ID) " for GNUS 5")) - -(defconst tm-gnus/automatic-MIME-preview-support - (cond ((boundp 'gnus-clean-article-buffer) - (defconst gnus-version (concat gnus-version " with tm patch")) - t) - (t - (defvar gnus-clean-article-buffer gnus-article-buffer) - nil) - )) - -(defvar tm-gnus/preview-buffer - (if tm-gnus/automatic-MIME-preview-support - (concat "*Preview-" gnus-clean-article-buffer "*")) - ) + (concat (get-version-string tm-gnus/RCS-ID) " for GNUS 5.0.x")) ;;; @ variables ;;; -(defvar tm-gnus/original-article-display-hook gnus-article-display-hook) +(defvar tm-gnus/original-article-buffer " *Original Article*") -(defvar tm-gnus/decode-all tm-gnus/automatic-MIME-preview-support - "If it is non-nil and -tm-gnus/automatic-MIME-preview-support is non-nil, -article is automatic MIME decoded.") +(defvar tm-gnus/automatic-mime-preview t + "*If non-nil, show MIME processed article. +This variable is set to `gnus-show-mime'.") + +(setq gnus-show-mime tm-gnus/automatic-mime-preview) ;;; @ command functions @@ -64,16 +46,25 @@ article is automatic MIME decoded.") (defun tm-gnus/view-message (arg) "MIME decode and play this message." (interactive "P") - (let ((gnus-break-pages nil)) - (gnus-summary-select-article t t) - ) - (pop-to-buffer gnus-clean-article-buffer t) - (let (buffer-read-only) - (if (text-property-any (point-min) (point-max) 'invisible t) - (remove-text-properties (point-min) (point-max) - gnus-hidden-properties) + (if (save-excursion + (set-buffer gnus-article-buffer) + (eq major-mode 'mime/viewer-mode) + ) + (pop-to-buffer gnus-article-buffer t) + (let ((gnus-break-pages nil)) + (gnus-summary-select-article t t) + ) + (pop-to-buffer gnus-article-buffer t) + (let (buffer-read-only) + (remove-text-properties (point-min) (point-max) '(face nil)) + (if (get-buffer tm-gnus/original-article-buffer) + (kill-buffer tm-gnus/original-article-buffer) + ) + (rename-buffer tm-gnus/original-article-buffer) + (mime/viewer-mode nil nil nil + tm-gnus/original-article-buffer + gnus-article-buffer) )) - (mime/viewer-mode) ) (defun tm-gnus/summary-scroll-down () @@ -82,7 +73,25 @@ article is automatic MIME decoded.") (gnus-summary-scroll-up -1) ) +(defun tm-gnus/summary-toggle-header (&optional arg) + (interactive "P") + (if gnus-show-mime + (let ((mime-viewer/ignored-field-list + (if (save-excursion + (set-buffer gnus-article-buffer) + (some-element + (lambda (field) + (rfc822/get-field-body field) + ) + mime-viewer/ignored-field-list)) + mime-viewer/ignored-field-list))) + (gnus-summary-select-article t t) + ) + (gnus-summary-toggle-header arg) + )) + (define-key gnus-summary-mode-map "v" (function tm-gnus/view-message)) +(define-key gnus-summary-mode-map "t" (function tm-gnus/summary-toggle-header)) (define-key gnus-summary-mode-map "\e\r" (function tm-gnus/summary-scroll-down)) @@ -132,145 +141,102 @@ article is automatic MIME decoded.") ;;; @ summary filter ;;; -(defun tm-gnus/decode-summary-from-and-subjects () - (mapcar (lambda (header) - (let ((from (mail-header-from header)) - (subj (mail-header-subject header)) - ) - (mail-header-set-from - header - (if from - (mime-eword/decode-string from) - "")) - (mail-header-set-subject - header - (if subj - (mime-eword/decode-string subj) - "")) - )) - gnus-newsgroup-headers) - ) - -(add-hook 'gnus-select-group-hook - (function tm-gnus/decode-summary-from-and-subjects)) +(cond ((not (boundp 'nnheader-encoded-words-decoding)) + (defun tm-gnus/decode-summary-from-and-subjects () + (mapcar (lambda (header) + (let ((from (mail-header-from header)) + (subj (mail-header-subject header)) + ) + (mail-header-set-from + header + (if from + (mime-eword/decode-string from) + "")) + (mail-header-set-subject + header + (if subj + (mime-eword/decode-string subj) + "")) + )) + gnus-newsgroup-headers) + ) + (add-hook 'gnus-select-group-hook + (function tm-gnus/decode-summary-from-and-subjects)) + )) ;;; @ article filter ;;; -(setq gnus-show-mime-method (function mime/decode-message-header)) - +(defun tm-gnus/preview-article () + (if (get-buffer tm-gnus/original-article-buffer) + (kill-buffer tm-gnus/original-article-buffer) + ) + (rename-buffer tm-gnus/original-article-buffer) + (set-buffer (get-buffer-create gnus-article-buffer)) + (make-local-variable 'tm:mother-button-dispatcher) + (setq tm:mother-button-dispatcher + (function gnus-article-push-button)) + (mime/viewer-mode + nil nil nil tm-gnus/original-article-buffer gnus-article-buffer) + (run-hooks 'tm-gnus/article-prepare-hook) + ) -;;; @ automatic MIME preview support -;;; +(setq gnus-show-mime-method (function tm-gnus/preview-article)) -(defun tm-gnus/summary-toggle-header (&optional arg) - (interactive "P") - (if tm-gnus/decode-all - (let ((mime-viewer/ignored-field-list - (if (save-window-excursion - (switch-to-buffer tm-gnus/preview-buffer) - (some-element - (lambda (field) - (rfc822/get-field-body field) - ) - mime-viewer/ignored-field-list)) - mime-viewer/ignored-field-list))) - (gnus-summary-select-article t t) - ) - (gnus-summary-toggle-header arg) - )) +(or (fboundp 'tm::gnus-article-hide-headers-if-wanted) + (fset 'tm::gnus-article-hide-headers-if-wanted + (symbol-function 'gnus-article-hide-headers-if-wanted)) + ) -(defun tm-gnus/set-mime-method (mode) - (if mode - (progn - (setq gnus-show-mime nil) - (setq gnus-article-display-hook - (list (function (lambda () - (mime/viewer-mode) - (gnus-set-mode-line 'article) - )))) - (set-alist 'gnus-window-to-buffer 'article tm-gnus/preview-buffer) - (setq gnus-article-buffer tm-gnus/preview-buffer) - ) - (setq gnus-show-mime t) - (setq gnus-article-display-hook tm-gnus/original-article-display-hook) - (set-alist 'gnus-window-to-buffer 'article gnus-clean-article-buffer) - (setq gnus-article-buffer gnus-clean-article-buffer) +(defun gnus-article-hide-headers-if-wanted () + (if (not gnus-show-mime) + (tm::gnus-article-hide-headers-if-wanted) )) -(defun tm-gnus/toggle-mime (arg) - "Toggle MIME processing mode. -With arg, turn MIME processing on if arg is positive." - (interactive "P") - (setq tm-gnus/decode-all - (if (null arg) - (not tm-gnus/decode-all) - arg)) - (gnus-set-global-variables) - (tm-gnus/set-mime-method tm-gnus/decode-all) - (gnus-summary-select-article gnus-show-all-headers 'force) - ) -(if tm-gnus/automatic-MIME-preview-support - (progn - (define-key gnus-summary-mode-map - "t" (function tm-gnus/summary-toggle-header)) - (define-key gnus-summary-mode-map "\et" (function tm-gnus/toggle-mime)) - - (tm-gnus/set-mime-method tm-gnus/decode-all) - - (add-hook 'gnus-exit-gnus-hook - (lambda () - (let ((buf (get-buffer tm-gnus/preview-buffer))) - (if buf - (kill-buffer buf) - )))) - ) - (setq gnus-article-display-hook tm-gnus/original-article-display-hook) - (setq gnus-show-mime t) - ) - - -;;; @ for tm-comp +;;; @ for mh-e ;;; (call-after-loaded - 'tm-comp + 'tm-mh-e (function (lambda () - (set-alist 'mime/message-sender-alist - 'news-reply-mode - (function gnus-inews-news)) - ))) - - -;;; @ for mime.el -;;; ;;; by OKABE Yasuo ;;; -;;; Please use following setting: -;;; (setq gnus-mail-forward-method -;;; (function gnus-mail-forward-using-mhe-mime)) - +;; Please use following setting: +;; +;; (autoload 'gnus-mail-forward-using-mhe-mime "tm-mh-e" +;; "Forward using mh-e with tm-edit." t) +;; (setq gnus-mail-forward-method +;; (function gnus-mail-forward-using-mhe-mime)) +;; (defun gnus-mail-forward-using-mhe-mime (&optional buffer) "Forward the current message to another user using mh-e with mime-mode." ;; First of all, prepare mhe mail buffer. + (require 'mh-comp) + (require 'tm-edit) (let* ((to (read-string "To: ")) (cc (read-string "Cc: ")) - (buffer (or buffer gnus-clean-article-buffer)) - (config (current-window-configuration));; need to add this - erik + (buffer (save-excursion + (set-buffer gnus-article-buffer) + (if (eq major-mode 'mime/viewer-mode) + mime::preview/article-buffer + (current-buffer) + ))) + (config (current-window-configuration)) ; need to add this - erik (subject (gnus-forward-make-subject buffer))) (setq mh-show-buffer buffer) (mh-find-path) - (mh-send-sub to (or cc "") (or subject "(None)") config);; Erik Selberg 1/23/94 + (mh-send-sub to (or cc "") + (or subject "(None)") config) ; Erik Selberg 1/23/94 (let ((draft (current-buffer)) (gnus-mail-buffer (current-buffer)) mail-buf) (gnus-configure-windows 'reply-yank) (setq mail-buf (eval (cdr (assq 'mail gnus-window-to-buffer)))) - (pop-to-buffer mail-buf);; always in the display, so won't have window probs + (pop-to-buffer mail-buf) ; always in the display, so won't have window probs (switch-to-buffer draft) ) (save-excursion @@ -283,6 +249,23 @@ With arg, turn MIME processing on if arg is positive." (run-hooks 'gnus-mail-hook) ))) +))) + + +;;; @ for BBDB +;;; + +(defun tm-gnus/bbdb-setup () + (if (memq 'bbdb/gnus-update-record gnus-article-prepare-hook) + (progn + (remove-hook 'gnus-article-prepare-hook 'bbdb/gnus-update-record) + (add-hook 'tm-gnus/article-prepare-hook 'bbdb/gnus-update-record) + ))) + +(add-hook 'gnus-startup-hook 'tm-gnus/bbdb-setup t) + +(tm-gnus/bbdb-setup) + ;;; @ end ;;; diff --git a/gnus/tm-sgnus.el b/gnus/tm-sgnus.el index 3ce2136..13f182e 100644 --- a/gnus/tm-sgnus.el +++ b/gnus/tm-sgnus.el @@ -14,19 +14,14 @@ (require 'tl-list) (require 'tl-misc) (require 'gnus) - -(autoload 'mime/viewer-mode "tm-view" "View MIME message." t) -(autoload 'mime/decode-message-header - "tm-ew-d" "Decode MIME encoded-words in message header." t) -(autoload 'mime-eword/decode-string - "tm-ew-d" "Decode MIME encoded-words in string." t) +(require 'tm-view) ;;; @ version ;;; (defconst tm-gnus/RCS-ID - "$Id: tm-sgnus.el,v 7.12 1995/10/29 14:13:08 morioka Exp $") + "$Id: tm-sgnus.el,v 7.13 1995/10/31 08:53:36 morioka Exp $") (defconst tm-gnus/version (concat (get-version-string tm-gnus/RCS-ID) " for September")) diff --git a/mh-e/Makefile b/mh-e/Makefile index 489a3c5..7ab2b2d 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.10.tar +TARFILE = tm-mh-e7.12.tar elc: diff --git a/mh-e/tm-mh-e.el b/mh-e/tm-mh-e.el index 4aa2977..74c51f4 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.10 1995/10/30 03:19:18 morioka Exp $") + "$Id: tm-mh-e.el,v 7.12 1995/10/31 15:27:51 morioka Exp $") (defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID)) @@ -330,6 +330,7 @@ With arg, turn MIME processing on if arg is positive." ))) + ;;; @ set up ;;; diff --git a/mh-e/tm-mh-e3.el b/mh-e/tm-mh-e3.el index f534cb7..b3dea2f 100644 --- a/mh-e/tm-mh-e3.el +++ b/mh-e/tm-mh-e3.el @@ -1,5 +1,5 @@ ;;; -;;; $Id: tm-mh-e3.el,v 5.0 1995/06/22 03:36:07 morioka Exp $ +;;; $Id: tm-mh-e3.el,v 6.0 1995/10/31 14:24:41 morioka Exp $ ;;; ;;; This is a part of tm-mh-e.el which is a module for old mh-e ;;; to emulate mh-e 4.*. @@ -38,4 +38,8 @@ The value of mh-show-mode-hook is called when a new message is displayed." (fset 'mh-show-msg (symbol-function 'mh-show)) + +(provide 'mh-comp) + + (provide 'tm-mh-e3) diff --git a/mk-tm b/mk-tm index 117e3b2..68431f9 100644 --- a/mk-tm +++ b/mk-tm @@ -32,8 +32,8 @@ '("signature" "tm-def" "tm-ew-d" "tm-ew-e" "tm-eword" - "tm-parse" "tm-view" "tm-play" - "tm-latex" "tm-w3" "tm-tar" "tm-partial" + "tm-parse" "tm-view" "tm-play" "tm-partial" + "tm-latex" "tm-w3" "tm-tar" "tm-file" "tm-mail" "tm-rmail" "tm-edit" "tm-setup" "mime-setup" )) diff --git a/tm-edit.el b/tm-edit.el index 8533700..56afc1d 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/10/29 06:15:49 $|$Revision: 7.14 $|~/misc/mime.el.Z| +;; $Date: 1995/11/03 08:32:03 $|$Revision: 7.15 $|~/misc/mime.el.Z| ;;; Code: @@ -125,7 +125,7 @@ ;;; (defconst mime-editor/RCS-ID - "$Id: tm-edit.el,v 7.14 1995/10/29 06:15:49 morioka Exp $") + "$Id: tm-edit.el,v 7.15 1995/11/03 08:32:03 morioka Exp morioka $") (defconst mime-editor/version (get-version-string mime-editor/RCS-ID)) @@ -211,7 +211,9 @@ To insert a signature file specified by mime-signature-file ) ("html" ;;("charset" "" "ISO-2022-JP" "US-ASCII" "ISO-8859-1" "ISO-8859-8") - )) + ) + ("x-rot13-47") + ) ("message" ("external-body" ("access-type" @@ -238,6 +240,7 @@ To insert a signature file specified by mime-signature-file ("image" ("gif") ("jpeg") + ("tiff") ("x-pic") ("x-xwd") ("x-xbm") @@ -277,6 +280,9 @@ To insert a signature file specified by mime-signature-file ("\\.el$" "application" "octet-stream" (("name" . file) ("type" . "emacs-lisp")) "7bit") + ("\\.lsp$" + "application" "octet-stream" (("name" . file) + ("type" . "common-lisp")) "7bit") ("\\.tar.gz$" "application" "octet-stream" (("name" . file) ("type" . "tar") @@ -1407,6 +1413,13 @@ while if FLAG is `\\^M' (control-M) the text is hidden." ;; Define charset for text if necessary. (setq charset (or charset (mime-editor/choose-charset))) (mime-editor/define-charset charset) + (if (string-equal contype "text/x-rot13-47") + (save-excursion + (forward-line) + (set-mark (point)) + (goto-char (mime-editor/content-end)) + (mime-editor/caesar-region) + )) ;; Point is now on current tag. ;; Define encoding and encode text if necessary. (if (null encoding) ;Encoding is not specified. @@ -1708,7 +1721,8 @@ a recording host instead of local host." (cond ((and (<= nparts 1)(not multipart)) ;; It's a singular message. (goto-char (point-min)) - (while (re-search-forward mime-editor/single-part-tag-regexp nil t) + (while (re-search-forward + mime-editor/single-part-tag-regexp nil t) (setq tag (buffer-substring (match-beginning 0) (match-end 0))) (delete-region (match-beginning 0) (1+ (match-end 0))) @@ -1718,7 +1732,8 @@ a recording host instead of local host." (t ;; It's a multipart message. (goto-char (point-min)) - (while (re-search-forward mime-editor/single-part-tag-regexp nil t) + (while (re-search-forward + mime-editor/single-part-tag-regexp nil t) (setq tag (buffer-substring (match-beginning 0) (match-end 0))) (delete-region (match-beginning 0) (match-end 0)) @@ -1794,16 +1809,72 @@ a recording host instead of local host." (end (match-end 0)) ) (delete-region beg end) - (if (not (looking-at mime-editor/single-part-tag-regexp)) + (if (and (not (looking-at mime-editor/single-part-tag-regexp)) + (not (eobp))) (insert (concat (mime-make-text-tag) "\n")) ))) - (setq boundary (nth 2 (mime-editor/translate-region bb eb boundary t))) + (setq boundary + (nth 2 (mime-editor/translate-region bb eb + boundary t))) (goto-char bb) (insert (format "--[[multipart/%s; boundary=\"%s\"][7bit]]\n" type boundary)) - boundary) - ))) + 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 diff --git a/tm-file.el b/tm-file.el new file mode 100644 index 0000000..6eae652 --- /dev/null +++ b/tm-file.el @@ -0,0 +1,64 @@ +;;; +;;; tm-file.el --- tm-view internal method for file extraction +;;; +;;; Copyright (C) 1995 Free Software Foundation, Inc. +;;; Copyright (C) 1995 MORIOKA Tomohiko +;;; +;;; Author: MORIOKA Tomohiko +;;; Version: +;;; $Id: tm-file.el,v 2.0 1995/11/06 16:05:29 morioka Exp $ +;;; Keywords: mail, news, MIME, multimedia +;;; +;;; This file is part of tm (Tools for MIME). +;;; + +(require 'tm-view) + +(defun mime-article/extract-file (beg end cal) + (let* ((name (or (cdr (assoc "name" cal)) + (cdr (assoc "x-name" cal)) + (make-temp-name "tm"))) + (encoding (cdr (assq 'encoding cal))) + (dir (call-interactively + (function + (lambda (dir) + (interactive "Ddirictory: ") + dir)))) + (file-coding-system *noconv*) + (filename (expand-file-name name dir)) + (the-buf (current-buffer)) + (tmp-buf (generate-new-buffer name)) + ) + (goto-char beg) + (re-search-forward "\n\n") + (append-to-buffer tmp-buf (match-end 0) end) + (save-excursion + (set-buffer tmp-buf) + (mime/decode-region encoding (point-min)(point-max)) + (let ((file-coding-system *noconv*) + jka-compr-compression-info-list + jam-zcat-filename-list) + (write-file filename) + ) + (kill-buffer tmp-buf) + ))) + + +;;; @ setup +;;; + +(set-atype 'mime/content-decoding-condition + '((mode . "extract") + (method . mime-article/extract-file) + )) + +(set-atype 'mime/content-decoding-condition + '((type . "application/octet-stream") + (method . mime-article/extract-file) + )) + + +;;; @ end +;;; + +(provide 'tm-file) diff --git a/tm-mail.el b/tm-mail.el new file mode 100644 index 0000000..e37229c --- /dev/null +++ b/tm-mail.el @@ -0,0 +1,78 @@ +;;; +;;; $Id: tm-mail.el,v 1.1 1995/11/04 08:22:24 morioka Exp $ +;;; + +(require 'tm-view) + +(autoload 'mime-editor/caesar-region "tm-edit" nil t) + +(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) + )) + +(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)) + (mime-editor/caesar-region) + ) + (view-mode) + )) + +(set-atype 'mime/content-decoding-condition + '((type . "message/rfc822") + (method . mime-article/view-message/rfc822) + )) + +(set-atype 'mime/content-decoding-condition + '((type . "text/x-rot13-47") + (method . mime-article/decode-caesar) + )) + +(provide 'tm-mail) diff --git a/tm-play.el b/tm-play.el index 4956b4f..ef3cc3f 100644 --- a/tm-play.el +++ b/tm-play.el @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: tm-play.el,v 2.0 1995/10/23 09:26:41 morioka Exp $ +;;; $Id: tm-play.el,v 4.0 1995/11/04 07:51:22 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia ;;; ;;; This file is part of tm (Tools for MIME). @@ -207,7 +207,9 @@ (switch-to-buffer "*MIME-temp*") (let ((i 1) (max (string-to-int total)) - ) + (file-coding-system-for-read (if (boundp 'MULE) + *noconv*)) + kanji-fileio-code) (catch 'tag (while (<= i max) (setq file (concat root-dir "/" (int-to-string i))) @@ -229,7 +231,11 @@ ) (progn (delete-other-windows) - (find-file file) + (let ((file-coding-system-for-read + (if (boundp 'MULE) *noconv*)) + kanji-fileio-code) + (find-file file) + ) (setq major-mode 'mime/show-message-mode) (mime/viewer-mode mother) (pop-to-buffer (current-buffer)) diff --git a/tm-rmail.el b/tm-rmail.el index 9fef7ea..dc001cd 100644 --- a/tm-rmail.el +++ b/tm-rmail.el @@ -4,7 +4,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: tm-rmail.el,v 7.8 1995/10/30 05:52:36 morioka Exp $ +;;; $Id: tm-rmail.el,v 7.12 1995/11/02 12:20:51 morioka Exp $ ;;; Keywords: mail, MIME, multimedia, multilingual, encoded-word ;;; ;;; This file is part of tm (Tools for MIME). @@ -57,7 +57,8 @@ (function (lambda () (cons (mime/Content-Type) - (mail-fetch-field "Content-Transfer-Encoding")) + (rfc822/get-field-body "Content-Transfer-Encoding") + ) ))))) (mime/viewer-mode nil (car ret)(cdr ret) nil (format "*Preview-%s [%d/%d]*" @@ -162,7 +163,7 @@ (lambda () (rmail-summary-goto-msg (count-lines 1 (point))) (pop-to-buffer rmail-buffer) - (tm-rmail/view-message) + (tm-rmail/preview-message) ))) ))) @@ -201,7 +202,7 @@ from rmail. The message will be appended if being composed." (goto-char (point-max)) (forward-line 1) (setq beginning (point)) - (tm-edit/insert-tag "message" "rfc822") + (mime-editor/insert-tag "message" "rfc822") (insert-buffer forwarding-buffer)) (if (not initialized) (goto-char beginning)) @@ -211,7 +212,7 @@ from rmail. The message will be appended if being composed." 'tm-rmail/forward rmail-mode-map) -(defun tm-rmail/forward-from-gnus () +(defun gnus-mail-forward-using-mail-mime () "\ Forward current article in message/rfc822 content-type message from GNUS. The message will be appended if being composed." diff --git a/tm-view.el b/tm-view.el index 7c88bd7..823a268 100644 --- a/tm-view.el +++ b/tm-view.el @@ -25,7 +25,7 @@ ;;; (defconst mime-viewer/RCS-ID - "$Id: tm-view.el,v 7.21 1995/10/30 05:57:27 morioka Exp $") + "$Id: tm-view.el,v 7.22 1995/11/03 09:05:23 morioka Exp $") (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID)) (defconst mime/viewer-version mime-viewer/version) @@ -238,7 +238,7 @@ ;;; (defvar mime/show-mode-old-window-configuration nil) -(defvar mime/mother-buffer nil) +(defvar mime::preview/mother-buffer nil) (defvar mime::article/content-info nil) (defvar mime::article/preview-buffer nil) @@ -253,7 +253,7 @@ (defun mime-viewer/quitting-method-for-mime/show-message-mode () (set-window-configuration mime/show-mode-old-window-configuration) - (let ((mother mime/mother-buffer)) + (let ((mother mime::preview/mother-buffer)) (kill-buffer (mime::preview-content-info/buffer (car mime::preview/content-list))) (mime-viewer/kill-buffer) @@ -587,7 +587,9 @@ The compressed face will be piped to this command.") ;;; @ content filter ;;; -(defvar mime-viewer/code-converter-alist nil) +(defvar mime-viewer/code-converter-alist + '((mime/show-message-mode . mime/code-convert-region-to-emacs)) + ) (defun mime-viewer/default-code-convert-region (beg end charset &optional encoding) @@ -595,19 +597,23 @@ The compressed face will be piped to this command.") (mime/code-convert-region-to-emacs beg (point-max) charset) )) +(defun mime-preview/decode-text-region (beg end charset encoding) + (mime/decode-region encoding beg end) + (let* ((mode mime::preview/original-major-mode) + (m (assq mode mime-viewer/code-converter-alist)) + ) + (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) + ))) + (defun mime-viewer/filter-text/plain (ctype params encoding) (let ((charset (cdr (assoc "charset" params))) (beg (point-min)) (end (point-max)) ) - (mime/decode-region encoding beg end) - (let* ((mode mime::preview/original-major-mode) - (m (assq mode mime-viewer/code-converter-alist)) - ) - (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) - ))) + (mime-preview/decode-text-region beg end charset encoding) + ) (goto-char (point-max)) (if (not (eq (char-after (1- (point))) ?\n)) (insert "\n") @@ -716,8 +722,8 @@ listed in key order: 'mime/show-mode-old-window-configuration) (setq mime/show-mode-old-window-configuration (current-window-configuration)) - (make-variable-buffer-local 'mime/mother-buffer) - (setq mime/mother-buffer mother) + (make-variable-buffer-local 'mime::preview/mother-buffer) + (setq mime::preview/mother-buffer mother) )) (use-local-map mime/viewer-mode-map) (make-variable-buffer-local 'mime::preview/content-list) -- 1.7.10.4