(mm-display-inline-fontify): Disable support modes.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 6 Sep 2005 05:21:53 +0000 (05:21 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 6 Sep 2005 05:21:53 +0000 (05:21 +0000)
lisp/ChangeLog
lisp/mm-view.el

index e73f1d6..3b02f72 100644 (file)
@@ -1,5 +1,7 @@
 2005-09-06  Katsumi Yamaoka  <yamaoka@jpl.org>
 
+       * mm-view.el (mm-display-inline-fontify): Disable support modes.
+
        * lpath.el: Don't bind mc-pgp-always-sign, url-current-object,
        url-package-name, url-package-version,
        w3m-cid-retrieve-function-alist, w3m-current-buffer,
index 2218c70..585b59b 100644 (file)
                    (t
                     text)))
       (require 'font-lock)
-      ;; Inhibit font-lock this time (*-mode-hook might run
-      ;; `turn-on-font-lock') so that jit-lock may not turn off
-      ;; font-lock immediately after this.
-      (let ((font-lock-mode t))
-       (funcall mode))
-      (let ((font-lock-verbose nil))
-       ;; I find font-lock a bit too verbose.
-       (font-lock-fontify-buffer))
+      (let ((font-lock-maximum-size nil)
+           ;; Disable support modes, e.g., jit-lock, lazy-lock, etc.
+           (font-lock-mode-hook nil)
+           (font-lock-support-mode nil)
+           ;; I find font-lock a bit too verbose.
+           (font-lock-verbose nil))
+       (funcall mode)
+       ;; The mode function might have already turned on font-lock.
+       (unless (symbol-value 'font-lock-mode)
+         (font-lock-fontify-buffer)))
       ;; By default, XEmacs font-lock uses non-duplicable text
       ;; properties.  This code forces all the text properties
       ;; to be copied along with the text.