X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fmm-extern.el;h=277932bf307e7c3d1605da3a018dd577f5925bde;hb=873ba7b51ddfb07246cd874b7de72662308236c9;hp=1e3df3c4cff13ba26a2de0990b1fb3ec0dbd5395;hpb=9a8731d6dea8021a10dec1b42f382609336a9aa9;p=gnus diff --git a/lisp/mm-extern.el b/lisp/mm-extern.el index 1e3df3c4c..277932bf3 100644 --- a/lisp/mm-extern.el +++ b/lisp/mm-extern.el @@ -1,7 +1,6 @@ ;;; mm-extern.el --- showing message/external-body -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2012 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu ;; Keywords: message external-body @@ -25,7 +24,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) @@ -67,9 +66,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) @@ -92,7 +90,7 @@ (let (mm-extern-anonymous) (mm-extern-anon-ftp handle))) -(declare-function message-goto-body "message" (&optional interactivep)) +(declare-function message-goto-body "message" ()) (defun mm-extern-mail-server (handle) (require 'message) @@ -125,7 +123,7 @@ (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 @@ -136,8 +134,7 @@ (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 +166,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