Make fontification of org modes work again
[gnus] / lisp / mm-view.el
index 338aa10..1d7b174 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mm-view.el --- functions for viewing MIME objects
 
-;; Copyright (C) 1998-2011  Free Software Foundation, Inc.
+;; Copyright (C) 1998-2012  Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; This file is part of GNU Emacs.
                     (face-property 'default prop) (current-buffer))))
              (delete-region ,(point-min-marker) ,(point-max-marker)))))))))
 
+;; Shut up byte-compiler.
+(defvar font-lock-mode-hook)
 (defun mm-display-inline-fontify (handle &optional mode)
   "Insert HANDLE inline fontifying with MODE.
 If MODE is not set, try to find mode automatically."
@@ -598,10 +600,11 @@ If MODE is not set, try to find mode automatically."
                     text)))
       (require 'font-lock)
       ;; I find font-lock a bit too verbose.
-      (let ((font-lock-verbose nil))
+      (let ((font-lock-verbose nil)
+           (font-lock-support-mode nil))
        ;; Disable support modes, e.g., jit-lock, lazy-lock, etc.
+       ;; Note: XEmacs people use `font-lock-mode-hook' to run those modes.
        (set (make-local-variable 'font-lock-mode-hook) nil)
-       (set (make-local-variable 'font-lock-support-mode) nil)
         (setq buffer-file-name (mm-handle-filename handle))
         (set (make-local-variable 'enable-local-variables) nil)
        (with-demoted-errors