[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r101478: * lispref/text.texi (Special
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r101478: * lispref/text.texi (Special Properties): Clarify when modification-hooks run. |
Date: |
Sat, 18 Sep 2010 17:50:06 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 101478
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Sat 2010-09-18 17:50:06 +0200
message:
* lispref/text.texi (Special Properties): Clarify when modification-hooks run.
modified:
doc/lispref/ChangeLog
doc/lispref/text.texi
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog 2010-09-11 13:58:57 +0000
+++ b/doc/lispref/ChangeLog 2010-09-18 15:50:06 +0000
@@ -1,3 +1,7 @@
+2010-09-18 Stefan Monnier <address@hidden>
+
+ * text.texi (Special Properties): Clarify when modification-hooks run.
+
2010-09-11 Stefan Monnier <address@hidden>
* syntax.texi (Syntax Flags): Document new `c' flag.
=== modified file 'doc/lispref/text.texi'
--- a/doc/lispref/text.texi 2010-09-10 16:44:35 +0000
+++ b/doc/lispref/text.texi 2010-09-18 15:50:06 +0000
@@ -3230,12 +3230,16 @@
@cindex hooks for changing a character
@kindex modification-hooks @r{(text property)}
If a character has the property @code{modification-hooks}, then its
-value should be a list of functions; modifying that character calls all
-of those functions. Each function receives two arguments: the beginning
-and end of the part of the buffer being modified. Note that if a
-particular modification hook function appears on several characters
-being modified by a single primitive, you can't predict how many times
-the function will be called.
+value should be a list of functions; modifying that character calls
+all of those functions before the actual modification. Each function
+receives two arguments: the beginning and end of the part of the
+buffer being modified. Note that if a particular modification hook
+function appears on several characters being modified by a single
+primitive, you can't predict how many times the function will
+be called.
+Furthermore, insertion will not modify any existing character, so this
+hook will only be run when removing some characters, replacing them
+with others, or changing their text-properties.
If these functions modify the buffer, they should bind
@code{inhibit-modification-hooks} to @code{t} around doing so, to
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r101478: * lispref/text.texi (Special Properties): Clarify when modification-hooks run.,
Stefan Monnier <=