diff options
| author | Richard M. Stallman | 2006-12-11 02:35:00 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-12-11 02:35:00 +0000 |
| commit | 4de0c73c7415506781e4e630e626c565e2b4a14d (patch) | |
| tree | 0e977cbb01adaa6c66a75693c9f4bea0a6464da9 | |
| parent | a3f56d9c0c90b6205d10e0c51ecad2826b841bf8 (diff) | |
| download | emacs-4de0c73c7415506781e4e630e626c565e2b4a14d.tar.gz emacs-4de0c73c7415506781e4e630e626c565e2b4a14d.zip | |
(Font Lock Basics): Explain how nil for font-lock-defaults affects
face menu. Explain how to make it non-nil without enabling any
fontification.
| -rw-r--r-- | lispref/ChangeLog | 6 | ||||
| -rw-r--r-- | lispref/modes.texi | 16 |
2 files changed, 19 insertions, 3 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index b89dc13e471..69098b20e64 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-12-11 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * modes.texi (Font Lock Basics): Explain how nil for font-lock-defaults | ||
| 4 | affects face menu. Explain how to make it non-nil without enabling | ||
| 5 | any fontification. | ||
| 6 | |||
| 1 | 2006-12-10 Chong Yidong <cyd@stupidchicken.com> | 7 | 2006-12-10 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 8 | ||
| 3 | * modes.texi (Font Lock Basics): Document nil value of | 9 | * modes.texi (Font Lock Basics): Document nil value of |
diff --git a/lispref/modes.texi b/lispref/modes.texi index 1462f1a2fdf..29c316d625d 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi | |||
| @@ -2358,9 +2358,12 @@ Lock mode is enabled, to set all the other variables. | |||
| 2358 | @defvar font-lock-defaults | 2358 | @defvar font-lock-defaults |
| 2359 | This variable is set by major modes, as a buffer-local variable, to | 2359 | This variable is set by major modes, as a buffer-local variable, to |
| 2360 | specify how to fontify text in that mode. It automatically becomes | 2360 | specify how to fontify text in that mode. It automatically becomes |
| 2361 | buffer-local when you set it. If its value is @code{nil}, no | 2361 | buffer-local when you set it. If its value is @code{nil}, Font-Lock |
| 2362 | highlighting is performed. If non-@code{nil}, the value should look | 2362 | mode does no highlighting, and you can use the @samp{Faces} menu |
| 2363 | like this: | 2363 | (under @samp{Edit} and then @samp{Text Properties} in the menu bar) to |
| 2364 | assign faces explicitly to text in the buffer. | ||
| 2365 | |||
| 2366 | If non-@code{nil}, the value should look like this: | ||
| 2364 | 2367 | ||
| 2365 | @example | 2368 | @example |
| 2366 | (@var{keywords} [@var{keywords-only} [@var{case-fold} | 2369 | (@var{keywords} [@var{keywords-only} [@var{case-fold} |
| @@ -2406,6 +2409,13 @@ fontification, aside from those you can control with the first five | |||
| 2406 | elements. @xref{Other Font Lock Variables}. | 2409 | elements. @xref{Other Font Lock Variables}. |
| 2407 | @end defvar | 2410 | @end defvar |
| 2408 | 2411 | ||
| 2412 | If your mode fontifies text explicitly by adding | ||
| 2413 | @code{font-lock-face} properties, it can specify @code{(nil t)} for | ||
| 2414 | @code{font-lock-defaults} to turn off all automatic fontification. | ||
| 2415 | However, this is not required; it is possible to fontify some things | ||
| 2416 | using @code{font-lock-face} properties and set up automatic | ||
| 2417 | fontification for other parts of the text. | ||
| 2418 | |||
| 2409 | @node Search-based Fontification | 2419 | @node Search-based Fontification |
| 2410 | @subsection Search-based Fontification | 2420 | @subsection Search-based Fontification |
| 2411 | 2421 | ||