aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Walters2002-06-09 00:43:09 +0000
committerColin Walters2002-06-09 00:43:09 +0000
commit0ab0c481624ec9d18456597e677b65b34b922cae (patch)
treeaee7b6a46eb82afba42afa02542616349689fdf0
parentc32aa1a58037864ada514a1286d7bb58a5ac0d8f (diff)
downloademacs-0ab0c481624ec9d18456597e677b65b34b922cae.tar.gz
emacs-0ab0c481624ec9d18456597e677b65b34b922cae.zip
(Precalcuated Fontification): Note how to use `font-lock-core-only'.
-rw-r--r--lispref/modes.texi12
1 files changed, 12 insertions, 0 deletions
diff --git a/lispref/modes.texi b/lispref/modes.texi
index 987f0a4e7b7..4c888448d66 100644
--- a/lispref/modes.texi
+++ b/lispref/modes.texi
@@ -2097,6 +2097,18 @@ is toggled when the user calls @kbd{M-x font-lock-mode}. Using
2097which construct their text programmatically, such as 2097which construct their text programmatically, such as
2098@code{list-buffers} and @code{occur}. 2098@code{list-buffers} and @code{occur}.
2099 2099
2100If your mode does not use any of the other machinery of Font Lock
2101(i.e. it only uses the @code{font-lock-face} property), you can tell
2102Emacs not to load all of font-lock.el (unless it's already loaded), by
2103setting the variable @code{font-lock-core-only} to non-nil as part of
2104the @code{font-lock-defaults} settings. Here is the canonical way to
2105do this:
2106
2107@example
2108(set (make-local-variable 'font-lock-defaults)
2109 '(nil t nil nil nil (font-lock-core-only . t)))
2110@end example
2111
2100@node Faces for Font Lock 2112@node Faces for Font Lock
2101@subsection Faces for Font Lock 2113@subsection Faces for Font Lock
2102 2114