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/text-props-and-strings.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 devdocs/elisp/text-props-and-strings.html (limited to 'devdocs/elisp/text-props-and-strings.html') diff --git a/devdocs/elisp/text-props-and-strings.html b/devdocs/elisp/text-props-and-strings.html new file mode 100644 index 00000000..0a08f9df --- /dev/null +++ b/devdocs/elisp/text-props-and-strings.html @@ -0,0 +1,12 @@ +

Text Properties in Strings

A string can hold properties for the characters it contains, in addition to the characters themselves. This enables programs that copy text between strings and buffers to copy the text’s properties with no special effort. See Text Properties, for an explanation of what text properties mean. Strings with text properties use a special read and print syntax:

#("characters" property-data...)
+
+

where property-data consists of zero or more elements, in groups of three as follows:

beg end plist
+
+

The elements beg and end are integers, and together specify a range of indices in the string; plist is the property list for that range. For example,

#("foo bar" 0 3 (face bold) 3 4 nil 4 7 (face italic))
+
+

represents a string whose textual contents are ‘foo bar’, in which the first three characters have a face property with value bold, and the last three have a face property with value italic. (The fourth character has no text properties, so its property list is nil. It is not actually necessary to mention ranges with nil as the property list, since any characters not mentioned in any range will default to having no properties.)

+

+ 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/Text-Props-and-Strings.html +

+
-- cgit v1.2.3