update.
[elisp/semi.git] / mime-play.el
index aff04d2..41f7fca 100644 (file)
@@ -30,6 +30,8 @@
 (require 'alist)
 (require 'filename)
 
+(eval-when-compile (require 'mime-text))
+
   
 ;;; @ content decoder
 ;;;
@@ -264,7 +266,7 @@ window.")
            (narrow-to-region beg end)
            (mime-raw-get-filename cal)
            ))
-        (encoding (cdr (assq 'encoding cal)))
+        (encoding (or (cdr (assq 'encoding cal)) "7bit"))
         (filename
           (if (and name (not (string-equal name "")))
              (expand-file-name name
@@ -283,7 +285,7 @@ window.")
         (or (yes-or-no-p (format "File %s exists. Save anyway? " filename))
             (error "")))
     (re-search-forward "\n\n")
-    (mime-write-decoded-region (match-end 0)(point-max) filename encoding)
+    (mime-write-decoded-region (match-end 0) end filename encoding)
     ))