[gnus git] branch master updated: m0-11-39-gba86940 =1= mm-view.el (mm-display-inline-fontify): Make the working buffer temporarily displayed when running a mode function (at least org-mode requires it)

Katsumi Yamaoka <[email protected]> Fri, 22 Aug 2014 01:02:02 +0200
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  ba869402923d2adda4c143301e12659b9d7020f8 (commit)
      from  b39a97d475e871fbb93d03088a3ccefc6f077a75 (commit)


- Log -----------------------------------------------------------------
commit ba869402923d2adda4c143301e12659b9d7020f8
Author: Katsumi Yamaoka <[email protected]>
Date:   Thu Aug 21 23:02:11 2014 +0000

    mm-view.el (mm-display-inline-fontify): Make the working buffer temporarily displayed when running a mode function (at least org-mode requires it)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 85be195..978b45c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2014-08-21  Katsumi Yamaoka  <[email protected]>
+
+	* mm-view.el (mm-display-inline-fontify): Make the working buffer
+	temporarily displayed when running a mode function (at least org-mode
+	requires it).
+
 2014-08-14  Alan Schmitt  <[email protected]>
 
 	* gnus-sum.el (gnus-summary-expire-articles): Functions registered to
diff --git a/lisp/mm-view.el b/lisp/mm-view.el
index ecfa2ac..bf24f34 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))))

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog  |    6 ++++++
 lisp/mm-view.el |    4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project