Give a better error message in the "go offline" case.
[gnus] / lisp / mm-extern.el
index 9926325..eee741f 100644 (file)
@@ -1,7 +1,7 @@
 ;;; mm-extern.el --- showing message/external-body
 
 ;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
 ;; Keywords: message external-body
@@ -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
@@ -169,5 +167,4 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing."
 
 (provide 'mm-extern)
 
-;; arch-tag: 9653808e-14d9-4172-86e6-adceaa05378e
 ;;; mm-extern.el ends here