[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 7ec5a95 1/2: Document the syntax-multilne text property
From: |
Lars Ingebrigtsen |
Subject: |
master 7ec5a95 1/2: Document the syntax-multilne text property |
Date: |
Tue, 13 Jul 2021 15:48:57 -0400 (EDT) |
branch: master
commit 7ec5a9593d5c71994633ef6f747ac989a8f585e2
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
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 5869f53..d271db8 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