diff options
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/src/buffer.c b/src/buffer.c index 36e842e84b0..d6c7f6db068 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -113,36 +113,16 @@ static void reset_buffer_local_variables (struct buffer *b, int permanent_too); | |||
| 113 | to prevent lossage due to user rplac'ing this alist or its elements. */ | 113 | to prevent lossage due to user rplac'ing this alist or its elements. */ |
| 114 | Lisp_Object Vbuffer_alist; | 114 | Lisp_Object Vbuffer_alist; |
| 115 | 115 | ||
| 116 | /* Functions to call before and after each text change. */ | ||
| 117 | Lisp_Object Vbefore_change_functions; | ||
| 118 | Lisp_Object Vafter_change_functions; | ||
| 119 | |||
| 120 | Lisp_Object Vtransient_mark_mode; | ||
| 121 | |||
| 122 | /* t means ignore all read-only text properties. | ||
| 123 | A list means ignore such a property if its value is a member of the list. | ||
| 124 | Any non-nil value means ignore buffer-read-only. */ | ||
| 125 | Lisp_Object Vinhibit_read_only; | ||
| 126 | |||
| 127 | /* List of functions to call that can query about killing a buffer. | ||
| 128 | If any of these functions returns nil, we don't kill it. */ | ||
| 129 | Lisp_Object Vkill_buffer_query_functions; | ||
| 130 | Lisp_Object Qkill_buffer_query_functions; | 116 | Lisp_Object Qkill_buffer_query_functions; |
| 131 | 117 | ||
| 132 | /* Hook run before changing a major mode. */ | 118 | /* Hook run before changing a major mode. */ |
| 133 | Lisp_Object Vchange_major_mode_hook, Qchange_major_mode_hook; | 119 | Lisp_Object Qchange_major_mode_hook; |
| 134 | |||
| 135 | /* List of functions to call before changing an unmodified buffer. */ | ||
| 136 | Lisp_Object Vfirst_change_hook; | ||
| 137 | 120 | ||
| 138 | Lisp_Object Qfirst_change_hook; | 121 | Lisp_Object Qfirst_change_hook; |
| 139 | Lisp_Object Qbefore_change_functions; | 122 | Lisp_Object Qbefore_change_functions; |
| 140 | Lisp_Object Qafter_change_functions; | 123 | Lisp_Object Qafter_change_functions; |
| 141 | Lisp_Object Qucs_set_table_for_input; | 124 | Lisp_Object Qucs_set_table_for_input; |
| 142 | 125 | ||
| 143 | /* If nonzero, all modification hooks are suppressed. */ | ||
| 144 | int inhibit_modification_hooks; | ||
| 145 | |||
| 146 | Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; | 126 | Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; |
| 147 | Lisp_Object Qpermanent_local_hook; | 127 | Lisp_Object Qpermanent_local_hook; |
| 148 | 128 | ||
| @@ -5943,7 +5923,7 @@ between 0.0 and 1.0, inclusive. */); | |||
| 5943 | "Don't ask."); | 5923 | "Don't ask."); |
| 5944 | */ | 5924 | */ |
| 5945 | 5925 | ||
| 5946 | DEFVAR_LISP ("before-change-functions", &Vbefore_change_functions, | 5926 | DEFVAR_LISP ("before-change-functions", Vbefore_change_functions, |
| 5947 | doc: /* List of functions to call before each text change. | 5927 | doc: /* List of functions to call before each text change. |
| 5948 | Two arguments are passed to each function: the positions of | 5928 | Two arguments are passed to each function: the positions of |
| 5949 | the beginning and end of the range of old text to be changed. | 5929 | the beginning and end of the range of old text to be changed. |
| @@ -5959,7 +5939,7 @@ the variable's value remains nil. That prevents the error | |||
| 5959 | from happening repeatedly and making Emacs nonfunctional. */); | 5939 | from happening repeatedly and making Emacs nonfunctional. */); |
| 5960 | Vbefore_change_functions = Qnil; | 5940 | Vbefore_change_functions = Qnil; |
| 5961 | 5941 | ||
| 5962 | DEFVAR_LISP ("after-change-functions", &Vafter_change_functions, | 5942 | DEFVAR_LISP ("after-change-functions", Vafter_change_functions, |
| 5963 | doc: /* List of functions to call after each text change. | 5943 | doc: /* List of functions to call after each text change. |
| 5964 | Three arguments are passed to each function: the positions of | 5944 | Three arguments are passed to each function: the positions of |
| 5965 | the beginning and end of the range of changed text, | 5945 | the beginning and end of the range of changed text, |
| @@ -5977,7 +5957,7 @@ the variable's value remains nil. That prevents the error | |||
| 5977 | from happening repeatedly and making Emacs nonfunctional. */); | 5957 | from happening repeatedly and making Emacs nonfunctional. */); |
| 5978 | Vafter_change_functions = Qnil; | 5958 | Vafter_change_functions = Qnil; |
| 5979 | 5959 | ||
| 5980 | DEFVAR_LISP ("first-change-hook", &Vfirst_change_hook, | 5960 | DEFVAR_LISP ("first-change-hook", Vfirst_change_hook, |
| 5981 | doc: /* A list of functions to call before changing a buffer which is unmodified. | 5961 | doc: /* A list of functions to call before changing a buffer which is unmodified. |
| 5982 | The functions are run using the `run-hooks' function. */); | 5962 | The functions are run using the `run-hooks' function. */); |
| 5983 | Vfirst_change_hook = Qnil; | 5963 | Vfirst_change_hook = Qnil; |
| @@ -6092,7 +6072,7 @@ The function `set-window-buffer' updates this variable | |||
| 6092 | to the value obtained by calling `current-time'. | 6072 | to the value obtained by calling `current-time'. |
| 6093 | If the buffer has never been shown in a window, the value is nil. */); | 6073 | If the buffer has never been shown in a window, the value is nil. */); |
| 6094 | 6074 | ||
| 6095 | DEFVAR_LISP ("transient-mark-mode", &Vtransient_mark_mode, | 6075 | DEFVAR_LISP ("transient-mark-mode", Vtransient_mark_mode, |
| 6096 | doc: /* Non-nil if Transient Mark mode is enabled. | 6076 | doc: /* Non-nil if Transient Mark mode is enabled. |
| 6097 | See the command `transient-mark-mode' for a description of this minor mode. | 6077 | See the command `transient-mark-mode' for a description of this minor mode. |
| 6098 | 6078 | ||
| @@ -6113,7 +6093,7 @@ Lisp programs may give this variable certain special values: | |||
| 6113 | `transient-mark-mode' is set to OLDVAL. */); | 6093 | `transient-mark-mode' is set to OLDVAL. */); |
| 6114 | Vtransient_mark_mode = Qnil; | 6094 | Vtransient_mark_mode = Qnil; |
| 6115 | 6095 | ||
| 6116 | DEFVAR_LISP ("inhibit-read-only", &Vinhibit_read_only, | 6096 | DEFVAR_LISP ("inhibit-read-only", Vinhibit_read_only, |
| 6117 | doc: /* *Non-nil means disregard read-only status of buffers or characters. | 6097 | doc: /* *Non-nil means disregard read-only status of buffers or characters. |
| 6118 | If the value is t, disregard `buffer-read-only' and all `read-only' | 6098 | If the value is t, disregard `buffer-read-only' and all `read-only' |
| 6119 | text properties. If the value is a list, disregard `buffer-read-only' | 6099 | text properties. If the value is a list, disregard `buffer-read-only' |
| @@ -6156,13 +6136,13 @@ If t, displays a cursor related to the usual cursor type | |||
| 6156 | You can also specify the cursor type as in the `cursor-type' variable. | 6136 | You can also specify the cursor type as in the `cursor-type' variable. |
| 6157 | Use Custom to set this variable and update the display." */); | 6137 | Use Custom to set this variable and update the display." */); |
| 6158 | 6138 | ||
| 6159 | DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions, | 6139 | DEFVAR_LISP ("kill-buffer-query-functions", Vkill_buffer_query_functions, |
| 6160 | doc: /* List of functions called with no args to query before killing a buffer. | 6140 | doc: /* List of functions called with no args to query before killing a buffer. |
| 6161 | The buffer being killed will be current while the functions are running. | 6141 | The buffer being killed will be current while the functions are running. |
| 6162 | If any of them returns nil, the buffer is not killed. */); | 6142 | If any of them returns nil, the buffer is not killed. */); |
| 6163 | Vkill_buffer_query_functions = Qnil; | 6143 | Vkill_buffer_query_functions = Qnil; |
| 6164 | 6144 | ||
| 6165 | DEFVAR_LISP ("change-major-mode-hook", &Vchange_major_mode_hook, | 6145 | DEFVAR_LISP ("change-major-mode-hook", Vchange_major_mode_hook, |
| 6166 | doc: /* Normal hook run before changing the major mode of a buffer. | 6146 | doc: /* Normal hook run before changing the major mode of a buffer. |
| 6167 | The function `kill-all-local-variables' runs this before doing anything else. */); | 6147 | The function `kill-all-local-variables' runs this before doing anything else. */); |
| 6168 | Vchange_major_mode_hook = Qnil; | 6148 | Vchange_major_mode_hook = Qnil; |