aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-06-20 02:23:12 +0000
committerRichard M. Stallman1997-06-20 02:23:12 +0000
commite78ea3db1b66c6ee6756d78cd0d48cb45d082076 (patch)
tree9125f164ad6ce9e5e2b015828550796beff6941d
parent208920be0d721170cfd7684a5e387659b3b9fb31 (diff)
downloademacs-e78ea3db1b66c6ee6756d78cd0d48cb45d082076.tar.gz
emacs-e78ea3db1b66c6ee6756d78cd0d48cb45d082076.zip
Clarify about text props in strings and how to remove all of them.
-rw-r--r--lispref/text.texi20
1 files changed, 12 insertions, 8 deletions
diff --git a/lispref/text.texi b/lispref/text.texi
index 66a53e66a0e..6ba44ecda1a 100644
--- a/lispref/text.texi
+++ b/lispref/text.texi
@@ -2171,15 +2171,15 @@ stored in this list is used instead. Here is an example:
2171@subsection Changing Text Properties 2171@subsection Changing Text Properties
2172 2172
2173 The primitives for changing properties apply to a specified range of 2173 The primitives for changing properties apply to a specified range of
2174text. The function @code{set-text-properties} (see end of section) sets 2174text in a buffer or string. The function @code{set-text-properties}
2175the entire property list of the text in that range; more often, it is 2175(see end of section) sets the entire property list of the text in that
2176useful to add, change, or delete just certain properties specified by 2176range; more often, it is useful to add, change, or delete just certain
2177name. 2177properties specified by name.
2178 2178
2179 Since text properties are considered part of the buffer's contents, and 2179 Since text properties are considered part of the contents of the
2180can affect how the buffer looks on the screen, any change in the text 2180buffer (or string), and can affect how a buffer looks on the screen, any
2181properties is considered a buffer modification. Buffer text property 2181change in buffer text properties mark the buffer as modified. Buffer
2182changes are undoable (@pxref{Undo}). 2182text property changes are undoable also (@pxref{Undo}).
2183 2183
2184@defun put-text-property start end prop value &optional object 2184@defun put-text-property start end prop value &optional object
2185This function sets the @var{prop} property to @var{value} for the text 2185This function sets the @var{prop} property to @var{value} for the text
@@ -2228,6 +2228,10 @@ For example, here's how to remove the @code{face} property.
2228The return value is @code{t} if the function actually changed some 2228The return value is @code{t} if the function actually changed some
2229property's value; @code{nil} otherwise (if @var{props} is @code{nil} or 2229property's value; @code{nil} otherwise (if @var{props} is @code{nil} or
2230if no character in the specified text had any of those properties). 2230if no character in the specified text had any of those properties).
2231
2232To remove all text properties from certain text, use
2233@code{set-text-properties} and specify @code{nil} for the new property
2234list.
2231@end defun 2235@end defun
2232 2236
2233@defun set-text-properties start end props &optional object 2237@defun set-text-properties start end props &optional object