aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2016-08-10 20:12:55 +0300
committerEli Zaretskii2016-08-10 20:12:55 +0300
commitccd0e92ecccba35d9a59ddf75b269d9eaa504e94 (patch)
tree62ff44bec4b80d7e11ff2a322e618eef543d5944
parentf785ff45d56b40f744a3d7138231d23dfd35dda4 (diff)
downloademacs-ccd0e92ecccba35d9a59ddf75b269d9eaa504e94.tar.gz
emacs-ccd0e92ecccba35d9a59ddf75b269d9eaa504e94.zip
* doc/lispref/text.texi (Change Hooks): Minor copyedits.
-rw-r--r--doc/lispref/text.texi30
1 files changed, 18 insertions, 12 deletions
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index de0b00758a5..8b4810f4a60 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -4687,18 +4687,20 @@ will interfere in bizarre ways with the editing operations that call
4687them. 4687them.
4688 4688
4689@defvar before-change-functions 4689@defvar before-change-functions
4690This variable holds a list of functions to call before most buffer 4690This variable holds a list of functions to call when Emacs is about to
4691modifications. Each function gets two arguments, the beginning and end 4691modify a buffer. Each function gets two arguments, the beginning and
4692of the region that is about to change, represented as integers. The 4692end of the region that is about to change, represented as integers.
4693buffer that is about to change is always the current buffer. 4693The buffer that is about to change is always the current buffer when
4694the function is called.
4694@end defvar 4695@end defvar
4695 4696
4696@defvar after-change-functions 4697@defvar after-change-functions
4697This variable holds a list of functions to call after any buffer 4698This variable holds a list of functions to call after Emacs modifies a
4698modification. Each function receives three arguments: the beginning 4699buffer. Each function receives three arguments: the beginning and end
4699and end of the region just changed, and the length of the text that 4700of the region just changed, and the length of the text that existed
4700existed before the change. All three arguments are integers. The 4701before the change. All three arguments are integers. The buffer that
4701buffer that has been changed is always the current buffer. 4702has been changed is always the current buffer when the function is
4703called.
4702 4704
4703The length of the old text is the difference between the buffer 4705The length of the old text is the difference between the buffer
4704positions before and after that text as it was before the change. As 4706positions before and after that text as it was before the change. As
@@ -4712,9 +4714,13 @@ as changes in buffers created by Emacs internally for certain jobs,
4712that should not be visible to Lisp programs. 4714that should not be visible to Lisp programs.
4713 4715
4714 Do @emph{not} expect the before-change hooks and the after-change 4716 Do @emph{not} expect the before-change hooks and the after-change
4715hooks be called in balanced pairs around each buffer change. These 4717hooks be called in balanced pairs around each buffer change. Also
4716hooks are provided on the assumption that Lisp programs will use 4718don't expect the before-change hooks to be called for every chunk of
4717either before- or the after-change hooks, but not both. 4719text Emacs is about to delete. These hooks are provided on the
4720assumption that Lisp programs will use either before- or the
4721after-change hooks, but not both, and the boundaries of the region
4722where the changes happen might include more than just the actual
4723changed text, or even lump together several changes done piecemeal.
4718 4724
4719@defmac combine-after-change-calls body@dots{} 4725@defmac combine-after-change-calls body@dots{}
4720The macro executes @var{body} normally, but arranges to call the 4726The macro executes @var{body} normally, but arranges to call the