* mime-view.el (mime-preview-toggle-display): Use boundary with
[elisp/semi.git] / mime-play.el
index 82f3f69..43221e6 100644 (file)
@@ -46,6 +46,9 @@ If t, it means current directory."
 (defvar mime-play-find-every-situations t
   "*Find every available situations if non-nil.")
 
+(defvar mime-play-messages-coding-system nil
+  "Coding system to be used for external MIME playback method.")
+
 
 ;;; @ content decoder
 ;;;
@@ -93,7 +96,7 @@ specified, play as it.  Default MODE is \"play\"."
     (setq mime-acting-situation-example-list (cdr ret)
          ret (car ret))
     (cond ((cdr ret)
-          (setq ret (select-menu-alist
+          (setq ret (mime-select-menu-alist
                      "Methods"
                      (mapcar (function
                               (lambda (situation)
@@ -142,8 +145,7 @@ specified, play as it.  Default MODE is \"play\"."
          (if (and name (not (string= name "")))
              (expand-file-name name temporary-file-directory)
            (make-temp-name
-            (expand-file-name "EMI" temporary-file-directory))
-           ))
+            (expand-file-name "EMI" temporary-file-directory))))
     (mime-write-entity-content entity name)
     (message "External method is starting...")
     (let ((process
@@ -151,13 +153,12 @@ specified, play as it.  Default MODE is \"play\"."
                  (mime-format-mailcap-command
                   method
                   (cons (cons 'filename name) situation))))
-            (start-process command mime-echo-buffer-name
-                           shell-file-name shell-command-switch command)
-            )))
+            (binary-to-text-funcall
+             mime-play-messages-coding-system
+             #'start-process command mime-echo-buffer-name
+             shell-file-name shell-command-switch command))))
       (set-alist 'mime-mailcap-method-filename-alist process name)
-      (set-process-sentinel process 'mime-mailcap-method-sentinel)
-      )
-    ))
+      (set-process-sentinel process 'mime-mailcap-method-sentinel))))
 
 (defun mime-mailcap-method-sentinel (process event)
   (let ((file (cdr (assq process mime-mailcap-method-filename-alist))))
@@ -471,7 +472,7 @@ It is registered to variable `mime-preview-quitting-method-alist'."
         (directory (cdr (assoc "directory" cal)))
         (name (cdr (assoc "name" cal)))
         (pathname (concat "/anonymous@" site ":" directory)))
-    (message (concat "Accessing " (expand-file-name name pathname) " ..."))
+    (message (concat "Accessing " (expand-file-name name pathname) "..."))
     (funcall mime-raw-dired-function pathname)
     (goto-char (point-min))
     (search-forward name)
@@ -481,7 +482,7 @@ It is registered to variable `mime-preview-quitting-method-alist'."
 
 (defun mime-view-message/external-url (entity cal)
   (let ((url (cdr (assoc "url" cal))))
-    (message (concat "Accessing " url " ..."))
+    (message (concat "Accessing " url "..."))
     (funcall mime-raw-browse-url-function url)))