changeset 74561:7e397b97c9a6

(Font Lock Basics): Document nil value of font-lock-defaults.
author Chong Yidong <cyd@stupidchicken.com>
date Sun, 10 Dec 2006 21:10:44 +0000
parents cf9155e5b652
children 042b0e37d0d3
files lispref/modes.texi
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lispref/modes.texi	Sun Dec 10 21:09:47 2006 +0000
+++ b/lispref/modes.texi	Sun Dec 10 21:10:44 2006 +0000
@@ -2358,7 +2358,9 @@
 @defvar font-lock-defaults
 This variable is set by major modes, as a buffer-local variable, to
 specify how to fontify text in that mode.  It automatically becomes
-buffer-local when you set it.  The value should look like this:
+buffer-local when you set it.  If its value is @code{nil}, no
+highlighting is performed.  If non-@code{nil}, the value should look
+like this:
 
 @example
 (@var{keywords} [@var{keywords-only} [@var{case-fold}
@@ -2374,9 +2376,10 @@
 symbol how to do level 2, and so on.  @xref{Levels of Font Lock}.
 
 The second element, @var{keywords-only}, specifies the value of the
-variable @code{font-lock-keywords-only}.  If this is non-@code{nil},
-syntactic fontification (of strings and comments) is not performed.
-@xref{Syntactic Font Lock}.
+variable @code{font-lock-keywords-only}.  If this is omitted or
+@code{nil}, syntactic fontification (of strings and comments) is also
+performed.  If this is non-@code{nil}, such fontification is not
+performed.  @xref{Syntactic Font Lock}.
 
 The third element, @var{case-fold}, specifies the value of
 @code{font-lock-keywords-case-fold-search}.  If it is non-@code{nil},