* mime-play.el (mime-play-entity): Use return value of
authorteranisi <teranisi>
Mon, 5 Nov 2001 13:37:26 +0000 (13:37 +0000)
committerteranisi <teranisi>
Mon, 5 Nov 2001 13:37:26 +0000 (13:37 +0000)
 `mime-entity-situation' to get content type information;
 Fix problem when method is invoked at menu selection;
 Fix the message displayed on echo buffer when no method is specified;
 Clear minibuffer after `y-or-n-p'.

* semi-def.el (mime-should-use-popup-menu) [Emacs]: Use
 `event-basic-type' instead of `event-modifiers' to detect mouse operation.

ChangeLog
mime-play.el
semi-def.el

index 5893e06..922abeb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2001-11-05  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * mime-play.el (mime-play-entity): Use return value of
+       `mime-entity-situation' to get content type information;
+       Fix problem when method is invoked at menu selection;
+       Fix the message displayed on echo buffer when no method is specified;
+       Clear minibuffer after `y-or-n-p'.
+
+       * semi-def.el (mime-should-use-popup-menu) [Emacs]: Use
+       `event-basic-type' instead of `event-modifiers' to detect mouse
+       operation.
+
 2001-10-02   Daiki Ueno  <ueno@unixuser.org>
 
        * mime-view.el: Add `mime-view-maybe-inherit-widget-keymap' to
index a476a05..d53ee2f 100644 (file)
@@ -84,22 +84,23 @@ If MODE is specified, play as it.  Default MODE is \"play\"."
 It decodes the entity to call internal or external method.  The method
 is selected from variable `mime-acting-condition'.  If MODE is
 specified, play as it.  Default MODE is \"play\"."
-  (let ((ret
-        (mime-unify-situations (mime-entity-situation entity situation)
-                               mime-acting-condition
-                               mime-acting-situation-example-list
-                               'method ignored-method
-                               mime-play-find-every-situations))
-       method menu)
+  (let* ((entity-situation (mime-entity-situation entity situation))
+        (ret (mime-unify-situations entity-situation
+                                    mime-acting-condition
+                                    mime-acting-situation-example-list
+                                    'method ignored-method
+                                    mime-play-find-every-situations))
+        method menu s)
     (setq mime-acting-situation-example-list (cdr ret)
          ret (car ret))
     (cond ((cdr ret)
           (while ret
             (or (vassoc (setq method
                               (format "%s"
-                                      (cdr (assq 'method (pop ret)))))
+                                      (cdr (assq 'method
+                                                 (setq s (pop ret))))))
                         menu)
-                (push (vector method situation t) menu)))
+                (push (vector method s t) menu)))
           (setq ret (mime-sort-situation
                      (mime-menu-select "Play entity with: "
                                        (cons "Methods" menu))))
@@ -116,12 +117,13 @@ specified, play as it.  Default MODE is \"play\"."
           ;;  (mime-activate-external-method entity ret)
           ;;  )
          (t
-          (mime-show-echo-buffer "No method are specified for %s\n"
+          (mime-show-echo-buffer "No method is specified for %s\n"
                                  (mime-type/subtype-string
-                                  (cdr (assq 'type situation))
-                                  (cdr (assq 'subtype situation))))
-          (if (y-or-n-p "Do you want to save current entity to disk?")
-              (mime-save-content entity situation))))))
+                                  (cdr (assq 'type entity-situation))
+                                  (cdr (assq 'subtype entity-situation))))
+          (when (y-or-n-p "Do you want to save current entity to disk?")
+            (message "")
+            (mime-save-content entity entity-situation))))))
 
 
 ;;; @ external decoder
index 7757246..a9a198c 100644 (file)
     (defun mime-should-use-popup-menu ()
       (mouse-event-p last-command-event))
   (defun mime-should-use-popup-menu ()
-    (memq 'click (event-modifiers last-command-event))))
+    (memq (event-basic-type last-command-event) '(mouse-1 mouse-2 mouse-3))))
 
 (defun mime-menu-select (prompt menu &optional event)
   (if (mime-should-use-popup-menu)