tm-ftp is merged to mime-play.el.
[elisp/semi.git] / mime-view.el
index ee04a45..278c3e4 100644 (file)
@@ -6,7 +6,7 @@
 ;; Created: 1994/7/13
 ;;     Renamed: 1994/8/31 from tm-body.el
 ;;     Renamed: 1997/02/19 from tm-view.el
-;; Version: $Revision: 0.17 $
+;; Version: $Revision: 0.21 $
 ;; Keywords: MIME, multimedia, mail, news
 
 ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
@@ -40,7 +40,7 @@
 ;;;
 
 (defconst mime-view-RCS-ID
-  "$Id: mime-view.el,v 0.17 1997-02-24 10:00:22 tmorioka Exp $")
+  "$Id: mime-view.el,v 0.21 1997-03-03 21:22:36 morioka Exp $")
 
 (defconst mime-view-version (get-version-string mime-view-RCS-ID))
 
@@ -245,8 +245,8 @@ Each elements are regexp of field-name. [mime-view.el]")
               (if server
                   (insert (format "[%s %s ([%s] %s)]\n" num subj
                                   access-type (cdr server)))
-                (let ((site (assoc-value "site" params))
-                      (dir (assoc-value "directory" params))
+                (let ((site (cdr (assoc "site" params)))
+                      (dir (cdr (assoc "directory" params)))
                       )
                   (insert (format "[%s %s ([%s] %s:%s)]\n" num subj
                                   access-type site dir))
@@ -268,8 +268,8 @@ Each elements are regexp of field-name. [mime-view.el]")
                 )
               (insert rest)
               ))))
-    (tm:add-button (point-min)(1- (point-max))
-                  (function mime-view-play-content))
+    (mime-add-button (point-min)(1- (point-max))
+                    (function mime-view-play-content))
     ))
 
 (defun mime-preview/default-content-button-function
@@ -577,8 +577,8 @@ The compressed face will be piped to this command.")
     (let ((be (point-max)))
       (narrow-to-region be be)
       (insert mime-view-announcement-for-message/partial)
-      (tm:add-button (point-min)(point-max)
-                    (function mime-view-play-content))
+      (mime-add-button (point-min)(point-max)
+                      (function mime-view-play-content))
       )))
 
 (defun mime-article/get-uu-filename (param &optional encoding)
@@ -709,22 +709,25 @@ The compressed face will be piped to this command.")
     )
   "Menu for MIME Viewer")
 
-(if running-xemacs
-    (progn
-      (defvar mime-view-xemacs-popup-menu
-       (cons mime-view-menu-title
-             (mapcar (function
-                      (lambda (item)
-                        (vector (nth 1 item)(nth 2 item) t)
-                        ))
-                     mime-view-menu-list)))
-      (defun mime-view-xemacs-popup-menu (event)
-       "Popup the menu in the MIME Viewer buffer"
-       (interactive "e")
-       (select-window (event-window event))
-       (set-buffer (event-buffer event))
-       (popup-menu 'mime-view-xemacs-popup-menu))
-      ))
+(cond (running-xemacs
+       (defvar mime-view-xemacs-popup-menu
+        (cons mime-view-menu-title
+              (mapcar (function
+                       (lambda (item)
+                         (vector (nth 1 item)(nth 2 item) t)
+                         ))
+                      mime-view-menu-list)))
+       (defun mime-view-xemacs-popup-menu (event)
+        "Popup the menu in the MIME Viewer buffer"
+        (interactive "e")
+        (select-window (event-window event))
+        (set-buffer (event-buffer event))
+        (popup-menu 'mime-view-xemacs-popup-menu))
+       (defvar mouse-button-2 'button2)
+       )
+      (t
+       (defvar mouse-button-2 [mouse-2])
+       ))
 
 (defun mime-view-define-keymap (&optional default)
   (let ((mime-view-mode-map (if (keymapp default)
@@ -777,7 +780,7 @@ The compressed face will be piped to this command.")
              ))
     (if mouse-button-2
        (define-key mime-view-mode-map
-         mouse-button-2 (function tm:button-dispatcher))
+         mouse-button-2 (function mime-button-dispatcher))
       )
     (cond (running-xemacs
           (define-key mime-view-mode-map