aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 6115f727deb..d26c4451d13 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -146,6 +146,9 @@ Lisp_Object Vinhibit_read_only;
146Lisp_Object Vkill_buffer_query_functions; 146Lisp_Object Vkill_buffer_query_functions;
147Lisp_Object Qkill_buffer_query_functions; 147Lisp_Object Qkill_buffer_query_functions;
148 148
149/* Hook run before changing a major mode. */
150Lisp_Object Vchange_major_mode_hook, Qchange_major_mode_hook;
151
149/* List of functions to call before changing an unmodified buffer. */ 152/* List of functions to call before changing an unmodified buffer. */
150Lisp_Object Vfirst_change_hook; 153Lisp_Object Vfirst_change_hook;
151 154
@@ -2402,7 +2405,7 @@ the normal hook `change-major-mode-hook'. */)
2402 Lisp_Object oalist; 2405 Lisp_Object oalist;
2403 2406
2404 if (!NILP (Vrun_hooks)) 2407 if (!NILP (Vrun_hooks))
2405 call1 (Vrun_hooks, intern ("change-major-mode-hook")); 2408 call1 (Vrun_hooks, Qchange_major_mode_hook);
2406 oalist = current_buffer->local_var_alist; 2409 oalist = current_buffer->local_var_alist;
2407 2410
2408 /* Make sure none of the bindings in oalist 2411 /* Make sure none of the bindings in oalist
@@ -6014,6 +6017,13 @@ t means to use hollow box cursor. See `cursor-type' for other values. */);
6014 doc: /* List of functions called with no args to query before killing a buffer. */); 6017 doc: /* List of functions called with no args to query before killing a buffer. */);
6015 Vkill_buffer_query_functions = Qnil; 6018 Vkill_buffer_query_functions = Qnil;
6016 6019
6020 DEFVAR_LISP ("change-major-mode-hook", &Vchange_major_mode_hook,
6021 doc: /* Normal hook run before changing the major mode of a buffer.
6022The function `kill-all-local-variables' runs this before doing anything else. */);
6023 Vchange_major_mode_hook = Qnil;
6024 Qchange_major_mode_hook = intern ("change-major-mode-hook");
6025 staticpro (&Qchange_major_mode_hook);
6026
6017 defsubr (&Sbuffer_live_p); 6027 defsubr (&Sbuffer_live_p);
6018 defsubr (&Sbuffer_list); 6028 defsubr (&Sbuffer_list);
6019 defsubr (&Sget_buffer); 6029 defsubr (&Sget_buffer);