]> git.eshelyaron.com Git - emacs.git/commitdiff
(Font Lock Basics): Explain how nil for font-lock-defaults affects
authorRichard M. Stallman <rms@gnu.org>
Mon, 11 Dec 2006 02:35:00 +0000 (02:35 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 11 Dec 2006 02:35:00 +0000 (02:35 +0000)
face menu.  Explain how to make it non-nil without enabling any
fontification.

lispref/ChangeLog
lispref/modes.texi

index b89dc13e4711cf564b10751bc719c4db5fe5d1fe..69098b20e64322ce8cfdd6fbc1abfd92f83c57bf 100644 (file)
@@ -1,3 +1,9 @@
+2006-12-11  Richard Stallman  <rms@gnu.org>
+
+       * modes.texi (Font Lock Basics): Explain how nil for font-lock-defaults
+       affects face menu.  Explain how to make it non-nil without enabling
+       any fontification.
+
 2006-12-10  Chong Yidong  <cyd@stupidchicken.com>
 
        * modes.texi (Font Lock Basics): Document nil value of
index 1462f1a2fdfeaf245a6c17eb3888213aca96caae..29c316d625de35516769c6f96da8a4a30a47dfaa 100644 (file)
@@ -2358,9 +2358,12 @@ Lock mode is enabled, to set all the other variables.
 @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.  If its value is @code{nil}, no
-highlighting is performed.  If non-@code{nil}, the value should look
-like this:
+buffer-local when you set it.  If its value is @code{nil}, Font-Lock
+mode does no highlighting, and you can use the @samp{Faces} menu
+(under @samp{Edit} and then @samp{Text Properties} in the menu bar) to
+assign faces explicitly to text in the buffer.
+
+If non-@code{nil}, the value should look like this:
 
 @example
 (@var{keywords} [@var{keywords-only} [@var{case-fold}
@@ -2406,6 +2409,13 @@ fontification, aside from those you can control with the first five
 elements.  @xref{Other Font Lock Variables}.
 @end defvar
 
+  If your mode fontifies text explicitly by adding
+@code{font-lock-face} properties, it can specify @code{(nil t)} for
+@code{font-lock-defaults} to turn off all automatic fontification.
+However, this is not required; it is possible to fontify some things
+using @code{font-lock-face} properties and set up automatic
+fontification for other parts of the text.
+
 @node Search-based Fontification
 @subsection Search-based Fontification