(mm-extern-url): Don't use mm-with-unibyte-current-buffer.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 11 May 2010 04:42:26 +0000 (04:42 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 11 May 2010 04:42:26 +0000 (04:42 +0000)
(mm-extern-cache-contents): Use with-current-buffer instead of
 save-excursion + set-buffer.

lisp/ChangeLog
lisp/mm-extern.el

index 1117764..ff50fbf 100644 (file)
@@ -1,3 +1,10 @@
+2010-05-11  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * mm-extern.el (mm-extern-url): Don't use
+       mm-with-unibyte-current-buffer.
+       (mm-extern-cache-contents): Use with-current-buffer instead of
+       save-excursion + set-buffer.
+
 2010-05-10  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * mm-util.el (mm-emacs-mule): Remove.
index 1e3df3c..f40f798 100644 (file)
@@ -67,9 +67,8 @@
        (coding-system-for-read mm-binary-coding-system))
     (unless url
       (error "URL is not specified"))
-    (mm-with-unibyte-current-buffer
-      (mm-url-insert-file-contents url))
     (mm-disable-multibyte)
+    (mm-url-insert-file-contents url)
     (setq buffer-file-name name)))
 
 (defun mm-extern-anon-ftp (handle)
                            (or access-type
                                (error "Couldn't find access type"))))
                          mm-extern-function-alist)))
-        buf handles)
+        handles)
     (unless func
       (error "Access type (%s) is not supported" access-type))
     (mm-with-part handle
     (unless (bufferp (car handles))
       (mm-destroy-parts handles)
       (error "Multipart external body is not supported"))
-    (save-excursion
-      (set-buffer (setq buf (mm-handle-buffer handles)))
+    (with-current-buffer (mm-handle-buffer handles)
       (let (good)
        (unwind-protect
            (progn