diff options
author | Colin Walters <walters@gnu.org> | 2002-06-09 00:43:09 +0000 |
---|---|---|
committer | Colin Walters <walters@gnu.org> | 2002-06-09 00:43:09 +0000 |
commit | 0ab0c481624ec9d18456597e677b65b34b922cae (patch) | |
tree | aee7b6a46eb82afba42afa02542616349689fdf0 /lispref | |
parent | c32aa1a58037864ada514a1286d7bb58a5ac0d8f (diff) | |
download | emacs-0ab0c481624ec9d18456597e677b65b34b922cae.tar.gz |
(Precalcuated Fontification): Note how to use `font-lock-core-only'.
Diffstat (limited to 'lispref')
-rw-r--r-- | lispref/modes.texi | 12 |
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 which construct their text programmatically, such as @code{list-buffers} and @code{occur}. +If your mode does not use any of the other machinery of Font Lock +(i.e. it only uses the @code{font-lock-face} property), you can tell +Emacs not to load all of font-lock.el (unless it's already loaded), by +setting the variable @code{font-lock-core-only} to non-nil as part of +the @code{font-lock-defaults} settings. Here is the canonical way to +do this: + +@example +(set (make-local-variable 'font-lock-defaults) + '(nil t nil nil nil (font-lock-core-only . t))) +@end example + @node Faces for Font Lock @subsection Faces for Font Lock |