aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2003-12-29 21:27:13 +0000
committerRichard M. Stallman2003-12-29 21:27:13 +0000
commit3ab66863d39abc89dcbca30e678b3fad344f83b6 (patch)
tree61d12519b4971f50f2f76814674d26b1b5751f4f
parent41495ddda84404d8ffb5d05c0575d61578d2db35 (diff)
downloademacs-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.texi22
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
2025of Regexps}) to calculate the value for @var{match}. 2025of Regexps}) to calculate the value for @var{match}.
2026 2026
2027@item (@var{matcher} . @var{facename}) 2027@item (@var{matcher} . @var{facespec})
2028In this kind of element, @var{facename} is an expression whose value 2028In this kind of element, @var{facespec} is an object which specifies
2029specifies the face name to use for highlighting. 2029the face variable to use for highlighting. In the simplest case, it
2030is 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
2037The value of @var{facename} is usually a face name (a symbol), but it 2038However, @var{facespec} can also be a list of the form
2038can 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}.
2053It has the form 2053It 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
2059The @sc{car}, @var{subexp}, is an integer specifying which subexpression 2059The @sc{car}, @var{subexp}, is an integer specifying which subexpression
2060of the match to fontify (0 means the entire matching text). The second 2060of the match to fontify (0 means the entire matching text). The second
2061subelement, @var{facename}, specifies the face, as described above. 2061subelement, @var{facespec}, specifies the face, as described above.
2062 2062
2063The last two values in @var{highlighter}, @var{override} and 2063The 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
2065element can override existing fontification made by previous elements 2065element can override existing fontification made by previous elements
2066of @code{font-lock-keywords}. If it is @code{keep}, then each 2066of @code{font-lock-keywords}. If it is @code{keep}, then each
2067character is fontified if it has not been fontified already by some 2067character is fontified if it has not been fontified already by some
2068other element. If it is @code{prepend}, the face @var{facename} is 2068other element. If it is @code{prepend}, the face specified by
2069added 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}
2070is @code{append}, the face @var{facename} is added to the end of the 2070property. 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
2073If @var{laxmatch} is non-@code{nil}, it means there should be no error 2073If @var{laxmatch} is non-@code{nil}, it means there should be no error
@@ -2231,7 +2231,7 @@ textual modes.
2231Additional properties (other than @code{font-lock-face}) that are 2231Additional properties (other than @code{font-lock-face}) that are
2232being managed by Font Lock mode. Font Lock mode normally manages only 2232being managed by Font Lock mode. Font Lock mode normally manages only
2233the @code{font-lock-face} property; if you want it to manage others as 2233the @code{font-lock-face} property; if you want it to manage others as
2234well, you must specify them in a @var{facename} in 2234well, 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