Mercurial > emacs
changeset 45714:7057566fa4c1
(Precalcuated Fontification): Note how to use `font-lock-core-only'.
author | Colin Walters <walters@gnu.org> |
---|---|
date | Sun, 09 Jun 2002 00:43:09 +0000 |
parents | 57fbb3200dc6 |
children | 9f0d0f0a1a7e |
files | lispref/modes.texi |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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