tm 7.26.
authormorioka <morioka>
Mon, 9 Mar 1998 11:38:41 +0000 (11:38 +0000)
committermorioka <morioka>
Mon, 9 Mar 1998 11:38:41 +0000 (11:38 +0000)
14 files changed:
Changes-7.26.en [new file with mode: 0644]
Changes-7.26.ja [new file with mode: 0644]
Makefile
gnus/Makefile
gnus/tm-gnus.el
mh-e/mk-tmh
mh-e/tm-mh-e.el
mk-tm
signature.el
tm-edit.el
tm-html.el [new file with mode: 0644]
tm-partial.el
tm-play.el
tm-vm.el

diff --git a/Changes-7.26.en b/Changes-7.26.en
new file mode 100644 (file)
index 0000000..d181a86
--- /dev/null
@@ -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
+<figueire@lspsun2.epfl.ch>.
+----------------------------
+revision 7.8
+date: 1995/11/16 11:20:57;  author: morioka;  state: Exp;  lines: +2 -2
+SHIONO Jun'ichi <jun@case.nm.fujitsu.co.jp>'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 (file)
index 0000000..f5c7e6f
--- /dev/null
@@ -0,0 +1,101 @@
+* tl
+
+  Version 7.01.7 \e$B$rE:IU$7$?!#\e(B
+
+
+* tm
+
+signature.el
+----------------------------
+revision 7.0
+date: 1995/11/16 16:28:53;  author: morioka;  state: Exp;  lines: +2 -2
+\e$B$d$C$Q$j!"\e(Bsignature-insert-at-eof \e$B$N=i4|CM$r\e(B nil \e$B$KLa$7$?!#\e(B
+----------------------------
+revision 6.0
+date: 1995/11/16 16:28:17;  author: morioka;  state: Exp;  lines: +10 -11
+\e$B4X?t\e(B signature/insert-signature-at-eof \e$B$G\e(B save-excursion \e$B$7$J$$$3$H$K\e(B
+\e$B$7$?!#\e(B
+----------------------------
+revision 5.0
+date: 1995/11/16 15:05:53;  author: morioka;  state: Exp;  lines: +2 -2
+\e$BJQ?t\e(B signature-insert-at-eof \e$B$N=i4|CM$r\e(B t \e$B$KJQ$($?!#\e(B
+----------------------------
+
+tm-edit.el
+----------------------------
+revision 7.26
+date: 1995/11/16 16:32:36;  author: morioka;  state: Exp;  lines: +140 -107
+multipart \e$B$N>l9g$N5,3J2r<a>e$N8m$j$r=$@5$7$?!#\e(B
+----------------------------
+
+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' \e$B$r8F$V$h$&$K$7$?!#\e(B
+----------------------------
+revision 7.0
+date: 1995/11/16 15:42:08;  author: morioka;  state: Exp;  lines: +1 -6
+\e$BJQ?t\e(B mime-viewer/html-default-mode \e$B$rGQ;_$7$?!#\e(B
+----------------------------
+revision 6.0
+date: 1995/11/16 15:40:04;  author: morioka;  state: Exp;  lines: +3 -3
+\e$B4X?t\e(B mime-viewer/decode-html \e$B$r\e(B `mime-article/decode-html' \e$B$K2~L>$7$?!#\e(B
+----------------------------
+revision 5.0
+date: 1995/11/16 15:38:16;  author: morioka;  state: Exp;  lines: +3 -3
+tm-html.el \e$B$K2~L>$7$?!#\e(B
+----------------------------
+revision 4.0
+date: 1995/11/16 15:35:57;  author: morioka;  state: Exp;  lines: +8 -2
+\e$B4X?t\e(B mime-viewer/decode-html \e$B$N6I=jJQ?t\e(B `encoding' \e$B$rB+G{$9$k$N$rK:$l\e(B
+\e$B$F$$$?$N$r=$@5$7$?!#\e(B
+----------------------------
+
+tm-partial.el
+----------------------------
+revision 7.11
+date: 1995/11/16 15:51:10;  author: morioka;  state: Exp;  lines: +2 -1
+(require 'tm-play) \e$B$rF~$l$?!#\e(B
+----------------------------
+
+tm-play.el
+----------------------------
+revision 7.2
+date: 1995/11/16 15:12:43;  author: morioka;  state: Exp;  lines: +3 -2
+\e$B4X?t\e(B mime-article/decode-caesar \e$B$N6I=jJQ?t\e(B `charset', `encoding' \e$B$NDj\e(B
+\e$B5A$K4X$9$k%_%9$r=$@5$7$?!#\e(B
+----------------------------
+
+tm-vm.el
+----------------------------
+revision 7.10
+date: 1995/11/16 17:07:02;  author: morioka;  state: Exp;  lines: +3 -2
+\e$B4X?t\e(B tm-vm/quit \e$B$G!"\e(Bmime::article/preview-buffer \e$B$,B8:_$9$k$+$I$&$+$N\e(B
+check \e$B$r9T$&$h$&$K$7$?!#\e(B
+----------------------------
+revision 7.9
+date: 1995/11/16 17:04:03;  author: morioka;  state: Exp;  lines: +29 -1
+Oscar Figueiredo <figueire@lspsun2.epfl.ch> \e$B:n$N4X?t\e(B
+tm-vm/expunge-folder \e$B$rDI2C$7$?!#\e(B
+----------------------------
+revision 7.8
+date: 1995/11/16 11:20:57;  author: morioka;  state: Exp;  lines: +2 -2
+\e$B1vLn!wM7$S?M\e(B <jun@case.nm.fujitsu.co.jp> \e$B$5$s$N\e(B patch \e$B$rEv$F$?!#\e(B
+(c.f. [tm ML:1112])
+----------------------------
+
+
+* tm/gnus
+
+  Version 7.16.1 \e$B$rE:IU$7$?!#\e(B
+
+tm-gnus.el
+----------------------------
+revision 7.5
+date: 1995/11/16 15:28:58;  author: morioka;  state: Exp;  lines: +2 -2
+\e$B4X?t\e(B tm-gnus/insert-article \e$B$K$*$$$F!"\e(B
+`mime-editor/yank-ignored-fields-regexp' \e$B$r\e(B
+`mime-editor/yank-ignored-field-regexp' \e$B$KJQ$($k$N$rK:$l$F$$$?$N$r=$@5\e(B
+\e$B$7$?!#\e(B
+----------------------------
index c69ddba..b36b2e8 100644 (file)
--- 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:
index 60cef77..2f7a930 100644 (file)
@@ -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:
index 1191297..0b4f153 100644 (file)
@@ -6,7 +6,7 @@
 ;;;
 ;;; Author: Morioka Tomohiko <morioka@jaist.ac.jp>
 ;;; 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) "")
                                      ))
index 822e267..23ffb5b 100644 (file)
@@ -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)
   )
 
index 559388e..32fdf77 100644 (file)
@@ -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 (file)
--- 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)
   )
 
index e577f90..ecd1673 100644 (file)
@@ -8,7 +8,7 @@
 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;;         OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp> (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).
                              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)
index 05311fc..477eb46 100644 (file)
 ;; 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:
 
 ;;;
 
 (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
+         ))))
+
 \f
 ;; 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 (file)
index 0000000..6558311
--- /dev/null
@@ -0,0 +1,47 @@
+;;;
+;;; tm-html.el: a tm-view internal decoder for HTML
+;;;
+;;; by MORIOKA Tomohiko <morioka@jaist.ac.jp> (1995/09/14)
+;;;
+;;; based on tm-latex.el by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
+;;;
+;;; $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)
index 755c017..e2f7dd1 100644 (file)
@@ -8,13 +8,14 @@
 ;;; Author: OKABE Yasuo @ Kyoto University
 ;;;         MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; 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)
    
index 7fbe1f0..abd21ce 100644 (file)
@@ -6,7 +6,7 @@
 ;;;
 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; 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).
         (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))
index adb0e0a..223abcf 100644 (file)
--- 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 <figueire@lspsun2.epfl.ch>
+(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 <figueire@lspsun2.epfl.ch>
+;;     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