From: teranisi Date: Mon, 5 Nov 2001 13:37:26 +0000 (+0000) Subject: * mime-play.el (mime-play-entity): Use return value of X-Git-Tag: emiko-1_14-epg-branchpoint~61 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63f9624e5f2a738637a846bb13fc3c8fc08da994;p=elisp%2Fsemi.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 5893e06..922abeb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2001-11-05 Yuuichi Teranishi + + * 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 * mime-view.el: Add `mime-view-maybe-inherit-widget-keymap' to diff --git a/mime-play.el b/mime-play.el index a476a05..d53ee2f 100644 --- a/mime-play.el +++ b/mime-play.el @@ -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 diff --git a/semi-def.el b/semi-def.el index 7757246..a9a198c 100644 --- a/semi-def.el +++ b/semi-def.el @@ -139,7 +139,7 @@ (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)