aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2003-10-30 22:15:20 +0000
committerStefan Monnier2003-10-30 22:15:20 +0000
commit8ba2808bb6fd49fea9db521aaab4b588a56a46dd (patch)
tree86ad6469ec51c3c405987d0752f3246da7444064
parent85afc7c7052552216c00a0e8783e75b3fbc1bdcd (diff)
downloademacs-8ba2808bb6fd49fea9db521aaab4b588a56a46dd.tar.gz
emacs-8ba2808bb6fd49fea9db521aaab4b588a56a46dd.zip
Document the existance of font-lock-syntactic-face-function and
font-lock-multiline.
-rw-r--r--lispref/modes.texi20
1 files changed, 19 insertions, 1 deletions
diff --git a/lispref/modes.texi b/lispref/modes.texi
index 0668e04c172..7c32b713261 100644
--- a/lispref/modes.texi
+++ b/lispref/modes.texi
@@ -2161,7 +2161,11 @@ Its value should have one of the forms described in this table.
2161to match text which spans lines; this does not work reliably. While 2161to match text which spans lines; this does not work reliably. While
2162@code{font-lock-fontify-buffer} handles multi-line patterns correctly, 2162@code{font-lock-fontify-buffer} handles multi-line patterns correctly,
2163updating when you edit the buffer does not, since it considers text one 2163updating when you edit the buffer does not, since it considers text one
2164line at a time. 2164line at a time. If you have patterns that typically only span one
2165line but can occasionally span two or three, such as
2166@samp{<title>...</title>}, you can ask font-lock to be more careful by
2167setting @code{font-lock-multiline} to @code{t}. But it still will not
2168work in all cases.
2165 2169
2166@node Other Font Lock Variables 2170@node Other Font Lock Variables
2167@subsection Other Font Lock Variables 2171@subsection Other Font Lock Variables
@@ -2231,6 +2235,20 @@ well, you must specify them in a @var{facename} in
2231@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.
2232@end defvar 2236@end defvar
2233 2237
2238@defvar font-lock-syntactic-face-function
2239A function to determine which face to use for a given syntactic
2240element (a string or a comment). The function is called with one
2241argument, the parse state at point returned by
2242@code{parse-partial-sexp}, and should return a face. The default
2243value returns @code{font-lock-comment-face} for comments and
2244@code{font-lock-string-face} for strings.
2245
2246This can be used to highlighting different kinds of strings or
2247comments differently. It is also sometimes abused together with
2248@code{font-lock-syntactic-keywords} to highlight elements that span
2249multiple lines, but this is too obscure to document in this manual.
2250@end defvar
2251
2234@node Levels of Font Lock 2252@node Levels of Font Lock
2235@subsection Levels of Font Lock 2253@subsection Levels of Font Lock
2236 2254