From 3f05793f2862b9c1b4b8eb242dcc0da206ddd48e Mon Sep 17 00:00:00 2001 From: morioka Date: Sun, 3 May 1998 17:50:20 +0000 Subject: [PATCH] (mime-activate-mailcap-method): New function. (mime-raw-play-entity): Use 'mime-activate-mailcap-method for mailcap method. --- mime-play.el | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/mime-play.el b/mime-play.el index 17bc7b1..c64c4d1 100644 --- a/mime-play.el +++ b/mime-play.el @@ -176,6 +176,9 @@ specified, play as it. Default MODE is \"play\"." (fboundp method)) (funcall method beg end ret) ) + ((stringp method) + (mime-activate-mailcap-method beg end ret) + ) ((and (listp method)(stringp (car method))) (mime-activate-external-method beg end ret) ) @@ -191,6 +194,26 @@ specified, play as it. Default MODE is \"play\"." ;;; @ external decoder ;;; +(defun mime-activate-mailcap-method (start end situation) + (save-excursion + (save-restriction + (narrow-to-region start end) + (goto-char start) + (let ((method (cdr (assoc 'method situation))) + (name (mime-raw-get-filename situation))) + (mime-write-decoded-region (if (re-search-forward "^$" end t) + (1+ (match-end 0)) + (point-min)) + end name + (cdr (assq 'encoding situation))) + (message "External method is starting...") + (let ((command (format method name))) + (start-process command mime-echo-buffer-name + shell-file-name shell-command-switch command) + ) + (mime-show-echo-buffer) + )))) + (defun mime-activate-external-method (beg end cal) (save-excursion (save-restriction -- 1.7.10.4