# HG changeset patch # User Colin Walters # Date 1023583389 0 # Node ID 7057566fa4c13075f879ce5a5825075cfda9fb4e # Parent 57fbb3200dc6f02a0f7fae501ff6d947676e41a2 (Precalcuated Fontification): Note how to use `font-lock-core-only'. diff -r 57fbb3200dc6 -r 7057566fa4c1 lispref/modes.texi --- a/lispref/modes.texi Sun Jun 09 00:41:11 2002 +0000 +++ b/lispref/modes.texi Sun Jun 09 00:43:09 2002 +0000 @@ -2097,6 +2097,18 @@ 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