From: morioka Date: Mon, 9 Mar 1998 11:38:41 +0000 (+0000) Subject: tm 7.26. X-Git-Tag: tm7_26~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4ff21287b9b75175bc14d7f2a337612849fe8b82;p=elisp%2Ftm.git tm 7.26. --- diff --git a/Changes-7.26.en b/Changes-7.26.en new file mode 100644 index 0000000..d181a86 --- /dev/null +++ b/Changes-7.26.en @@ -0,0 +1,102 @@ +* tl + + Attached version 7.01.7. + + +* tm + +signature.el +---------------------------- +revision 7.0 +date: 1995/11/16 16:28:53; author: morioka; state: Exp; lines: +2 -2 +Default value of variable `signature-insert-at-eof' was recovered to +nil. +---------------------------- +revision 6.0 +date: 1995/11/16 16:28:17; author: morioka; state: Exp; lines: +10 -11 +Function `signature/insert-signature-at-eof' was modified not to do +save-excursion. +---------------------------- +revision 5.0 +date: 1995/11/16 15:05:53; author: morioka; state: Exp; lines: +2 -2 +Default value of variable `signature-insert-at-eof' was changed to t. +---------------------------- + +tm-edit.el +---------------------------- +revision 7.26 +date: 1995/11/16 16:32:36; author: morioka; state: Exp; lines: +140 -107 +fixed mistake about multipart boundary in RFC 1521 interpretation. +---------------------------- + +tm-html.el +---------------------------- +revision 7.1 +date: 1995/11/16 15:43:34; author: morioka; state: Exp; lines: +2 -1 +call `mime-article/decode-html-hook'. +---------------------------- +revision 7.0 +date: 1995/11/16 15:42:08; author: morioka; state: Exp; lines: +1 -6 +Variable `mime-viewer/html-default-mode' was abolished. +---------------------------- +revision 6.0 +date: 1995/11/16 15:40:04; author: morioka; state: Exp; lines: +3 -3 +Function `mime-viewer/decode-html' was renamed to +`mime-article/decode-html'. +---------------------------- +revision 5.0 +date: 1995/11/16 15:38:16; author: morioka; state: Exp; lines: +3 -3 +renamed to tm-html.el. +---------------------------- +revision 4.0 +date: 1995/11/16 15:35:57; author: morioka; state: Exp; lines: +8 -2 +Function `mime-viewer/decode-html' was fixed to bind local variable +`encoding'. +---------------------------- + +tm-partial.el +---------------------------- +revision 7.11 +date: 1995/11/16 15:51:10; author: morioka; state: Exp; lines: +2 -1 +insert (require 'tm-play). +---------------------------- + +tm-play.el +---------------------------- +revision 7.2 +date: 1995/11/16 15:12:43; author: morioka; state: Exp; lines: +3 -2 +Function `mime-article/decode-caesar' was fixed mistake of local +variable `charset' and `encoding'. +---------------------------- + +tm-vm.el +---------------------------- +revision 7.10 +date: 1995/11/16 17:07:02; author: morioka; state: Exp; lines: +3 -2 +Function `tm-vm/quit' was fixed to check +`mime::article/preview-buffer' is exist or not. +---------------------------- +revision 7.9 +date: 1995/11/16 17:04:03; author: morioka; state: Exp; lines: +29 -1 +New function `tm-vm/expunge-folder' by Oscar Figueiredo +. +---------------------------- +revision 7.8 +date: 1995/11/16 11:20:57; author: morioka; state: Exp; lines: +2 -2 +SHIONO Jun'ichi 's patch was applied. +(c.f. [tm ML:1112]) +---------------------------- + + +* tm/gnus + + Attached Version 7.16.1. + +tm-gnus.el +---------------------------- +revision 7.5 +date: 1995/11/16 15:28:58; author: morioka; state: Exp; lines: +2 -2 +Function `tm-gnus/insert-article was fixed to change +`mime-editor/yank-ignored-fields-regexp' to +`mime-editor/yank-ignored-field-regexp'. +---------------------------- diff --git a/Changes-7.26.ja b/Changes-7.26.ja new file mode 100644 index 0000000..f5c7e6f --- /dev/null +++ b/Changes-7.26.ja @@ -0,0 +1,101 @@ +* tl + + Version 7.01.7 を添付した。 + + +* tm + +signature.el +---------------------------- +revision 7.0 +date: 1995/11/16 16:28:53; author: morioka; state: Exp; lines: +2 -2 +やっぱり、signature-insert-at-eof の初期値を nil に戻した。 +---------------------------- +revision 6.0 +date: 1995/11/16 16:28:17; author: morioka; state: Exp; lines: +10 -11 +関数 signature/insert-signature-at-eof で save-excursion しないことに +した。 +---------------------------- +revision 5.0 +date: 1995/11/16 15:05:53; author: morioka; state: Exp; lines: +2 -2 +変数 signature-insert-at-eof の初期値を t に変えた。 +---------------------------- + +tm-edit.el +---------------------------- +revision 7.26 +date: 1995/11/16 16:32:36; author: morioka; state: Exp; lines: +140 -107 +multipart の場合の規格解釈上の誤りを修正した。 +---------------------------- + +tm-html.el +---------------------------- +revision 7.1 +date: 1995/11/16 15:43:34; author: morioka; state: Exp; lines: +2 -1 +`mime-article/decode-html-hook' を呼ぶようにした。 +---------------------------- +revision 7.0 +date: 1995/11/16 15:42:08; author: morioka; state: Exp; lines: +1 -6 +変数 mime-viewer/html-default-mode を廃止した。 +---------------------------- +revision 6.0 +date: 1995/11/16 15:40:04; author: morioka; state: Exp; lines: +3 -3 +関数 mime-viewer/decode-html を `mime-article/decode-html' に改名した。 +---------------------------- +revision 5.0 +date: 1995/11/16 15:38:16; author: morioka; state: Exp; lines: +3 -3 +tm-html.el に改名した。 +---------------------------- +revision 4.0 +date: 1995/11/16 15:35:57; author: morioka; state: Exp; lines: +8 -2 +関数 mime-viewer/decode-html の局所変数 `encoding' を束縛するのを忘れ +ていたのを修正した。 +---------------------------- + +tm-partial.el +---------------------------- +revision 7.11 +date: 1995/11/16 15:51:10; author: morioka; state: Exp; lines: +2 -1 +(require 'tm-play) を入れた。 +---------------------------- + +tm-play.el +---------------------------- +revision 7.2 +date: 1995/11/16 15:12:43; author: morioka; state: Exp; lines: +3 -2 +関数 mime-article/decode-caesar の局所変数 `charset', `encoding' の定 +義に関するミスを修正した。 +---------------------------- + +tm-vm.el +---------------------------- +revision 7.10 +date: 1995/11/16 17:07:02; author: morioka; state: Exp; lines: +3 -2 +関数 tm-vm/quit で、mime::article/preview-buffer が存在するかどうかの +check を行うようにした。 +---------------------------- +revision 7.9 +date: 1995/11/16 17:04:03; author: morioka; state: Exp; lines: +29 -1 +Oscar Figueiredo 作の関数 +tm-vm/expunge-folder を追加した。 +---------------------------- +revision 7.8 +date: 1995/11/16 11:20:57; author: morioka; state: Exp; lines: +2 -2 +塩野@遊び人 さんの patch を当てた。 +(c.f. [tm ML:1112]) +---------------------------- + + +* tm/gnus + + Version 7.16.1 を添付した。 + +tm-gnus.el +---------------------------- +revision 7.5 +date: 1995/11/16 15:28:58; author: morioka; state: Exp; lines: +2 -2 +関数 tm-gnus/insert-article において、 +`mime-editor/yank-ignored-fields-regexp' を +`mime-editor/yank-ignored-field-regexp' に変えるのを忘れていたのを修正 +した。 +---------------------------- diff --git a/Makefile b/Makefile index c69ddba..b36b2e8 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# $Id: Makefile,v 7.2 1995/11/11 13:21:34 morioka Exp morioka $ +# $Id: Makefile,v 7.3 1995/11/16 15:45:15 morioka Exp morioka $ # include config.tm @@ -13,7 +13,7 @@ TM_FILES = tm/README.eng tm/Changes* \ 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-ftp.el tm/tm-latex.el tm/tm-w3.el tm/tm-file.el \ + tm/tm-ftp.el tm/tm-latex.el tm/tm-html.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 \ @@ -37,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.25.tar.gz +TARFILE = tm7.26.tar.gz nemacs: diff --git a/gnus/Makefile b/gnus/Makefile index 60cef77..2f7a930 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.16.tar +TARFILE = tm-gnus7.16.1.tar gnus3: diff --git a/gnus/tm-gnus.el b/gnus/tm-gnus.el index 1191297..0b4f153 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.4 1995/11/13 09:28:17 morioka Exp $ +;;; $Id: tm-gnus.el,v 7.5 1995/11/16 15:28:58 morioka Exp $ ;;; Keywords: news, MIME, multimedia, encoded-word, multilingual ;;; ;;; This file is part of tm (Tools for MIME). @@ -54,7 +54,7 @@ mail-yank-hooks ;; for Emacs 18 - (mail-yank-ignored-headers mime-editor/yank-ignored-fields-regexp) + (mail-yank-ignored-headers mime-editor/yank-ignored-field-regexp) (news-make-reply-yank-header (function (lambda (message-id from) "") )) diff --git a/mh-e/mk-tmh b/mh-e/mk-tmh index 822e267..23ffb5b 100644 --- a/mh-e/mk-tmh +++ b/mh-e/mk-tmh @@ -33,6 +33,9 @@ tm-mh-e-modules)) (defun compile-tm-mh-e () + (require 'mh-comp) + (require 'tm-edit) + (require 'tm-mh-e) (mapcar (function byte-compile-file) tm-mh-e-el-files) ) diff --git a/mh-e/tm-mh-e.el b/mh-e/tm-mh-e.el index 559388e..32fdf77 100644 --- a/mh-e/tm-mh-e.el +++ b/mh-e/tm-mh-e.el @@ -27,7 +27,7 @@ ;;; (defconst tm-mh-e/RCS-ID - "$Id: tm-mh-e.el,v 7.20 1995/11/15 12:45:44 morioka Exp $") + "$Id: tm-mh-e.el,v 7.22 1995/11/16 10:20:53 morioka Exp $") (defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID)) @@ -341,11 +341,14 @@ With arg, turn MIME processing on if arg is positive." Defaults to displayed message. If optional prefix argument provided, then prompt for the message sequence. See also documentation for `\\[mh-send]' function." - (interactive (list (mh-read-address "To: ") - (mh-read-address "Cc: ") - (if current-prefix-arg - (mh-read-seq-default "Forward" t) - (mh-get-msg-num t)))) + (interactive (progn + (require 'mh-comp) + (list (mh-read-address "To: ") + (mh-read-address "Cc: ") + (if current-prefix-arg + (mh-read-seq-default "Forward" t) + (mh-get-msg-num t) + )))) (or msg-or-seq (setq msg-or-seq (mh-get-msg-num t))) (if (numberp msg-or-seq) @@ -366,8 +369,8 @@ then prompt for the message sequence. See also documentation for (set-buffer-modified-p nil))) (t (mh-read-draft "" draft-name nil))))) - (let (orig-from - orig-subject) + (let (orig-from orig-subject) + (require 'tm-edit) (goto-char (point-min)) (save-excursion (save-restriction diff --git a/mk-tm b/mk-tm index 86e9d00..a3cdf12 100644 --- a/mk-tm +++ b/mk-tm @@ -1,6 +1,6 @@ ;;; -*-Emacs-Lisp-*- ;;; -;;; $Id: mk-tm,v 7.0 1995/11/12 13:45:18 morioka Exp morioka $ +;;; $Id: mk-tm,v 7.1 1995/11/16 15:44:45 morioka Exp morioka $ ;;; (setq load-path (append @@ -33,7 +33,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-latex" "tm-html" "tm-tar" "tm-file" "tm-rmail" "tm-edit" "tm-setup" "mime-setup" )) @@ -99,6 +99,7 @@ (require 'gnus) (require 'tm-rich) (require 'mel-u) + (require 'tm-edit) (mapcar (function byte-compile-file file) tm-el-files) ) diff --git a/signature.el b/signature.el index e577f90..ecd1673 100644 --- a/signature.el +++ b/signature.el @@ -8,7 +8,7 @@ ;;; Author: MORIOKA Tomohiko ;;; OKABE Yasuo (1994/08/01) ;;; Version: -;;; $Id: signature.el,v 4.0 1995/10/26 09:25:23 morioka Exp $ +;;; $Id: signature.el,v 7.0 1995/11/16 16:28:53 morioka Exp $ ;;; Keywords: mail, news, signature ;;; ;;; This file is part of tm (Tools for MIME). @@ -98,17 +98,16 @@ signature-file-name nil) (signature/get-signature-file-name))))) - (save-excursion - (if (file-readable-p signature) - (progn - (goto-char (point-max)) - (if (not (bolp)) - (insert "\n")) - (delete-blank-lines) - (insert-file-contents signature) - (set-buffer-modified-p (buffer-modified-p)) + (if (file-readable-p signature) + (progn + (goto-char (point-max)) + (if (not (bolp)) + (insert "\n")) + (delete-blank-lines) + (insert-file-contents signature) + (set-buffer-modified-p (buffer-modified-p)) ; force mode line update - ))) + )) signature)) (defun insert-signature (&optional arg) diff --git a/tm-edit.el b/tm-edit.el index 05311fc..477eb46 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/15 14:17:09 $|$Revision: 7.25 $|~/misc/mime.el.Z| +;; $Date: 1995/11/16 16:32:36 $|$Revision: 7.26 $|~/misc/mime.el.Z| ;;; Code: @@ -125,7 +125,7 @@ ;;; (defconst mime-editor/RCS-ID - "$Id: tm-edit.el,v 7.25 1995/11/15 14:17:09 morioka Exp $") + "$Id: tm-edit.el,v 7.26 1995/11/16 16:32:36 morioka Exp $") (defconst mime-editor/version (get-version-string mime-editor/RCS-ID)) @@ -835,16 +835,34 @@ Charset is automatically obtained from the mime-body-charset-chooser." (kill-buffer buffer) ))) -(defun mime-editor/insert-signature () +(defun mime-editor/insert-signature (&optional arg) "Insert a signature file specified by mime-signature-file." - (interactive) - (save-restriction + (interactive "P") + (let ((signature + (expand-file-name + (if arg + (read-file-name "Insert your signature: " + (concat signature-file-name "-") + signature-file-name + nil) + (signature/get-signature-file-name)))) + ) + (if signature-insert-at-eof + (goto-char (point-max)) + ) (apply (function mime-editor/insert-tag) - (prog1 - (mime-find-file-type (insert-signature)) - (narrow-to-region (point-min)(point)) - )) - )) + (mime-find-file-type signature)) + (if (file-readable-p signature) + (progn + (goto-char (point-max)) + (if (not (bolp)) + (insert "\n")) + (delete-blank-lines) + (insert-file-contents signature) + (set-buffer-modified-p (buffer-modified-p)) + ; force mode line update + )))) + ;; Insert a new tag around a point. @@ -854,7 +872,8 @@ If nothing is inserted, return nil." (interactive) (let ((oldtag nil) (newtag nil) - (current (point))) + (current (point)) + exist-prev-tag exist-next-tag) (setq pritype (or pritype (mime-prompt-for-type))) @@ -870,7 +889,13 @@ If nothing is inserted, return nil." (setq oldtag (save-excursion (if (mime-editor/goto-tag) - (buffer-substring (match-beginning 0) (match-end 0)) + (progn + (if (eq current (match-beginning 0)) + (setq exist-next-tag t) + (setq exist-prev-tag t) + ) + (buffer-substring (match-beginning 0) (match-end 0)) + ) ;; Assume content type is 'text/plan'. (mime-make-tag "text" "plain") ))) @@ -879,37 +904,46 @@ If nothing is inserted, return nil." (not (mime-test-content-type (mime-editor/get-contype oldtag) "text"))) (setq oldtag nil)) - (beginning-of-line) - (cond ((and oldtag ;Text - (not (eobp)) - (save-excursion - (forward-line -1) - (looking-at mime-editor/beginning-tag-regexp) - ) - (or mime-ignore-same-text-tag - (not (string-equal oldtag newtag)))) - ;; If point is at the next of current tag, move to the - ;; beginning of the tag to disable insertion of extra tag. - (forward-line -1)) - ((and oldtag ;Text - (not (eobp)) - (not (looking-at mime-editor/tag-regexp)) - (or mime-ignore-same-text-tag - (not (string-equal oldtag newtag)))) - ;; Copy current tag to break a text into two. - (save-excursion - (insert oldtag "\n"))) - ((and (null oldtag) ;Not text - (not (looking-at mime-editor/tag-regexp))) - ;; Adjust insertion point. In the middle of text, it is - ;; okay to break the text into two. However, it should not - ;; be broken into two, if otherwise. - (goto-char (mime-editor/content-end)) - (if (eolp) - (forward-line 1)) - (if (not (bolp)) - (insert "\n")) - )) + (cond (exist-prev-tag (insert "\n")) + (exist-next-tag (save-excursion + (insert "\n") + ))) + ;; (beginning-of-line) + ;; (cond ((and oldtag ;Text + ;; (not (eobp)) + ;; (save-excursion + ;; (forward-line -1) + ;; (looking-at mime-editor/beginning-tag-regexp) + ;; ) + ;; (or mime-ignore-same-text-tag + ;; (not (string-equal oldtag newtag)))) + ;; ;; If point is at the next of current tag, move to the + ;; ;; beginning of the tag to disable insertion of extra tag. + ;; (forward-line -1)) + ;; ((and oldtag ;Text + ;; (not (eobp)) + ;; (not (looking-at mime-editor/tag-regexp)) + ;; (or mime-ignore-same-text-tag + ;; (not (string-equal oldtag newtag)))) + ;; ;; Copy current tag to break a text into two. + ;; (save-excursion + ;; (insert oldtag "\n"))) + ;; ((and (null oldtag) ;Not text + ;; (not (looking-at mime-editor/tag-regexp))) + ;; ;; Adjust insertion point. In the middle of text, it is + ;; ;; okay to break the text into two. However, it should not + ;; ;; be broken into two, if otherwise. + ;; (goto-char (mime-editor/content-end)) + ;; (if (eolp) + ;; (forward-line 1)) + ;; (if (not (bolp)) + ;; (insert "\n")) + ;; )) + (if (not (bolp)) + (if exist-prev-tag + (forward-line 1) + (insert "\n") + )) ;; Make a new tag. (if (or (not oldtag) ;Not text (or mime-ignore-same-text-tag @@ -1398,6 +1432,69 @@ while if FLAG is `\\^M' (control-M) the text is hidden." (insert encoding))) )))) +(defun mime-editor/translate-region (beg end &optional boundary multipart) + (if (null boundary) + (setq boundary + (concat mime-multipart-boundary " " (current-time-string))) + ) + (save-excursion + (save-restriction + (narrow-to-region beg end) + (let ((tag nil) ;MIME tag + (contype nil) ;Content-Type + (encoding nil) ;Content-Transfer-Encoding + (nparts 0)) ;Number of body parts + ;; Normalize the body part by inserting appropriate message + ;; tags for every message contents. + (mime-editor/normalize-body) + ;; Counting the number of Content-Type. + (goto-char (point-min)) + (while (re-search-forward mime-editor/single-part-tag-regexp nil t) + (setq nparts (1+ nparts))) + ;; Begin translation. + (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) + (setq tag + (buffer-substring (match-beginning 0) (match-end 0))) + (delete-region (match-beginning 0) (1+ (match-end 0))) + (setq contype (mime-editor/get-contype tag)) + (setq encoding (mime-editor/get-encoding tag)) + )) + (t + ;; It's a multipart message. + (goto-char (point-min)) + (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)) + (setq contype (mime-editor/get-contype tag)) + (setq encoding (mime-editor/get-encoding tag)) + (insert "--" boundary "\n") + (insert "Content-Type: " contype "\n") + (if encoding + (insert "Content-Transfer-Encoding: " encoding "\n")) + ) + ;; Define Content-Type as "multipart/mixed". + (setq contype + (concat "multipart/mixed; boundary=\"" boundary "\"")) + ;; Content-Transfer-Encoding must be "7bit". + ;; The following encoding can be `nil', but is + ;; specified as is since there is no way that a user + ;; specifies it. + (setq encoding "7bit") + ;; Insert the trailer. + (goto-char (point-max)) + (if multipart + (insert "--" boundary "--\n") + (insert "\n--" boundary "--\n") + ))) + (list contype encoding boundary nparts) + )))) + (defun mime-editor/normalize-body () "Normalize the body part by inserting appropriate message tags." ;; Insert the first MIME tags if necessary. @@ -1751,70 +1848,6 @@ a recording host instead of local host." ;;; mime.el ends here -(defun mime-editor/translate-region (beg end &optional boundary multipart) - (if (null boundary) - (setq boundary - (concat mime-multipart-boundary " " (current-time-string))) - ) - (save-excursion - (save-restriction - (narrow-to-region beg end) - (let ((tag nil) ;MIME tag - (contype nil) ;Content-Type - (encoding nil) ;Content-Transfer-Encoding - (nparts 0)) ;Number of body parts - ;; Normalize the body part by inserting appropriate message - ;; tags for every message contents. - (mime-editor/normalize-body) - ;; Counting the number of Content-Type. - (goto-char (point-min)) - (while (re-search-forward mime-editor/single-part-tag-regexp nil t) - (setq nparts (1+ nparts))) - ;; Begin translation. - (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) - (setq tag - (buffer-substring (match-beginning 0) (match-end 0))) - (delete-region (match-beginning 0) (1+ (match-end 0))) - (setq contype (mime-editor/get-contype tag)) - (setq encoding (mime-editor/get-encoding tag)) - )) - (t - ;; It's a multipart message. - (goto-char (point-min)) - (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)) - (setq contype (mime-editor/get-contype tag)) - (setq encoding (mime-editor/get-encoding tag)) - (insert "--" boundary "\n") - (insert "Content-Type: " contype "\n") - (if encoding - (insert "Content-Transfer-Encoding: " encoding "\n")) - ) - ;; Define Content-Type as "multipart/mixed". - (setq contype - (concat "multipart/mixed; boundary=\"" boundary "\"")) - ;; Content-Transfer-Encoding must be "7bit". - ;; The following encoding can be `nil', but is - ;; specified as is since there is no way that a user - ;; specifies it. - (setq encoding "7bit") - ;; Insert the trailer. - (goto-char (point-max)) - (if (not (= (preceding-char) ?\n)) - ;; Boundary must start with a newline. - (insert "\n")) - (insert "--" boundary "--\n"))) - (list contype encoding boundary nparts) - )))) - - (defun mime-editor/find-inmost () (goto-char (point-min)) (if (re-search-forward mime-editor/multipart-beginning-regexp nil t) diff --git a/tm-html.el b/tm-html.el new file mode 100644 index 0000000..6558311 --- /dev/null +++ b/tm-html.el @@ -0,0 +1,47 @@ +;;; +;;; tm-html.el: a tm-view internal decoder for HTML +;;; +;;; by MORIOKA Tomohiko (1995/09/14) +;;; +;;; based on tm-latex.el by OKABE Yasuo +;;; +;;; $Id: tm-html.el,v 7.1 1995/11/16 15:43:34 morioka Exp $ +;;; + +(require 'tm-view) + +(defun mime-article/decode-html (beg end cal) + (let* ((cur-buf (current-buffer)) + new-buf + (name (or (cdr (assoc "name" cal)) + (cdr (assoc "x-name" cal)) + (concat (make-temp-name "tm") ".html"))) + (encoding (cdr (assoc "encoding" cal))) + ) + (switch-to-buffer mime::article/preview-buffer) + (funcall mime/find-file-function (expand-file-name name mime/tmp-dir)) + (if (or (<= (buffer-size) 0) + (y-or-n-p "Replace the existing buffer?")) + (progn + (erase-buffer) + (setq new-buf (current-buffer)) + (save-excursion + (set-buffer cur-buf) + (goto-char beg) + (re-search-forward "^$") + (append-to-buffer new-buf (+ (match-end 0) 1) end) + ))) + (mime/decode-region encoding (point-min)(point-max)) + (run-hooks 'mime-article/decode-html-hook) + )) + +(set-atype 'mime/content-decoding-condition + '((type . "text/html") + (method . mime-article/decode-html) + )) + + +;;; @ end +;;; + +(provide 'tm-html) diff --git a/tm-partial.el b/tm-partial.el index 755c017..e2f7dd1 100644 --- a/tm-partial.el +++ b/tm-partial.el @@ -8,13 +8,14 @@ ;;; Author: OKABE Yasuo @ Kyoto University ;;; MORIOKA Tomohiko ;;; Version: -;;; $Id: tm-partial.el,v 7.10 1995/10/25 05:25:28 morioka Exp $ +;;; $Id: tm-partial.el,v 7.11 1995/11/16 15:51:10 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia, message/partial ;;; ;;; This file is a part of tm (Tools for MIME). ;;; (require 'tm-view) +(require 'tm-play) (defvar tm-partial/preview-article-method-alist nil) diff --git a/tm-play.el b/tm-play.el index 7fbe1f0..abd21ce 100644 --- a/tm-play.el +++ b/tm-play.el @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: tm-play.el,v 7.1 1995/11/10 11:13:32 morioka Exp $ +;;; $Id: tm-play.el,v 7.2 1995/11/16 15:12:43 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia ;;; ;;; This file is part of tm (Tools for MIME). @@ -308,7 +308,8 @@ (cur-buf (current-buffer)) (new-name (format "%s-%s" (buffer-name) cnum)) (mother mime::article/preview-buffer) - (charset (cdr (assoc "charset" params))) + (charset (cdr (assoc "charset" cal))) + (encoding (cdr (assoc "encoding" cal))) (mode major-mode) str) (setq str (buffer-substring beg end)) diff --git a/tm-vm.el b/tm-vm.el index adb0e0a..223abcf 100644 --- a/tm-vm.el +++ b/tm-vm.el @@ -22,7 +22,7 @@ (require 'vm) (defconst tm-vm/RCS-ID - "$Id: tm-vm.el,v 7.7 1995/11/15 15:35:54 morioka Exp $") + "$Id: tm-vm.el,v 7.10 1995/11/16 17:07:02 morioka Exp $") (defconst tm-vm/version (get-version-string tm-vm/RCS-ID)) (define-key vm-mode-map "Z" 'tm-vm/view-message) @@ -199,7 +199,7 @@ all marked messages are affected, other messages are ignored." (defun tm-vm/scroll-backward () (interactive) (if (not tm-vm/automatic-mime-preview) - (vm-scroll-backward) + (vm-scroll-backward nil) (let* ((summary-buffer (or vm-summary-buffer (and (eq major-mode 'vm-summary-mode) (current-buffer)))) @@ -234,11 +234,38 @@ all marked messages are affected, other messages are ignored." (select-window summary-win))) ))) +;; 1995/11/16 by Oscar Figueiredo +(defun tm-vm/expunge-folder () + (interactive) + (let* ((summary-buf (or (and (eq major-mode 'vm-summary-mode) + (current-buffer)) + vm-summary-buffer)) + (preview-buf (save-excursion + (set-buffer (save-excursion + (set-buffer summary-buf) + vm-mail-buffer)) + mime::article/preview-buffer)) + (preview-win (and preview-buf + (get-buffer-window preview-buf))) + (win (selected-window))) + + (vm-expunge-folder) + (if preview-win + (save-excursion + (set-buffer summary-buf) + (set-buffer vm-mail-buffer) + (if (eq (point-min) (point-max)) + (kill-buffer preview-buf)))) + )) + +;; fixed by Oscar Figueiredo +;; 1995/11/14 (c.f. [tm-eng:162]) (defun tm-vm/quit () (interactive) (save-excursion (set-buffer vm-mail-buffer) - (if mime::article/preview-buffer + (if (and mime::article/preview-buffer + (get-buffer mime::article/preview-buffer)) (kill-buffer mime::article/preview-buffer))) (vm-quit) ) @@ -247,6 +274,8 @@ all marked messages are affected, other messages are ignored." 'tm-vm/scroll-forward vm-mode-map) (substitute-key-definition 'vm-scroll-backward 'tm-vm/scroll-backward vm-mode-map) +(substitute-key-definition 'vm-expunge-folder + 'tm-vm/expunge-folder vm-mode-map) (substitute-key-definition 'vm-quit 'tm-vm/quit vm-mode-map) ;; end