aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/lispref/text.texi23
1 files changed, 15 insertions, 8 deletions
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 7791c261e3b..de0b00758a5 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -4676,10 +4676,10 @@ group you start for any given buffer should be the last one finished.
4676@cindex change hooks 4676@cindex change hooks
4677@cindex hooks for text changes 4677@cindex hooks for text changes
4678 4678
4679 These hook variables let you arrange to take notice of all changes in 4679 These hook variables let you arrange to take notice of changes in
4680all buffers (or in a particular buffer, if you make them buffer-local). 4680buffers (or in a particular buffer, if you make them buffer-local).
4681See also @ref{Special Properties}, for how to detect changes to specific 4681See also @ref{Special Properties}, for how to detect changes to
4682parts of the text. 4682specific parts of the text.
4683 4683
4684 The functions you use in these hooks should save and restore the match 4684 The functions you use in these hooks should save and restore the match
4685data if they do anything that uses regular expressions; otherwise, they 4685data if they do anything that uses regular expressions; otherwise, they
@@ -4687,8 +4687,8 @@ 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 any buffer 4690This variable holds a list of functions to call before most buffer
4691modification. Each function gets two arguments, the beginning and end 4691modifications. Each function gets two arguments, the beginning and end
4692of the region that is about to change, represented as integers. The 4692of the region that is about to change, represented as integers. The
4693buffer that is about to change is always the current buffer. 4693buffer that is about to change is always the current buffer.
4694@end defvar 4694@end defvar
@@ -4706,8 +4706,15 @@ for the changed text, its length is simply the difference between the
4706first two arguments. 4706first two arguments.
4707@end defvar 4707@end defvar
4708 4708
4709 Output of messages into the @file{*Messages*} buffer does not 4709 Output of messages into the @file{*Messages*} buffer does not call
4710call these functions. 4710these functions, and neither do certain internal buffer changes, such
4711as changes in buffers created by Emacs internally for certain jobs,
4712that should not be visible to Lisp programs.
4713
4714 Do @emph{not} expect the before-change hooks and the after-change
4715hooks be called in balanced pairs around each buffer change. These
4716hooks are provided on the assumption that Lisp programs will use
4717either before- or the after-change hooks, but not both.
4711 4718
4712@defmac combine-after-change-calls body@dots{} 4719@defmac combine-after-change-calls body@dots{}
4713The macro executes @var{body} normally, but arranges to call the 4720The macro executes @var{body} normally, but arranges to call the