tm 7.11.
authormorioka <morioka>
Mon, 9 Mar 1998 10:55:37 +0000 (10:55 +0000)
committermorioka <morioka>
Mon, 9 Mar 1998 10:55:37 +0000 (10:55 +0000)
Changes-7.11.en [new file with mode: 0644]
Changes-7.11.ja [new file with mode: 0644]
Makefile
mh-e/Makefile
mh-e/tm-mh-e.el
mime-setup.el
tm-comp.el
tm-eword.el
tm-tar.el
tm-view.el

diff --git a/Changes-7.11.en b/Changes-7.11.en
new file mode 100644 (file)
index 0000000..6dc4f0d
--- /dev/null
@@ -0,0 +1,67 @@
+* tl
+
+  Attached version 7.01.
+
+       - tl-cite.el was renamed to mu-cite.el.
+
+
+* tm
+
+tm/mime-setup.el
+----------------------------
+revision 7.3
+date: 1995/10/06 07:17:22;  author: morioka;  state: Exp;  lines: +16 -1
+Code for Gnus 5.*, September Gnus was added.
+----------------------------
+
+tm/tm-comp.el
+----------------------------
+revision 7.2
+date: 1995/10/08 09:31:05;  author: morioka;  state: Exp;  lines: +2 -2
+Fixed a mistake about renaming.
+----------------------------
+revision 7.1
+date: 1995/10/08 09:07:37;  author: morioka;  state: Exp;  lines: +7 -7
+tl-822 was used instead of tl-header.
+----------------------------
+revision 7.0
+date: 1995/10/07 05:44:49;  author: morioka;  state: Exp;  lines: +20 -13
+comment was modified.
+----------------------------
+revision 6.13
+date: 1995/10/07 05:37:40;  author: morioka;  state: Exp;  lines: +5 -3
+Richard Stanton <stanton@haas.berkeley.edu> fixed for OS/2 Emacs.
+----------------------------
+
+tm/tm-eword.el
+----------------------------
+revision 7.3
+date: 1995/10/06 05:44:48;  author: morioka;  state: Exp;  lines: +3 -2
+Function `mime/encode-message-header' was modified to use function
+`buffer-substring-no-properties'.
+----------------------------
+
+tm/tm-view.el
+----------------------------
+revision 7.11
+date: 1995/10/06 07:00:00;  author: morioka;  state: Exp;  lines: +1 -7
+Unnecessary function was deleted.
+----------------------------
+
+
+* tm/mh-e
+
+  Attached version 7.01.
+
+tm/mh-e/tm-mh-e.el
+----------------------------
+revision 7.1
+date: 1995/10/07 08:26:47;  author: morioka;  state: Exp;  lines: +2 -2
+Function `tm-mh-e/cite' was modified to use `save-excursion' instead
+of `save-window-excursion'.
+----------------------------
+revision 7.0
+date: 1995/10/07 08:24:48;  author: morioka;  state: Exp;  lines: +25 -18
+Function `tm-mh-e/cite' was modified to support variable
+`mh-delete-yanked-msg-window' when it is automatic MIME preview mode.
+----------------------------
diff --git a/Changes-7.11.ja b/Changes-7.11.ja
new file mode 100644 (file)
index 0000000..32daa7b
--- /dev/null
@@ -0,0 +1,68 @@
+* tl
+
+  Version 7.01 \e$B$rE:IU$7$?!#\e(B
+
+       - tl-cite.el \e$B$r\e(B mu-cite.el \e$B$K2~L>$7$?!#\e(B
+
+
+* tm
+
+tm/mime-setup.el
+----------------------------
+revision 7.3
+date: 1995/10/06 07:17:22;  author: morioka;  state: Exp;  lines: +16 -1
+Gnus 5.*, September Gnus \e$BBP:vMQ$N\e(B code \e$B$rF~$l$?!#\e(B
+----------------------------
+
+tm/tm-comp.el
+----------------------------
+revision 7.2
+date: 1995/10/08 09:31:05;  author: morioka;  state: Exp;  lines: +2 -2
+\e$BL>A0$NJQ99$7K:$l$r=$@5$7$?!#\e(B
+----------------------------
+revision 7.1
+date: 1995/10/08 09:07:37;  author: morioka;  state: Exp;  lines: +7 -7
+tl-header \e$B$r;H$&$N$r$d$a$F\e(B tl-822 \e$B$r;H$&$h$&$K$7$?!#\e(B
+----------------------------
+revision 7.0
+date: 1995/10/07 05:44:49;  author: morioka;  state: Exp;  lines: +20 -13
+comment \e$B$r=$@5$7$?!#\e(B
+----------------------------
+revision 6.13
+date: 1995/10/07 05:37:40;  author: morioka;  state: Exp;  lines: +5 -3
+Richard Stanton <stanton@haas.berkeley.edu> \e$B$5$s$N\e(B OS/2 \e$BMQ$N\e(B patch \e$B$r\e(B
+\e$BEv$F$?!#\e(B
+----------------------------
+
+tm/tm-eword.el
+----------------------------
+revision 7.3
+date: 1995/10/06 05:44:48;  author: morioka;  state: Exp;  lines: +3 -2
+\e$B4X?t\e(B mime/encode-message-header \e$B$K$*$$$F!"4X?t\e(B
+buffer-substring-no-properties \e$B$r;H$&$h$&$K=$@5$7$?!#\e(B
+----------------------------
+
+tm/tm-view.el
+----------------------------
+revision 7.11
+date: 1995/10/06 07:00:00;  author: morioka;  state: Exp;  lines: +1 -7
+\e$BITMW$J4X?t$r>C5n$7$?!#\e(B
+----------------------------
+
+
+* tm/mh-e
+
+  Version 7.01 \e$B$rE:IU$7$?!#\e(B
+
+tm/mh-e/tm-mh-e.el
+----------------------------
+revision 7.1
+date: 1995/10/07 08:26:47;  author: morioka;  state: Exp;  lines: +2 -2
+\e$B4X?t\e(B tm-mh-e/cite \e$B$K$*$$$F!"\e(Bsave-window-excursion \e$B$r;H$C$F$$$?$H$3$m$r\e(B
+save-excursion \e$B$KJQ$($?!#\e(B
+----------------------------
+revision 7.0
+date: 1995/10/07 08:24:48;  author: morioka;  state: Exp;  lines: +25 -18
+\e$B4X?t\e(B tm-mh-e/cite \e$B$K$*$$$F!"\e(Bautomatic MIME preview mode \e$B$N;~$bJQ?t\e(B
+mh-delete-yanked-msg-window \e$B$,M-8z$K$J$k$h$&$K=$@5$7$?!#\e(B
+----------------------------
index a3b9b15..1db039d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,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.10.tar
+TARFILE = tm7.11.tar
 
 
 nemacs:
index 843dacd..cd4ac7c 100644 (file)
@@ -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-e6.32.tar
+TARFILE = tm-mh-e7.01.tar
 
 
 elc:
index a64edb1..ce5a4b0 100644 (file)
@@ -26,7 +26,7 @@
 ;;;
 
 (defconst tm-mh-e/RCS-ID
-  "$Id: tm-mh-e.el,v 6.34 1995/09/22 00:07:42 morioka Exp $")
+  "$Id: tm-mh-e.el,v 7.1 1995/10/07 08:26:47 morioka Exp $")
 
 (defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID))
 
@@ -175,23 +175,30 @@ With arg, turn MIME processing on if arg is positive."
 (defun tm-mh-e/cite ()
   (interactive)
   (if tm-mh-e/decode-all
-      (save-excursion
-       (save-restriction
-         (insert-buffer
-          (save-window-excursion
-            ;; 1995/9/21,
-            ;;   modified by Eric Ding <ericding@San-Jose.ate.slb.com>
-            ;;   (c.f. tm-eng:104)
-            (set-buffer mh-sent-from-folder)
-            (set-buffer mh-show-buffer)
-            (or mime::article/preview-buffer (current-buffer))
-            ;; end
-            ))
-         (if (looking-at "^\\[.+\\(\n[ \t].+\\)*\\]\n")
-             (replace-match ""))
-         (narrow-to-region (point)(point-max))
-         (mh-insert-prefix-string mh-ins-buf-prefix)
-         ))
+      (progn
+       (if mh-delete-yanked-msg-window
+           (save-excursion
+             (set-buffer mh-sent-from-folder)
+             (set-buffer mh-show-buffer)
+             (delete-windows-on mime::article/preview-buffer)
+             ))
+       (save-excursion
+         (save-restriction
+           (insert-buffer
+            (save-excursion
+              ;; 1995/9/21,
+              ;;   modified by Eric Ding <ericding@San-Jose.ate.slb.com>
+              ;;   (c.f. tm-eng:104)
+              (set-buffer mh-sent-from-folder)
+              (set-buffer mh-show-buffer)
+              (or mime::article/preview-buffer (current-buffer))
+              ;; end
+              ))
+           (if (looking-at "^\\[.+\\(\n[ \t].+\\)*\\]\n")
+               (replace-match ""))
+           (narrow-to-region (point)(point-max))
+           (mh-insert-prefix-string mh-ins-buf-prefix)
+           )))
     (mh-yank-cur-msg)
     ))
 
index 01a9bc9..3fbf941 100644 (file)
@@ -6,7 +6,7 @@
 ;;;
 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Version:
-;;;    $Id: mime-setup.el,v 7.2 1995/10/05 10:34:43 morioka Exp $
+;;;    $Id: mime-setup.el,v 7.3 1995/10/06 07:17:22 morioka Exp $
 ;;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word
 ;;;
 ;;; This file is part of tm (Tools for MIME).
             (mime-mode)
             )))
 
+;;; for Gnus 5.* and September Gnus
+;;;
+(add-hook 'news-inews-hook
+         (function
+          (lambda ()
+            (if mime-mode-flag
+                (mime-mode-exit)
+              ))))
+(add-hook 'mail-send-hook
+         (function
+          (lambda ()
+            (if mime-mode-flag
+                (mime-mode-exit)
+              ))))
+
 
 ;;; @ for Mail mode (includes VM mode)
 ;;;
index c2fa487..8ff815c 100644 (file)
@@ -1,18 +1,24 @@
 ;;;
-;;; tm-comp.el: attachment for MIME composer
+;;; tm-comp.el --- attachment for MIME composer
 ;;;
-;;; by  MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;;; and   OKABE Yasuo    <okabe@kudpc.kyoto-u.ac.jp>
-;;; modified by MORITA Masahiro <hiro@isl.ntt.JP>
-;;;             MORIOKA Tomohiko,
-;;;      Kazushi (Jam) MARUKAWA <kazusi-m@is.aist-nara.ac.jp>,
-;;;             OKABE Yasuo,
-;;;            KOBAYASHI Shuhei <shuhei@cmpt01.phys.tohoku.ac.jp>,
-;;;         and YAMAOKA Katsumi <yamaoka@ga.sony.co.jp>
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1994,1995 MORIOKA Tomohiko
+;;; Copyright (C) 1994,1995 OKABE Yasuo
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>,
+;;;         OKABE Yasuo      <okabe@kudpc.kyoto-u.ac.jp>
+;;;    modified by MORITA Masahiro <hiro@isl.ntt.JP>
+;;;                 Kazushi (Jam) MARUKAWA <kazusi-m@is.aist-nara.ac.jp>,
+;;;                 KOBAYASHI Shuhei <shuhei@cmpt01.phys.tohoku.ac.jp>,
+;;;                 YAMAOKA Katsumi <yamaoka@ga.sony.co.jp>,
+;;;             and Richard Stanton <stanton@haas.berkeley.edu>
+;;; Keywords: mail, news, MIME, multimedia
+;;;
+;;; This file is part of tm (Tools for MIME).
 ;;;
 
 (require 'tm-view)
-(require 'tl-header)
+(require 'tl-822)
 (require 'tl-list)
 (require 'mail-utils)
 
@@ -21,7 +27,7 @@
 ;;;
 
 (defconst mime/composer-RCS-ID
-  "$Id: tm-comp.el,v 6.12 1995/09/28 03:56:17 morioka Exp $")
+  "$Id: tm-comp.el,v 7.2 1995/10/08 09:31:05 morioka Exp $")
 
 (defconst mime/composer-version (get-version-string mime/composer-RCS-ID))
 
@@ -165,7 +171,9 @@ Optional argument ENCODING specifies an encoding method such as base64."
       (let ((mc-flag nil)              ;Mule
            (file-coding-system-for-read
             (if (featurep 'mule) *noconv*))
-           (kanji-flag nil))           ;NEmacs
+           (kanji-flag nil)            ;NEmacs
+           (emx-binary-mode t)         ;Stop CRLF to LF conversion in OS/2
+           )
        (let (jka-compr-compression-info-list
              jam-zcat-filename-list)
          (insert-file-contents file))))
@@ -196,7 +204,8 @@ Optional argument ENCODING specifies an encoding method such as base64."
         )
     (save-restriction
       (narrow-to-region (1- (point)) (point))
-      (let ((start (point)))
+      (let ((start (point))
+           (emx-binary-mode t))        ;Stop LF to CRLF conversion in OS/2
        (insert-buffer-substring buffer)
        ;; Encode binary message if necessary.
        (if encoding
@@ -251,9 +260,9 @@ Optional argument ENCODING specifies an encoding method such as base64."
        (let ((hook (cdr (assq major-mode
                               mime/message-before-send-hook-alist))))
          (run-hooks hook))
-       (let* ((header (message/get-header-string-except
-                     mime/message-nuke-headers separator))
-              (orig-header (message/get-header-string-except
+       (let* ((header (rfc822/get-header-string-except
+                       mime/message-nuke-headers separator))
+              (orig-header (rfc822/get-header-string-except
                             mime/message-blind-headers separator))
               (subject (mail-fetch-field "subject"))
               (total (+ (/ lines mime/message-max-length)
@@ -433,7 +442,7 @@ Optional argument ENCODING specifies an encoding method such as base64."
 ;;; @ etc
 ;;;
 
-(defun message/get-header-string-except (pat boundary)
+(defun rfc822/get-header-string-except (pat boundary)
   (let ((case-fold-search t))
     (save-excursion
       (save-restriction
@@ -446,9 +455,9 @@ Optional argument ENCODING specifies an encoding method such as base64."
                            ))
        (goto-char (point-min))
        (let (field header)
-         (while (re-search-forward message/field-regexp nil t)
+         (while (re-search-forward rfc822/field-top-regexp nil t)
            (setq field (buffer-substring (match-beginning 0)
-                                         (match-end 0)
+                                         (rfc822/field-end)
                                          ))
            (if (not (string-match pat field))
                (setq header (concat header field "\n"))
index 2079375..b1fc9d0 100644 (file)
@@ -24,7 +24,7 @@
 ;;;
 
 (defconst tm-eword/RCS-ID
-  "$Id: tm-eword.el,v 7.2 1995/10/05 12:22:42 morioka Exp $")
+  "$Id: tm-eword.el,v 7.3 1995/10/06 05:44:48 morioka Exp $")
 
 (defconst tm-eword/version (get-version-string tm-eword/RCS-ID))
 
        (while (re-search-forward "^.+:.*\\(\n\\s +.*\\)*" nil t)
          (setq beg (match-beginning 0))
          (setq end  (match-end 0))
-         (if (setq field (mime/encode-field (buffer-substring beg end)))
+         (if (setq field (mime/encode-field
+                          (buffer-substring-no-properties beg end)))
              (progn
                (delete-region beg end)
                (insert field)
index 475bc68..7af896f 100644 (file)
--- a/tm-tar.el
+++ b/tm-tar.el
@@ -1,5 +1,5 @@
 ;;;
-;;; $Id: tm-tar.el,v 1.1 1995/09/18 17:09:19 H.Ueno Exp $
+;;; $Id: tm-tar.el,v 1.2 1995/10/07 21:47:24 H.Ueno Exp $
 ;;;
 ;;; tm-tar.el
 ;;;
 (defconst tm-tar/list-buffer "*tm-tar/List*")
 (defconst tm-tar/view-buffer "*tm-tar/View*")
 (defconst tm-tar/file-search-regexp "[0-9]+\:[0-9\:]+[ ]+[0-9]+[ ]+")
+(defconst tm-tar/popup-menu-title "Action Menu")
 
 ;;; @ variables
 ;;;
 
 (defvar tm-tar/tar-program  "gtar")
-(defvar tm-tar/tar-compress-arg '("-z"))
+(defvar tm-tar/tar-decompress-arg '("-z"))
 (defvar tm-tar/gzip-program "gzip")
 (defvar tm-tar/mmencode-program "mmencode")
 (defvar tm-tar/uudecode-program "uudecode")
 
-(defvar mime/tm-tar-mode-map nil)
-(if mime/tm-tar-mode-map
-      nil
-    (setq mime/tm-tar-mode-map (make-keymap))
-    (suppress-keymap mime/tm-tar-mode-map)
-    (define-key mime/tm-tar-mode-map "\C-c"    'exit-recursive-edit)
-    (define-key mime/tm-tar-mode-map "q"       'exit-recursive-edit)
-    (define-key mime/tm-tar-mode-map "n"       'mime/tm-tar/next-line)
-    (define-key mime/tm-tar-mode-map " "       'mime/tm-tar/next-line)
-    (define-key mime/tm-tar-mode-map "\C-m"    'mime/tm-tar/next-line)
-    (define-key mime/tm-tar-mode-map "p"       'mime/tm-tar/previous-line)
-    (define-key mime/tm-tar-mode-map "\177"    'mime/tm-tar/previous-line)
-    (define-key mime/tm-tar-mode-map "\C-\M-m" 'mime/tm-tar/previous-line)
-    (define-key mime/tm-tar-mode-map "v"       'mime/tm-tar/view-file)
-    (define-key mime/tm-tar-mode-map "\C-h"    'Helper-help)
-    (define-key mime/tm-tar-mode-map "?"       'mime/tm-tar/helpful-message)
-    (cond ((string-match "XEmacs\\|Lucid" emacs-version)
-          (define-key mime/tm-tar-mode-map
-                                    'button2  'mime/tm-tar/view-file-mouse)
-          )
-         ((> emacs-major-version 18)
-          (define-key mime/tm-tar-mode-map
-                                    [mouse-2] 'mime/tm-tar/view-file-mouse)
+(defvar tm-tar/show-popup-menu (>= emacs-major-version 19)
+  "*if non nil, TAR Mode popup menu will be shown to select an action.
+if nil, a selected file will be shown in a buffer")
+
+(defvar tm-tar/popup-menu-items
+  '(("View File"      . tm-tar/view-file)
+    ("Key Help"       . tm-tar/helpful-message)
+    ("Quit TAR Mode"  . exit-recursive-edit)
+    ))
+
+(cond ((string-match "XEmacs\\|Lucid" emacs-version)
+       (defvar tm-tar/popup-menu
+        (cons tm-tar/popup-menu-title
+              (mapcar (function
+                       (lambda (item)
+                         (vector (car item)(cdr item) t)
+                         ))
+                      tm-tar/popup-menu-items)))
+       
+       (defun tm-tar/mouse-button-2 ()
+        (if tm-tar/show-popup-menu
+            (popup-menu tm-tar/popup-menu)
+          (tm-tar/view-file)
           ))
+       )
+      ((>= emacs-major-version 19)
+       (defun tm-tar/mouse-button-2 ()
+        (let ((menu
+               (cons tm-tar/popup-menu-title
+                     (list (cons "Menu Items" tm-tar/popup-menu-items))
+                     )))
+          (if tm-tar/show-popup-menu
+              (let ((func (x-popup-menu last-input-event menu)))
+                (if func
+                    (funcall func)
+                  ))
+            (tm-tar/view-file)
+            )))
+       ))
+
+(defvar tm-tar/tar-mode-map nil)
+(if tm-tar/tar-mode-map
+      nil
+    (setq tm-tar/tar-mode-map (make-keymap))
+    (suppress-keymap tm-tar/tar-mode-map)
+    (define-key tm-tar/tar-mode-map "\C-c"    'exit-recursive-edit)
+    (define-key tm-tar/tar-mode-map "q"       'exit-recursive-edit)
+    (define-key tm-tar/tar-mode-map "n"       'tm-tar/next-line)
+    (define-key tm-tar/tar-mode-map " "       'tm-tar/next-line)
+    (define-key tm-tar/tar-mode-map "\C-m"    'tm-tar/next-line)
+    (define-key tm-tar/tar-mode-map "p"       'tm-tar/previous-line)
+    (define-key tm-tar/tar-mode-map "\177"    'tm-tar/previous-line)
+    (define-key tm-tar/tar-mode-map "\C-\M-m" 'tm-tar/previous-line)
+    (define-key tm-tar/tar-mode-map "v"       'tm-tar/view-file)
+    (define-key tm-tar/tar-mode-map "\C-h"    'Helper-help)
+    (define-key tm-tar/tar-mode-map "?"       'tm-tar/helpful-message)
+    (if mouse-button-2
+        (define-key tm-tar/tar-mode-map
+                               mouse-button-2 'tm:button-dispatcher)
+        )
   )
 
 ;;; @@ tm-tar mode functions
 ;;;
 
-(defun mime/tm-tar-mode (&optional prev-buf)
+(defun tm-tar/tar-mode (&optional prev-buf)
   "Major mode for listing the contents of a tar archive file."
     (unwind-protect
-       (let ((buffer-read-only t)
-             (mode-name "tm-tar")
-             (mode-line-buffer-identification '("%17b"))
-             )
-           (goto-char (point-min))
-           (mime/tm-tar/move-to-filename)
-           (catch 'mime/tm-tar-mode (mime/tm-tar-mode/command-loop))
-        )
-       (if prev-buf
-           (switch-to-buffer prev-buf)
-        )
+        (let ((buffer-read-only t)
+              (mode-name "tm-tar")
+              (mode-line-buffer-identification '("%17b"))
+              )
+            (goto-char (point-min))
+            (tm-tar/move-to-filename)
+            (catch 'tm-tar/tar-mode (tm-tar/command-loop))
+         )
+        (if prev-buf
+            (switch-to-buffer prev-buf)
+         )
      ))
 
-(defun mime/tm-tar-mode/command-loop ()
+(defun tm-tar/command-loop ()
     (let ((old-local-map (current-local-map))
-         )
-       (unwind-protect
-           (progn
-               (use-local-map mime/tm-tar-mode-map)
-               (mime/tm-tar/helpful-message)
-               (recursive-edit)
-            )
-           (save-excursion
-               (use-local-map old-local-map)
-            ))
+          )
+        (unwind-protect
+            (progn
+                (use-local-map tm-tar/tar-mode-map)
+                (tm-tar/helpful-message)
+                (recursive-edit)
+             )
+            (save-excursion
+                (use-local-map old-local-map)
+             ))
      ))
 
-(defun mime/tm-tar/next-line ()
+(defun tm-tar/next-line ()
     (interactive)
     (next-line 1)
-    (mime/tm-tar/move-to-filename)
+    (tm-tar/move-to-filename)
   )
 
-(defun mime/tm-tar/previous-line ()
+(defun tm-tar/previous-line ()
     (interactive)
     (previous-line 1)
-    (mime/tm-tar/move-to-filename)
+    (tm-tar/move-to-filename)
   )
 
-(defun mime/tm-tar/view-file ()
+(defun tm-tar/view-file ()
     (interactive)
-    (let ((name (mime/tm-tar/get-filename))
-         )
+    (let ((name (tm-tar/get-filename))
+          )
       (save-excursion
-         (switch-to-buffer tm-tar/view-buffer)
-         (setq buffer-read-only nil)
-         (erase-buffer)
-         (message "Reading a file from the archive. Please wait...") 
-         (apply 'call-process tm-tar/tar-program
-                      nil t nil (append tm-tar/view-args (list name)))
-         (goto-char (point-min))
+          (switch-to-buffer tm-tar/view-buffer)
+          (setq buffer-read-only nil)
+          (erase-buffer)
+          (message "Reading a file from an archive. Please wait...")
+          (apply 'call-process tm-tar/tar-program
+                       nil t nil (append tm-tar/view-args (list name)))
+          (goto-char (point-min))
        )
-       (view-buffer tm-tar/view-buffer)
+        (view-buffer tm-tar/view-buffer)
      ))
 
-(defun mime/tm-tar/view-file-mouse (e)
-    (interactive "e")
-    (mouse-set-point e)
-    (mime/tm-tar/view-file)
-  )
-
-(defun mime/tm-tar/get-filename ()
+(defun tm-tar/get-filename ()
     (let (eol)
-       (save-excursion
-           (end-of-line)
-           (setq eol (point))
-           (beginning-of-line)
-           (save-excursion
-               (if (re-search-forward "^d" eol t)
-                      (error "Cannot view a directory"))
-            )
-           (if (re-search-forward tm-tar/file-search-regexp eol t)
-                    (progn (let ((beg (point))
-                                 )
-                               (skip-chars-forward "^ \n")
-                               (buffer-substring beg (point))
-                            ))
-                    (error "No file on this line")
-            ))
+        (save-excursion
+            (end-of-line)
+            (setq eol (point))
+            (beginning-of-line)
+            (save-excursion
+                (if (re-search-forward "^d" eol t)
+                       (error "Cannot view a directory"))
+             )
+            (if (re-search-forward tm-tar/file-search-regexp eol t)
+                     (progn (let ((beg (point))
+                                  )
+                                (skip-chars-forward "^ \n")
+                                (buffer-substring beg (point))
+                             ))
+                     (error "No file on this line")
+             ))
      ))
 
-(defun mime/tm-tar/move-to-filename ()
+(defun tm-tar/move-to-filename ()
     (let ((eol (progn (end-of-line) (point)))
-         )
-       (beginning-of-line)
-       (re-search-forward tm-tar/file-search-regexp eol t)
+          )
+        (beginning-of-line)
+        (re-search-forward tm-tar/file-search-regexp eol t)
      ))
 
-(defun mime/tm-tar/set-properties ()
-    (if (> emacs-major-version 18)
-       (let ((beg (point-min))
-             (end (point-max))
-             )
-           (goto-char beg)
+(defun tm-tar/set-properties ()
+    (if mouse-button-2
+        (let ((beg (point-min))
+              (end (point-max))
+              )
+            (goto-char beg)
             (save-excursion
-               (while (re-search-forward tm-tar/file-search-regexp end t)
-                   (put-text-property (point)
-                                      (progn
-                                          (end-of-line)
-                                          (point))
-                                      'mouse-face 'highlight)
-                ))
-        )))
+                (while (re-search-forward tm-tar/file-search-regexp end t)
+                    (tm:add-button (point)
+                                       (progn
+                                           (end-of-line)
+                                           (point))
+                                       'tm-tar/mouse-button-2)
+                 ))
+         )))
 
-(defun mime/tm-tar/helpful-message ()
+(defun tm-tar/helpful-message ()
     (interactive)
     (message "Type %s, %s, %s, %s, %s, %s."
-       (substitute-command-keys "\\[Helper-help] for help")
-       (substitute-command-keys "\\[mime/tm-tar/helpful-message] for key")
-       (substitute-command-keys "\\[mime/tm-tar/next-line] to next")
-       (substitute-command-keys "\\[mime/tm-tar/previous-line] to prev")
-       (substitute-command-keys "\\[mime/tm-tar/view-file] to view")
-       (substitute-command-keys "\\[exit-recursive-edit] to quit")
+        (substitute-command-keys "\\[Helper-help] for help")
+        (substitute-command-keys "\\[tm-tar/helpful-message] for keys")
+        (substitute-command-keys "\\[tm-tar/next-line] to next")
+        (substitute-command-keys "\\[tm-tar/previous-line] to prev")
+        (substitute-command-keys "\\[tm-tar/view-file] to view")
+        (substitute-command-keys "\\[exit-recursive-edit] to quit")
      ))
 
 ;;; @@ tar message decoder
 
 (defun mime/decode-message/tar (beg end cal)
     (let ((coding (cdr (assoc 'encoding cal)))
-         (cur-buf (current-buffer))
-         (tm-tar/tar-file-name (expand-file-name (concat (make-temp-name
-                     (expand-file-name "tm" mime/tmp-dir)) ".tar")))
-         (tm-tar/tmp-file-name (expand-file-name (make-temp-name
-                     (expand-file-name "tm" mime/tmp-dir))))
-         new-buf
-         )
-       (find-file tm-tar/tmp-file-name)
-       (setq new-buf (current-buffer))
-       (setq buffer-read-only nil)
-       (erase-buffer)
-       (save-excursion
-           (set-buffer cur-buf)
-           (goto-char beg)
-           (re-search-forward "^$")
-           (append-to-buffer new-buf (+ (match-end 0) 1) end)
-        )
-       (if (member coding mime-viewer/uuencode-encoding-name-list)
-           (progn
-               (goto-char (point-min))
-               (if (re-search-forward "^begin [0-9]+ " nil t)
-                   (progn
-                       (kill-line)
-                       (insert tm-tar/tar-file-name)
-                    )
-                   (progn
-                       (set-buffer-modified-p nil)
-                       (kill-buffer new-buf)
-                       (error "uuencode file signature was not found")
-                    ))))
-       (save-buffer)
-       (kill-buffer new-buf)
-       (message "Listing the contents of archive.  Please wait...")
-       (cond ((string-equal coding "base64")
-                (call-process tm-tar/mmencode-program nil nil nil "-u"
-                            "-o" tm-tar/tar-file-name tm-tar/tmp-file-name)
-               )
-             ((string-equal coding "quoted-printable")
-                (call-process tm-tar/mmencode-program nil nil nil "-u" "-q"
-                            "-o" tm-tar/tar-file-name tm-tar/tmp-file-name)
-               )
-             ((member coding mime-viewer/uuencode-encoding-name-list)
-                (call-process tm-tar/uudecode-program nil nil nil
-                            tm-tar/tmp-file-name)
-               )
-             (t
-                (copy-file tm-tar/tmp-file-name tm-tar/tar-file-name t)
-               ))
-       (delete-file tm-tar/tmp-file-name)
-       (setq tm-tar/list-args (list "-tvf" tm-tar/tar-file-name))
-       (setq tm-tar/view-args (list "-xOf" tm-tar/tar-file-name))
-       (if (eq 0 (call-process tm-tar/gzip-program
-                           nil nil nil "-t" tm-tar/tar-file-name))
-           (progn
-               (setq tm-tar/list-args 
-                     (append tm-tar/tar-compress-arg tm-tar/list-args))
-               (setq tm-tar/view-args 
-                     (append tm-tar/tar-compress-arg tm-tar/view-args))
-            ))
-       (switch-to-buffer tm-tar/view-buffer)
-       (switch-to-buffer tm-tar/list-buffer)
-       (setq buffer-read-only nil)
-       (erase-buffer)
-       (apply 'call-process tm-tar/tar-program
-                            nil t nil tm-tar/list-args)
-       (mime/tm-tar/set-properties)
-       (mime/tm-tar-mode cur-buf)
-       (kill-buffer tm-tar/view-buffer)
-       (kill-buffer tm-tar/list-buffer)
-       (delete-file tm-tar/tar-file-name)
+          (cur-buf (current-buffer))
+          (tm-tar/tar-file-name (expand-file-name (concat (make-temp-name
+                      (expand-file-name "tm" mime/tmp-dir)) ".tar")))
+          (tm-tar/tmp-file-name (expand-file-name (make-temp-name
+                      (expand-file-name "tm" mime/tmp-dir))))
+          new-buf
+          )
+        (find-file tm-tar/tmp-file-name)
+        (setq new-buf (current-buffer))
+        (setq buffer-read-only nil)
+        (erase-buffer)
+        (save-excursion
+            (set-buffer cur-buf)
+            (goto-char beg)
+            (re-search-forward "^$")
+            (append-to-buffer new-buf (+ (match-end 0) 1) end)
+         )
+        (if (member coding mime-viewer/uuencode-encoding-name-list)
+            (progn
+                (goto-char (point-min))
+                (if (re-search-forward "^begin [0-9]+ " nil t)
+                    (progn
+                        (kill-line)
+                        (insert tm-tar/tar-file-name)
+                     )
+                    (progn
+                        (set-buffer-modified-p nil)
+                        (kill-buffer new-buf)
+                        (error "uuencode file signature was not found")
+                     ))))
+        (save-buffer)
+        (kill-buffer new-buf)
+        (message "Listing the contents of an archive.  Please wait...")
+        (cond ((string-equal coding "base64")
+                 (call-process tm-tar/mmencode-program nil nil nil "-u"
+                             "-o" tm-tar/tar-file-name tm-tar/tmp-file-name)
+                )
+              ((string-equal coding "quoted-printable")
+                 (call-process tm-tar/mmencode-program nil nil nil "-u" "-q"
+                             "-o" tm-tar/tar-file-name tm-tar/tmp-file-name)
+                )
+              ((member coding mime-viewer/uuencode-encoding-name-list)
+                 (call-process tm-tar/uudecode-program nil nil nil
+                             tm-tar/tmp-file-name)
+                )
+              (t
+                 (copy-file tm-tar/tmp-file-name tm-tar/tar-file-name t)
+                ))
+        (delete-file tm-tar/tmp-file-name)
+        (setq tm-tar/list-args (list "-tvf" tm-tar/tar-file-name))
+        (setq tm-tar/view-args (list "-xOf" tm-tar/tar-file-name))
+        (if (eq 0 (call-process tm-tar/gzip-program
+                            nil nil nil "-t" tm-tar/tar-file-name))
+            (progn
+                (setq tm-tar/list-args
+                      (append tm-tar/tar-decompress-arg tm-tar/list-args))
+                (setq tm-tar/view-args
+                      (append tm-tar/tar-decompress-arg tm-tar/view-args))
+             ))
+        (switch-to-buffer tm-tar/view-buffer)
+        (switch-to-buffer tm-tar/list-buffer)
+        (setq buffer-read-only nil)
+        (erase-buffer)
+        (apply 'call-process tm-tar/tar-program
+                             nil t nil tm-tar/list-args)
+        (tm-tar/set-properties)
+        (tm-tar/tar-mode mime::article/preview-buffer)
+        (kill-buffer tm-tar/view-buffer)
+        (kill-buffer tm-tar/list-buffer)
+        (delete-file tm-tar/tar-file-name)
      ))
 
 ;;; @@ program/buffer coding system
 ;;;
 
 (set-atype 'mime/content-decoding-condition
-          '((type . "application/octet-stream")
-            (method . mime/decode-message/tar)
-            (mode . "play") ("type" . "tar")
-            ))
+           '((type . "application/octet-stream")
+             (method . mime/decode-message/tar)
+             (mode . "play") ("type" . "tar")
+             ))
 
 (set-atype 'mime/content-decoding-condition
-          '((type . "application/octet-stream")
-            (method . mime/decode-message/tar)
-            (mode . "play") ("type" . "tar+gzip")
-            ))
+           '((type . "application/octet-stream")
+             (method . mime/decode-message/tar)
+             (mode . "play") ("type" . "tar+gzip")
+             ))
 
 (set-atype 'mime/content-decoding-condition
-          '((type . "application/x-gzip")
-            (method . mime/decode-message/tar)
-            (mode . "play") ("type" . "tar")
-            ))
+           '((type . "application/x-gzip")
+             (method . mime/decode-message/tar)
+             (mode . "play") ("type" . "tar")
+             ))
 
 (set-atype 'mime/content-decoding-condition
-          '((type . "application/x-tar")
-            (method . mime/decode-message/tar)
-            (mode . "play")
-            ))
+           '((type . "application/x-tar")
+             (method . mime/decode-message/tar)
+             (mode . "play")
+             ))
 
 ;;; @ end
 ;;;
 
 (provide 'tm-tar)
-
index cc21670..5c1f9f0 100644 (file)
@@ -25,7 +25,7 @@
 ;;;
 
 (defconst mime-viewer/RCS-ID
-  "$Id: tm-view.el,v 7.10 1995/10/05 10:35:19 morioka Exp $")
+  "$Id: tm-view.el,v 7.11 1995/10/06 07:00:00 morioka Exp $")
 
 (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID))
 (defconst mime/viewer-version mime-viewer/version)
@@ -748,12 +748,6 @@ listed in key order:
     (mime-preview/decode-content)
     ))
 
-(defun mime-viewer/play-content-mouse (e)
-  (interactive "e")
-  (mouse-set-point e)
-  (mime-viewer/play-content)
-  )
-
 (defun mime-viewer/extract-content ()
   (interactive)
   (let ((mime-viewer/decoding-mode "extract"))