mm-view.el (mm-display-inline-fontify): Make the working buffer temporarily displayed...
[gnus] / lisp / mm-view.el
index ecfa2ac..bf24f34 100644 (file)
@@ -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))))