Mercurial > emacs
comparison src/buffer.c @ 6785:121f2c5eba5e
(Vafter_change_functions, Vbefore_change_functions): New variables.
(syms_of_buffer): Set up Lisp vars.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Sun, 10 Apr 1994 02:33:16 +0000 |
| parents | 28e36f59e856 |
| children | 6915bf781a38 |
comparison
equal
deleted
inserted
replaced
| 6784:d41c216ccd27 | 6785:121f2c5eba5e |
|---|---|
| 107 Lisp_Object Vbuffer_alist; | 107 Lisp_Object Vbuffer_alist; |
| 108 | 108 |
| 109 /* Functions to call before and after each text change. */ | 109 /* Functions to call before and after each text change. */ |
| 110 Lisp_Object Vbefore_change_function; | 110 Lisp_Object Vbefore_change_function; |
| 111 Lisp_Object Vafter_change_function; | 111 Lisp_Object Vafter_change_function; |
| 112 Lisp_Object Vbefore_change_functions; | |
| 113 Lisp_Object Vafter_change_functions; | |
| 112 | 114 |
| 113 Lisp_Object Vtransient_mark_mode; | 115 Lisp_Object Vtransient_mark_mode; |
| 114 | 116 |
| 115 /* t means ignore all read-only text properties. | 117 /* t means ignore all read-only text properties. |
| 116 A list means ignore such a property if its value is a member of the list. | 118 A list means ignore such a property if its value is a member of the list. |
| 2584 the beginning and end of the range of old text to be changed.\n\ | 2586 the beginning and end of the range of old text to be changed.\n\ |
| 2585 \(For an insertion, the beginning and end are at the same place.)\n\ | 2587 \(For an insertion, the beginning and end are at the same place.)\n\ |
| 2586 No information is given about the length of the text after the change.\n\ | 2588 No information is given about the length of the text after the change.\n\ |
| 2587 position of the change\n\ | 2589 position of the change\n\ |
| 2588 \n\ | 2590 \n\ |
| 2589 While executing the `before-change-function', changes to buffers do not\n\ | 2591 Buffer changes made while executing the `before-change-function'\n\ |
| 2590 cause calls to any `before-change-function' or `after-change-function'."); | 2592 don'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, |
| 2594 "Function to call after each text change.\n\ | 2596 "Function to call after each text change.\n\ |
| 2595 Three arguments are passed to the function: the positions of\n\ | 2597 Three arguments are passed to the function: the positions of\n\ |
| 2597 and the length of the pre-change text replaced by that range.\n\ | 2599 and the length of the pre-change text replaced by that range.\n\ |
| 2598 \(For an insertion, the pre-change length is zero;\n\ | 2600 \(For an insertion, the pre-change length is zero;\n\ |
| 2599 for a deletion, that length is the number of characters deleted,\n\ | 2601 for a deletion, that length is the number of characters deleted,\n\ |
| 2600 and the post-change beginning and end are at the same place.)\n\ | 2602 and the post-change beginning and end are at the same place.)\n\ |
| 2601 \n\ | 2603 \n\ |
| 2602 While executing the `after-change-function', changes to buffers do not\n\ | 2604 Buffer changes made while executing the `after-change-function'\n\ |
| 2603 cause calls to any `before-change-function' or `after-change-function'."); | 2605 don't call any before-change or after-change functions."); |
| 2604 Vafter_change_function = Qnil; | 2606 Vafter_change_function = Qnil; |
| 2607 | |
| 2608 DEFVAR_LISP ("before-change-functions", &Vbefore_change_functions, | |
| 2609 "List of functions to call before each text change.\n\ | |
| 2610 Two arguments are passed to each function: the positions of\n\ | |
| 2611 the 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\ | |
| 2613 No information is given about the length of the text after the change.\n\ | |
| 2614 position of the change\n\ | |
| 2615 \n\ | |
| 2616 Buffer changes made while executing the `before-change-functions'\n\ | |
| 2617 don'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\ | |
| 2622 Three arguments are passed to each function: the positions of\n\ | |
| 2623 the beginning and end of the range of changed text,\n\ | |
| 2624 and the length of the pre-change text replaced by that range.\n\ | |
| 2625 \(For an insertion, the pre-change length is zero;\n\ | |
| 2626 for a deletion, that length is the number of characters deleted,\n\ | |
| 2627 and the post-change beginning and end are at the same place.)\n\ | |
| 2628 \n\ | |
| 2629 Buffer changes made while executing the `after-change-functions'\n\ | |
| 2630 don't call any before-change or after-change functions."); | |
| 2631 Vafter_change_functions = Qnil; | |
| 2605 | 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\ |
| 2608 The functions are run using the `run-hooks' function."); | 2635 The functions are run using the `run-hooks' function."); |
| 2609 Vfirst_change_hook = Qnil; | 2636 Vfirst_change_hook = Qnil; |
