X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fmm-extern.el;h=1ddcf0df556b9b1634d5745413e8cd1a120d2fc9;hb=6b2fa8fc38e3c09d57a636188553183aec8a0948;hp=c574bd6156e28b81470e0dc66a336b6e42f05e62;hpb=470c7931c6604d280d0e0070408d5a797c5f94a0;p=gnus diff --git a/lisp/mm-extern.el b/lisp/mm-extern.el index c574bd615..1ddcf0df5 100644 --- a/lisp/mm-extern.el +++ b/lisp/mm-extern.el @@ -1,27 +1,24 @@ ;;; mm-extern.el --- showing message/external-body -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006 Free Software Foundation, Inc. +;; Copyright (C) 2000-2015 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu ;; Keywords: message external-body ;; This file is part of GNU Emacs. -;; GNU Emacs is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published -;; by the Free Software Foundation; either version 2, or (at your -;; option) any later version. +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. -;; GNU Emacs is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -65,9 +62,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) @@ -90,6 +86,8 @@ (let (mm-extern-anonymous) (mm-extern-anon-ftp handle))) +(declare-function message-goto-body "message" ()) + (defun mm-extern-mail-server (handle) (require 'message) (let* ((params (cdr (mm-handle-type handle))) @@ -97,7 +95,7 @@ (subject (or (cdr (assq 'subject params)) "none")) (buf (current-buffer)) info) - (if (y-or-n-p (format "Send a request message to %s?" server)) + (if (y-or-n-p (format "Send a request message to %s? " server)) (save-window-excursion (message-mail server subject) (message-goto-body) @@ -121,7 +119,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 @@ -132,8 +130,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 @@ -165,5 +162,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