+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
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))))
;; (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
(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)