diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2003-10-30 22:15:20 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2003-10-30 22:15:20 +0000 |
commit | 8ba2808bb6fd49fea9db521aaab4b588a56a46dd (patch) | |
tree | 86ad6469ec51c3c405987d0752f3246da7444064 | |
parent | 85afc7c7052552216c00a0e8783e75b3fbc1bdcd (diff) | |
download | emacs-8ba2808bb6fd49fea9db521aaab4b588a56a46dd.tar.gz |
Document the existance of font-lock-syntactic-face-function and
font-lock-multiline.
-rw-r--r-- | lispref/modes.texi | 20 |
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. to match text which spans lines; this does not work reliably. While @code{font-lock-fontify-buffer} handles multi-line patterns correctly, updating when you edit the buffer does not, since it considers text one -line at a time. +line at a time. If you have patterns that typically only span one +line but can occasionally span two or three, such as +@samp{<title>...</title>}, you can ask font-lock to be more careful by +setting @code{font-lock-multiline} to @code{t}. But it still will not +work in all cases. @node Other Font Lock Variables @subsection Other Font Lock Variables @@ -2231,6 +2235,20 @@ well, you must specify them in a @var{facename} in @code{font-lock-keywords} as well as adding them to this list. @end defvar +@defvar font-lock-syntactic-face-function +A function to determine which face to use for a given syntactic +element (a string or a comment). The function is called with one +argument, the parse state at point returned by +@code{parse-partial-sexp}, and should return a face. The default +value returns @code{font-lock-comment-face} for comments and +@code{font-lock-string-face} for strings. + +This can be used to highlighting different kinds of strings or +comments differently. It is also sometimes abused together with +@code{font-lock-syntactic-keywords} to highlight elements that span +multiple lines, but this is too obscure to document in this manual. +@end defvar + @node Levels of Font Lock @subsection Levels of Font Lock |