diff options
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 16 |
2 files changed, 14 insertions, 6 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index e3df5fab9e9..ec065e9ce76 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-09-18 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * text.texi (Special Properties): Clarify when modification-hooks run. | ||
| 4 | |||
| 1 | 2010-09-11 Stefan Monnier <monnier@iro.umontreal.ca> | 5 | 2010-09-11 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 6 | ||
| 3 | * syntax.texi (Syntax Flags): Document new `c' flag. | 7 | * syntax.texi (Syntax Flags): Document new `c' flag. |
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index ff4e65d299f..04e1e714133 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -3230,12 +3230,16 @@ the @code{line-prefix} variable). @xref{Truncation}. | |||
| 3230 | @cindex hooks for changing a character | 3230 | @cindex hooks for changing a character |
| 3231 | @kindex modification-hooks @r{(text property)} | 3231 | @kindex modification-hooks @r{(text property)} |
| 3232 | If a character has the property @code{modification-hooks}, then its | 3232 | If a character has the property @code{modification-hooks}, then its |
| 3233 | value should be a list of functions; modifying that character calls all | 3233 | value should be a list of functions; modifying that character calls |
| 3234 | of those functions. Each function receives two arguments: the beginning | 3234 | all of those functions before the actual modification. Each function |
| 3235 | and end of the part of the buffer being modified. Note that if a | 3235 | receives two arguments: the beginning and end of the part of the |
| 3236 | particular modification hook function appears on several characters | 3236 | buffer being modified. Note that if a particular modification hook |
| 3237 | being modified by a single primitive, you can't predict how many times | 3237 | function appears on several characters being modified by a single |
| 3238 | the function will be called. | 3238 | primitive, you can't predict how many times the function will |
| 3239 | be called. | ||
| 3240 | Furthermore, insertion will not modify any existing character, so this | ||
| 3241 | hook will only be run when removing some characters, replacing them | ||
| 3242 | with others, or changing their text-properties. | ||
| 3239 | 3243 | ||
| 3240 | If these functions modify the buffer, they should bind | 3244 | If these functions modify the buffer, they should bind |
| 3241 | @code{inhibit-modification-hooks} to @code{t} around doing so, to | 3245 | @code{inhibit-modification-hooks} to @code{t} around doing so, to |