Replace instances of "(eval-when-compile (autoload ...))"
[gnus] / lisp / mm-view.el
index c565d0e..edc2d39 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mm-view.el --- functions for viewing MIME objects
 
-;; Copyright (C) 1998-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2015 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; This file is part of GNU Emacs.
         handle
         `(lambda ()
            (let ((inhibit-read-only t))
-             (delete-region ,(copy-marker (point-min) t)
+             (delete-region ,(point-min-marker)
                             ,(point-max-marker)))))))))
 
 (defvar mm-w3m-standalone-supports-m17n-p (if (featurep 'mule) 'undecided)
      `(lambda ()
        (let ((inhibit-read-only t))
          (delete-region ,(copy-marker b t)
-                        ,(copy-marker (point))))))))
+                        ,(point-marker)))))))
 
 (defun mm-inline-audio (handle)
   (message "Not implemented"))
@@ -513,7 +513,9 @@ If MODE is not set, try to find mode automatically."
         (set (make-local-variable 'enable-local-variables) nil)
        (with-demoted-errors
          (if mode
-             (funcall mode)
+             (save-window-excursion
+               (switch-to-buffer (current-buffer))
+               (funcall mode))
            (let ((auto-mode-alist
                   (delq (rassq 'doc-view-mode-maybe auto-mode-alist)
                         (copy-sequence auto-mode-alist))))
@@ -627,6 +629,8 @@ If MODE is not set, try to find mode automatically."
     (replace-match "\n"))
   t)
 
+(autoload 'epg-decrypt-string "epg")
+
 (defun mm-view-pkcs7-decrypt (handle &optional from)
   (insert-buffer-substring (mm-handle-buffer handle))
   (goto-char (point-min))