aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorRichard M. Stallman1994-04-10 02:33:16 +0000
committerRichard M. Stallman1994-04-10 02:33:16 +0000
commit5f0792675d9031e0ed88f4b33e18afe7bfb6a47d (patch)
tree9e409a0948d14ae35e189174a859b53f51a4560e /src/buffer.c
parent867dd1594f8abdf719ee24cc86a2fb1d73f1488d (diff)
downloademacs-5f0792675d9031e0ed88f4b33e18afe7bfb6a47d.tar.gz
emacs-5f0792675d9031e0ed88f4b33e18afe7bfb6a47d.zip
(Vafter_change_functions, Vbefore_change_functions): New variables.
(syms_of_buffer): Set up Lisp vars.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c35
1 files changed, 31 insertions, 4 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 38593b486c1..c9623cd4347 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -109,6 +109,8 @@ Lisp_Object Vbuffer_alist;
109/* Functions to call before and after each text change. */ 109/* Functions to call before and after each text change. */
110Lisp_Object Vbefore_change_function; 110Lisp_Object Vbefore_change_function;
111Lisp_Object Vafter_change_function; 111Lisp_Object Vafter_change_function;
112Lisp_Object Vbefore_change_functions;
113Lisp_Object Vafter_change_functions;
112 114
113Lisp_Object Vtransient_mark_mode; 115Lisp_Object Vtransient_mark_mode;
114 116
@@ -2586,8 +2588,8 @@ the beginning and end of the range of old text to be changed.\n\
2586No information is given about the length of the text after the change.\n\ 2588No information is given about the length of the text after the change.\n\
2587position of the change\n\ 2589position of the change\n\
2588\n\ 2590\n\
2589While executing the `before-change-function', changes to buffers do not\n\ 2591Buffer changes made while executing the `before-change-function'\n\
2590cause calls to any `before-change-function' or `after-change-function'."); 2592don't call any before-change or after-change functions.");
2591 Vbefore_change_function = Qnil; 2593 Vbefore_change_function = Qnil;
2592 2594
2593 DEFVAR_LISP ("after-change-function", &Vafter_change_function, 2595 DEFVAR_LISP ("after-change-function", &Vafter_change_function,
@@ -2599,10 +2601,35 @@ and the length of the pre-change text replaced by that range.\n\
2599for a deletion, that length is the number of characters deleted,\n\ 2601for a deletion, that length is the number of characters deleted,\n\
2600and the post-change beginning and end are at the same place.)\n\ 2602and the post-change beginning and end are at the same place.)\n\
2601\n\ 2603\n\
2602While executing the `after-change-function', changes to buffers do not\n\ 2604Buffer changes made while executing the `after-change-function'\n\
2603cause calls to any `before-change-function' or `after-change-function'."); 2605don't call any before-change or after-change functions.");
2604 Vafter_change_function = Qnil; 2606 Vafter_change_function = Qnil;
2605 2607
2608 DEFVAR_LISP ("before-change-functions", &Vbefore_change_functions,
2609 "List of functions to call before each text change.\n\
2610Two arguments are passed to each function: the positions of\n\
2611the beginning and end of the range of old text to be changed.\n\
2612\(For an insertion, the beginning and end are at the same place.)\n\
2613No information is given about the length of the text after the change.\n\
2614position of the change\n\
2615\n\
2616Buffer changes made while executing the `before-change-functions'\n\
2617don't call any before-change or after-change functions.");
2618 Vbefore_change_functions = Qnil;
2619
2620 DEFVAR_LISP ("after-change-functions", &Vafter_change_functions,
2621 "List of function to call after each text change.\n\
2622Three arguments are passed to each function: the positions of\n\
2623the beginning and end of the range of changed text,\n\
2624and the length of the pre-change text replaced by that range.\n\
2625\(For an insertion, the pre-change length is zero;\n\
2626for a deletion, that length is the number of characters deleted,\n\
2627and the post-change beginning and end are at the same place.)\n\
2628\n\
2629Buffer changes made while executing the `after-change-functions'\n\
2630don't call any before-change or after-change functions.");
2631 Vafter_change_functions = Qnil;
2632
2606 DEFVAR_LISP ("first-change-hook", &Vfirst_change_hook, 2633 DEFVAR_LISP ("first-change-hook", &Vfirst_change_hook,
2607 "A list of functions to call before changing a buffer which is unmodified.\n\ 2634 "A list of functions to call before changing a buffer which is unmodified.\n\
2608The functions are run using the `run-hooks' function."); 2635The functions are run using the `run-hooks' function.");