X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=blobdiff_plain;f=lisp%2Fmm-view.el;h=bf24f3496220c263abfee9b681caeaaae096dd02;hp=ecfa2ac958252318cb735ae5fbc4827a0f59be21;hb=ba869402923d2adda4c143301e12659b9d7020f8;hpb=b39a97d475e871fbb93d03088a3ccefc6f077a75 diff --git a/lisp/mm-view.el b/lisp/mm-view.el index ecfa2ac95..bf24f3496 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -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))))