changeset 74589:be1522593875

(Font Lock Basics): Explain how nil for font-lock-defaults affects face menu. Explain how to make it non-nil without enabling any fontification.
author Richard M. Stallman <rms@gnu.org>
date Mon, 11 Dec 2006 02:34:51 +0000
parents b2ab35b25c9a
children c2d34e1344e1
files lispref/modes.texi
diffstat 1 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lispref/modes.texi	Mon Dec 11 01:46:00 2006 +0000
+++ b/lispref/modes.texi	Mon Dec 11 02:34:51 2006 +0000
@@ -2358,9 +2358,12 @@
 @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 @@
 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