)))
)
-(defsubst mime-delq-null-situation (situations field)
+(defsubst mime-delq-null-situation (situations field
+ &optional ignored-value)
(let (dest)
(while situations
- (let ((situation (car situations)))
- (if (assq field situation)
- (setq dest (cons situation dest))
- ))
+ (let* ((situation (car situations))
+ (cell (assq field situation)))
+ (if cell
+ (or (eq (cdr cell) ignored-value)
+ (setq dest (cons situation dest))
+ )))
(setq situations (cdr situations)))
dest))
(cons match example)
))
-(defun mime-raw-play-entity (entity &optional mode situation ignore-examples)
+(defun mime-raw-play-entity (entity &optional mode situation ignore-examples
+ 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
(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
mime-view-find-every-acting-situation)
- 'method))
+ 'method ignored-method))
(or ignore-examples
(if (cdr ret)
(let ((rest ret)
(setq rest (cdr rest))))))
(if type
(mime-raw-play-entity
- entity "play"
+ entity nil
(put-alist 'type type
(put-alist 'subtype subtype
- (copy-alist situation))))
+ (del-alist 'method
+ (copy-alist situation))))
+ (cdr (assq 'ignore-examples situation))
+ 'mime-detect-content)
))
)))