From 7ec5a9593d5c71994633ef6f747ac989a8f585e2 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 13 Jul 2021 20:21:30 +0200 Subject: [PATCH] Document the syntax-multilne text property * doc/lispref/modes.texi (Multiline Font Lock): Document the syntax-multiline text property (bug#20436). --- doc/lispref/modes.texi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 5869f53636c..d271db8e3f6 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -3575,6 +3575,14 @@ it also handles the case where highlighting depends on subsequent lines. @end itemize +If parsing the syntax of a construct depends on it being parsed in one +single chunk, you can add the @code{syntax-multiline} text property +over the construct in question. The most common use for this is when +the syntax to use for @samp{FOO} depends on some later text +@samp{BAR}: By placing this text property over the whole of +@samp{FOO...BAR}, you make sure that any change of @samp{BAR} will +cause the syntax of @samp{FOO} to be recomputed. + @menu * Font Lock Multiline:: Marking multiline chunks with a text property. * Region to Refontify:: Controlling which region gets refontified -- 2.39.2