diff options
| author | Richard M. Stallman | 2009-05-17 16:09:22 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2009-05-17 16:09:22 +0000 |
| commit | eae7d8f84e2805daf127f1bcc7760b241cb76257 (patch) | |
| tree | e478885abedcaf15ee4f847d4d1481c26e785dda | |
| parent | b87661795f9b38291ef2fe8c311362dd7e2d794b (diff) | |
| download | emacs-eae7d8f84e2805daf127f1bcc7760b241cb76257.tar.gz emacs-eae7d8f84e2805daf127f1bcc7760b241cb76257.zip | |
* modes.texi (Precalculated Fontification): Clarify text.
| -rw-r--r-- | doc/lispref/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/lispref/modes.texi | 27 |
2 files changed, 19 insertions, 12 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 43ee966a463..9bcd9511f78 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2009-05-17 Richard M Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * modes.texi (Precalculated Fontification): Clarify text. | ||
| 4 | |||
| 1 | 2009-05-17 Martin Rudalics <rudalics@gmx.at> | 5 | 2009-05-17 Martin Rudalics <rudalics@gmx.at> |
| 2 | 6 | ||
| 3 | * windows.texi (Selecting Windows): Clarify descriptions of | 7 | * windows.texi (Selecting Windows): Clarify descriptions of |
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index f166877b45c..af20bed18b5 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -2864,18 +2864,21 @@ wherever they appear. | |||
| 2864 | @node Precalculated Fontification | 2864 | @node Precalculated Fontification |
| 2865 | @subsection Precalculated Fontification | 2865 | @subsection Precalculated Fontification |
| 2866 | 2866 | ||
| 2867 | In addition to using @code{font-lock-defaults} for search-based | 2867 | Some major modes such as @code{list-buffers} and @code{occur} |
| 2868 | fontification, you may use the special character property | 2868 | construct the buffer text programmatically. The easiest way for them |
| 2869 | @code{font-lock-face} (@pxref{Special Properties}). This property | 2869 | to support Font Lock mode is to specify the faces of text when they |
| 2870 | acts just like the explicit @code{face} property, but its activation | 2870 | insert the text in the buffer. |
| 2871 | is toggled when the user calls @kbd{M-x font-lock-mode}. Using | 2871 | |
| 2872 | @code{font-lock-face} is especially convenient for special modes | 2872 | The way to do this is to specify the faces in the text with the |
| 2873 | which construct their text programmatically, such as | 2873 | special text property @code{font-lock-face} (@pxref{Special |
| 2874 | @code{list-buffers} and @code{occur}. | 2874 | Properties}). When Font Lock mode is enabled, this property controls |
| 2875 | 2875 | the display, just like the @code{face} property. When Font Lock mode | |
| 2876 | If your mode does not use any of the other machinery of Font Lock | 2876 | is disabled, @code{font-lock-face} has no effect on the display. |
| 2877 | (i.e. it only uses the @code{font-lock-face} property), it should not | 2877 | |
| 2878 | set the variable @code{font-lock-defaults}. | 2878 | It is ok for a mode to use @code{font-lock-face} for some text and |
| 2879 | also use the normal Font Lock machinery. But if the mode does not use | ||
| 2880 | the normal Font Lock machinery, it should not set the variable | ||
| 2881 | @code{font-lock-defaults}. | ||
| 2879 | 2882 | ||
| 2880 | @node Faces for Font Lock | 2883 | @node Faces for Font Lock |
| 2881 | @subsection Faces for Font Lock | 2884 | @subsection Faces for Font Lock |