From: Lars Ingebrigtsen Date: Tue, 13 Jul 2021 18:21:30 +0000 (+0200) Subject: Document the syntax-multilne text property X-Git-Tag: emacs-28.0.90~1885 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7ec5a9593d5c71994633ef6f747ac989a8f585e2;p=emacs.git Document the syntax-multilne text property * doc/lispref/modes.texi (Multiline Font Lock): Document the syntax-multiline text property (bug#20436). --- 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