From: morioka Date: Fri, 22 Jan 1999 13:55:49 +0000 (+0000) Subject: (mime-preview-play-current-entity): Modify for interface change of X-Git-Tag: semi-1_13-199901221900~4 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=0fb479ed24fc77d2e5513f2733ee61a068859803;p=elisp%2Fsemi.git (mime-preview-play-current-entity): Modify for interface change of `mime-play-entity'. (mime-play-entity): Change interface; abolish optional arguments `mode' and `ignore-example'. (mime-detect-content): Modify for interface change of `mime-play-entity'. --- diff --git a/mime-play.el b/mime-play.el index 6a2fc1a..110792f 100644 --- a/mime-play.el +++ b/mime-play.el @@ -124,8 +124,13 @@ If MODE is specified, play as it. Default MODE is \"play\"." (interactive "P") (let ((entity (get-text-property (point) 'mime-view-entity))) (if entity - (mime-play-entity entity nil (or mode "play") ignore-examples) - ))) + (let ((situation (list (cons 'mode (or mode "play"))))) + (if ignore-examples + (setq situation + (cons (cons 'ignore-examples ignore-examples) + situation))) + (mime-play-entity entity situation) + )))) (defun mime-sort-situation (situation) (sort situation @@ -193,29 +198,19 @@ If MODE is specified, play as it. Default MODE is \"play\"." (cons match example) )) -(defun mime-play-entity (entity &optional situation mode - ignore-examples ignored-method) +(defun mime-play-entity (entity &optional situation ignored-method) "Play entity specified by ENTITY. 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 (method ret) - (or situation - (setq situation (mime-entity-situation entity))) - (if mode - (setq situation (cons (cons 'mode mode) situation)) - ) - (if ignore-examples - (or (assq 'ignore-examples situation) - (setq situation - (cons (cons 'ignore-examples ignore-examples) situation))) - ) (setq ret (mime-delq-null-situation - (ctree-find-calist mime-acting-condition situation + (ctree-find-calist mime-acting-condition + (mime-entity-situation entity situation) mime-view-find-every-acting-situation) 'method ignored-method)) - (or ignore-examples + (or (assq 'ignore-examples situation) (if (cdr ret) (let ((rest ret) (max-score 0) @@ -475,8 +470,6 @@ SUBTYPE is symbol to indicate subtype of media-type.") (put-alist 'subtype subtype (del-alist 'method (copy-alist situation)))) - nil - (cdr (assq 'ignore-examples situation)) 'mime-detect-content) )) )