diff options
| author | Richard M. Stallman | 1997-06-20 02:23:12 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-06-20 02:23:12 +0000 |
| commit | e78ea3db1b66c6ee6756d78cd0d48cb45d082076 (patch) | |
| tree | 9125f164ad6ce9e5e2b015828550796beff6941d | |
| parent | 208920be0d721170cfd7684a5e387659b3b9fb31 (diff) | |
| download | emacs-e78ea3db1b66c6ee6756d78cd0d48cb45d082076.tar.gz emacs-e78ea3db1b66c6ee6756d78cd0d48cb45d082076.zip | |
Clarify about text props in strings and how to remove all of them.
| -rw-r--r-- | lispref/text.texi | 20 |
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 |
| 2174 | text. The function @code{set-text-properties} (see end of section) sets | 2174 | text in a buffer or string. The function @code{set-text-properties} |
| 2175 | the 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 |
| 2176 | useful to add, change, or delete just certain properties specified by | 2176 | range; more often, it is useful to add, change, or delete just certain |
| 2177 | name. | 2177 | properties 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 |
| 2180 | can affect how the buffer looks on the screen, any change in the text | 2180 | buffer (or string), and can affect how a buffer looks on the screen, any |
| 2181 | properties is considered a buffer modification. Buffer text property | 2181 | change in buffer text properties mark the buffer as modified. Buffer |
| 2182 | changes are undoable (@pxref{Undo}). | 2182 | text 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 |
| 2185 | This function sets the @var{prop} property to @var{value} for the text | 2185 | This 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. | |||
| 2228 | The return value is @code{t} if the function actually changed some | 2228 | The return value is @code{t} if the function actually changed some |
| 2229 | property's value; @code{nil} otherwise (if @var{props} is @code{nil} or | 2229 | property's value; @code{nil} otherwise (if @var{props} is @code{nil} or |
| 2230 | if no character in the specified text had any of those properties). | 2230 | if no character in the specified text had any of those properties). |
| 2231 | |||
| 2232 | To remove all text properties from certain text, use | ||
| 2233 | @code{set-text-properties} and specify @code{nil} for the new property | ||
| 2234 | list. | ||
| 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 |