aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-08-22 05:58:17 +0000
committerRichard M. Stallman1997-08-22 05:58:17 +0000
commit584b81041669d040a23cd7cd9c73421c8b59d210 (patch)
tree72a741c42a9bbe2fb718e979409c204eb89aaf53
parent839dd8341f9960b0fa792add2011b33dab66d7ac (diff)
downloademacs-584b81041669d040a23cd7cd9c73421c8b59d210.tar.gz
emacs-584b81041669d040a23cd7cd9c73421c8b59d210.zip
Explain after-change-functions and chars vs bytes.
-rw-r--r--lispref/text.texi13
1 files changed, 10 insertions, 3 deletions
diff --git a/lispref/text.texi b/lispref/text.texi
index 6ba44ecda1a..2780eb56452 100644
--- a/lispref/text.texi
+++ b/lispref/text.texi
@@ -2973,9 +2973,16 @@ buffer that is about to change is always the current buffer.
2973This variable holds a list of a functions to call after any buffer 2973This variable holds a list of a functions to call after any buffer
2974modification. Each function receives three arguments: the beginning and 2974modification. Each function receives three arguments: the beginning and
2975end of the region just changed, and the length of the text that existed 2975end of the region just changed, and the length of the text that existed
2976before the change. (To get the current length, subtract the region 2976before the change. All three arguments are integers. The buffer that's
2977beginning from the region end.) All three arguments are integers. The 2977about to change is always the current buffer.
2978buffer that's about to change is always the current buffer. 2978
2979The length of the old text is measured in bytes; it is the difference
2980between the buffer positions before and after that text, before the
2981change. As for the changed text, its length in bytes is simply the
2982difference between the first two arguments. If you want the length
2983in @emph{characters} of the text before the change, you should use
2984a @code{before-change-functions} function that calls @code{chars-in-region}
2985(@pxref{Chars and Bytes}).
2979@end defvar 2986@end defvar
2980 2987
2981@defvar before-change-function 2988@defvar before-change-function