Require filename.
[elisp/semi.git] / mime-play.el
index 6d06072..0c1c4c3 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Created: 1995/9/26 (separated from tm-view.el)
 ;;     Renamed: 1997/2/21 from tm-play.el
-;; Version: $Id: mime-play.el,v 0.9 1997-02-28 04:56:22 tmorioka Exp $
+;; Version: $Id: mime-play.el,v 0.12 1997-03-07 16:27:04 morioka Exp $
 ;; Keywords: MIME, multimedia, mail, news
 
 ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
@@ -29,6 +29,7 @@
 
 (require 'mime-view)
 (require 'alist)
+(require 'filename)
 
   
 ;;; @ content decoder
            )
        (if method
            (let ((file (make-temp-name
-                        (expand-file-name "TM" mime/tmp-dir)))
+                        (expand-file-name "TM" mime-temp-directory)))
                  b args)
              (if (nth 1 method)
                  (setq b beg)
        (cons t (mime-charset-to-coding-system default-mime-charset))
        ))
 
-(cond (running-mule-merged-emacs
-       (defun mime-article::write-region (start end file)
-        (let ((coding-system-for-write
-               (cdr
-                (or (assq major-mode mime-article/coding-system-alist)
-                    (assq t mime-article/coding-system-alist)
-                    ))))
-          (write-region start end file)
-          ))
-       )
-      ((or (boundp 'MULE)
-          running-xemacs-with-mule)
-       (defun mime-article::write-region (start end file)
-        (let ((file-coding-system
-               (cdr
-                (or (assq major-mode mime-article/coding-system-alist)
-                    (assq t mime-article/coding-system-alist)
-                    ))))
-          (write-region start end file)
-          ))
-       )
-      ((boundp 'NEMACS)
-       (defun mime-article::write-region (start end file)
-        (let ((kanji-fileio-code
-               (cdr
-                (or (assq major-mode mime-article/kanji-code-alist)
-                    (assq t mime-article/kanji-code-alist)
-                    ))))
-          (write-region start end file)
-          ))
-       )
-      (t
-       (defalias 'mime-article::write-region 'write-region)
-       ))
+(defun mime-article::write-region (start end file)
+  (let ((coding-system-for-write
+        (cdr
+         (or (assq major-mode mime-article/coding-system-alist)
+             (assq t mime-article/coding-system-alist)
+             ))))
+    (write-region start end file)
+    ))
 
 (defun mime-article/decode-message/partial (beg end cal)
   (goto-char beg)
-  (let* ((root-dir (expand-file-name
-                   (concat "m-prts-" (user-login-name)) mime/tmp-dir))
+  (let* ((root-dir
+         (expand-file-name
+          (concat "m-prts-" (user-login-name)) mime-temp-directory))
         (id (cdr (assoc "id" cal)))
         (number (cdr (assoc "number" cal)))
         (total (cdr (assoc "total" cal)))