From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/elisp/multiline-font-lock.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 devdocs/elisp/multiline-font-lock.html (limited to 'devdocs/elisp/multiline-font-lock.html') diff --git a/devdocs/elisp/multiline-font-lock.html b/devdocs/elisp/multiline-font-lock.html new file mode 100644 index 00000000..a4ec6888 --- /dev/null +++ b/devdocs/elisp/multiline-font-lock.html @@ -0,0 +1,23 @@ +

Multiline Font Lock Constructs

Normally, elements of font-lock-keywords should not match across multiple lines; that doesn’t work reliably, because Font Lock usually scans just part of the buffer, and it can miss a multi-line construct that crosses the line boundary where the scan starts. (The scan normally starts at the beginning of a line.)

Making elements that match multiline constructs work properly has two aspects: correct identification and correct rehighlighting. The first means that Font Lock finds all multiline constructs. The second means that Font Lock will correctly rehighlight all the relevant text when a multiline construct is changed—for example, if some of the text that was previously part of a multiline construct ceases to be part of it. The two aspects are closely related, and often getting one of them to work will appear to make the other also work. However, for reliable results you must attend explicitly to both aspects.

There are three ways to ensure correct identification of multiline constructs:

There are several ways to do rehighlighting of multiline constructs:

+ + + + + + + +
+

+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
+ https://www.gnu.org/software/emacs/manual/html_node/elisp/Multiline-Font-Lock.html +

+
-- cgit v1.2.3