- (let ((beg (mime-entity-point-min entity))
- (end (mime-entity-point-max entity)))
- (let (method cal ret)
- (setq cal (mime-entity-situation entity))
- (if mode
- (setq cal (cons (cons 'mode mode) cal))
- )
- (setq ret
- (or (ctree-match-calist mime-acting-situation-examples cal)
- (ctree-match-calist-partially mime-acting-situation-examples
- cal)
- cal))
- (setq ret
- (or (mime-delq-null-situation
- (ctree-find-calist mime-acting-condition ret
- mime-view-find-every-acting-situation)
- 'method)
- (mime-delq-null-situation
- (ctree-find-calist mime-acting-condition cal
- mime-view-find-every-acting-situation)
- 'method)
- ))
- (cond ((cdr ret)
- (setq ret (select-menu-alist
- "Methods"
- (mapcar (function
- (lambda (situation)
- (cons
- (format "%s"
- (cdr (assq 'method situation)))
- situation)))
- ret)))
- (setq ret (mime-sort-situation ret))
- (ctree-set-calist-strictly 'mime-acting-situation-examples ret)
- )
- (t
- (setq ret (car ret))
- ))
- (setq method (cdr (assq 'method ret)))
- (cond ((and (symbolp method)
- (fboundp method))
- (funcall method entity ret)
- )
- ((stringp method)
- (mime-activate-mailcap-method entity ret)
- )
- ((and (listp method)(stringp (car method)))
- (mime-activate-external-method beg end ret)
- )
- (t
- (mime-show-echo-buffer "No method are specified for %s\n"
- (mime-entity-type/subtype entity))
- ))
- )))
+ (let (method cal ret)
+ (setq cal (mime-entity-situation entity))
+ (if mode
+ (setq cal (cons (cons 'mode mode) cal))
+ )
+ (setq ret
+ (or (ctree-match-calist mime-acting-situation-examples cal)
+ (ctree-match-calist-partially mime-acting-situation-examples
+ cal)
+ cal))
+ (setq ret
+ (or (mime-delq-null-situation
+ (ctree-find-calist mime-acting-condition ret
+ mime-view-find-every-acting-situation)
+ 'method)
+ (mime-delq-null-situation
+ (ctree-find-calist mime-acting-condition cal
+ mime-view-find-every-acting-situation)
+ 'method)
+ ))
+ (cond ((cdr ret)
+ (setq ret (select-menu-alist
+ "Methods"
+ (mapcar (function
+ (lambda (situation)
+ (cons
+ (format "%s"
+ (cdr (assq 'method situation)))
+ situation)))
+ ret)))
+ (setq ret (mime-sort-situation ret))
+ (ctree-set-calist-strictly 'mime-acting-situation-examples ret)
+ )
+ (t
+ (setq ret (car ret))
+ ))
+ (setq method (cdr (assq 'method ret)))
+ (cond ((and (symbolp method)
+ (fboundp method))
+ (funcall method entity ret)
+ )
+ ((stringp method)
+ (mime-activate-mailcap-method entity ret)
+ )
+ ((and (listp method)(stringp (car method)))
+ (mime-activate-external-method entity ret)
+ )
+ (t
+ (mime-show-echo-buffer "No method are specified for %s\n"
+ (mime-entity-type/subtype entity))
+ ))
+ ))