From 0ab0c481624ec9d18456597e677b65b34b922cae Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sun, 9 Jun 2002 00:43:09 +0000 Subject: [PATCH] (Precalcuated Fontification): Note how to use `font-lock-core-only'. --- lispref/modes.texi | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- 2.39.2