diff options
| author | Richard M. Stallman | 2003-12-29 21:27:13 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-12-29 21:27:13 +0000 |
| commit | 3ab66863d39abc89dcbca30e678b3fad344f83b6 (patch) | |
| tree | 61d12519b4971f50f2f76814674d26b1b5751f4f | |
| parent | 41495ddda84404d8ffb5d05c0575d61578d2db35 (diff) | |
| download | emacs-3ab66863d39abc89dcbca30e678b3fad344f83b6.tar.gz emacs-3ab66863d39abc89dcbca30e678b3fad344f83b6.zip | |
(Search-based Fontification): Explain that
face specs are symbols with face names as values.
| -rw-r--r-- | lispref/modes.texi | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lispref/modes.texi b/lispref/modes.texi index 6a55cd75c8a..2292346ffdf 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi | |||
| @@ -2024,9 +2024,10 @@ If you use @code{regexp-opt} to produce the regular expression | |||
| 2024 | @var{matcher}, then you can use @code{regexp-opt-depth} (@pxref{Syntax | 2024 | @var{matcher}, then you can use @code{regexp-opt-depth} (@pxref{Syntax |
| 2025 | of Regexps}) to calculate the value for @var{match}. | 2025 | of Regexps}) to calculate the value for @var{match}. |
| 2026 | 2026 | ||
| 2027 | @item (@var{matcher} . @var{facename}) | 2027 | @item (@var{matcher} . @var{facespec}) |
| 2028 | In this kind of element, @var{facename} is an expression whose value | 2028 | In this kind of element, @var{facespec} is an object which specifies |
| 2029 | specifies the face name to use for highlighting. | 2029 | the face variable to use for highlighting. In the simplest case, it |
| 2030 | is a Lisp variable (a symbol), whose value should be a face name. | ||
| 2030 | 2031 | ||
| 2031 | @example | 2032 | @example |
| 2032 | ;; @r{Highlight occurrences of @samp{fubar},} | 2033 | ;; @r{Highlight occurrences of @samp{fubar},} |
| @@ -2034,8 +2035,7 @@ specifies the face name to use for highlighting. | |||
| 2034 | ("fubar" . fubar-face) | 2035 | ("fubar" . fubar-face) |
| 2035 | @end example | 2036 | @end example |
| 2036 | 2037 | ||
| 2037 | The value of @var{facename} is usually a face name (a symbol), but it | 2038 | However, @var{facespec} can also be a list of the form |
| 2038 | can also be a list of the form | ||
| 2039 | 2039 | ||
| 2040 | @example | 2040 | @example |
| 2041 | (face @var{face} @var{prop1} @var{val1} @var{prop2} @var{val2}@dots{}) | 2041 | (face @var{face} @var{prop1} @var{val1} @var{prop2} @var{val2}@dots{}) |
| @@ -2053,21 +2053,21 @@ which specifies how to highlight matches found by @var{matcher}. | |||
| 2053 | It has the form | 2053 | It has the form |
| 2054 | 2054 | ||
| 2055 | @example | 2055 | @example |
| 2056 | (@var{subexp} @var{facename} @var{override} @var{laxmatch}) | 2056 | (@var{subexp} @var{facespec} @var{override} @var{laxmatch}) |
| 2057 | @end example | 2057 | @end example |
| 2058 | 2058 | ||
| 2059 | The @sc{car}, @var{subexp}, is an integer specifying which subexpression | 2059 | The @sc{car}, @var{subexp}, is an integer specifying which subexpression |
| 2060 | of the match to fontify (0 means the entire matching text). The second | 2060 | of the match to fontify (0 means the entire matching text). The second |
| 2061 | subelement, @var{facename}, specifies the face, as described above. | 2061 | subelement, @var{facespec}, specifies the face, as described above. |
| 2062 | 2062 | ||
| 2063 | The last two values in @var{highlighter}, @var{override} and | 2063 | The last two values in @var{highlighter}, @var{override} and |
| 2064 | @var{laxmatch}, are flags. If @var{override} is @code{t}, this | 2064 | @var{laxmatch}, are flags. If @var{override} is @code{t}, this |
| 2065 | element can override existing fontification made by previous elements | 2065 | element can override existing fontification made by previous elements |
| 2066 | of @code{font-lock-keywords}. If it is @code{keep}, then each | 2066 | of @code{font-lock-keywords}. If it is @code{keep}, then each |
| 2067 | character is fontified if it has not been fontified already by some | 2067 | character is fontified if it has not been fontified already by some |
| 2068 | other element. If it is @code{prepend}, the face @var{facename} is | 2068 | other element. If it is @code{prepend}, the face specified by |
| 2069 | added to the beginning of the @code{font-lock-face} property. If it | 2069 | @var{facespec} is added to the beginning of the @code{font-lock-face} |
| 2070 | is @code{append}, the face @var{facename} is added to the end of the | 2070 | property. If it is @code{append}, the face is added to the end of the |
| 2071 | @code{font-lock-face} property. | 2071 | @code{font-lock-face} property. |
| 2072 | 2072 | ||
| 2073 | If @var{laxmatch} is non-@code{nil}, it means there should be no error | 2073 | If @var{laxmatch} is non-@code{nil}, it means there should be no error |
| @@ -2231,7 +2231,7 @@ textual modes. | |||
| 2231 | Additional properties (other than @code{font-lock-face}) that are | 2231 | Additional properties (other than @code{font-lock-face}) that are |
| 2232 | being managed by Font Lock mode. Font Lock mode normally manages only | 2232 | being managed by Font Lock mode. Font Lock mode normally manages only |
| 2233 | the @code{font-lock-face} property; if you want it to manage others as | 2233 | the @code{font-lock-face} property; if you want it to manage others as |
| 2234 | well, you must specify them in a @var{facename} in | 2234 | well, you must specify them in a @var{facespec} in |
| 2235 | @code{font-lock-keywords} as well as adding them to this list. | 2235 | @code{font-lock-keywords} as well as adding them to this list. |
| 2236 | @end defvar | 2236 | @end defvar |
| 2237 | 2237 | ||