Jeff Mincy <jeff(a)delphioutpost.com> wrote:
What is the proper way to check if font-lock is enabled, and if
enabled globally to make sure that font locking is enabled for that mode.
I would make a foo-use-fontification customizable variable,
which defaults to font-lock-auto-fontify:
(defcustom foo-use-fontification (if (boundp 'font-lock-auto-fontify)
font-lock-auto-fontify
nil)
"If non-nil, fontify contents of foo buffer."
:type 'boolean
:group 'foo)
Then within foo-mode do:
(if foo-use-fontification
(turn-on-font-lock))
--
John Paul Wallington