comparison src/buffer.c @ 90580:7f3f771c85fa

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 382-398) - Update from CVS - Update from erc--emacs--22 - Fix ERC bug introduced in last patch - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 123-125) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-101
author Miles Bader <miles@gnu.org>
date Wed, 16 Aug 2006 14:08:49 +0000
parents 8a8e69664178 e97bfa736263
children 6823a91487f2
comparison
equal deleted inserted replaced
90579:c78f05b8f09e 90580:7f3f771c85fa
143 143
144 /* List of functions to call that can query about killing a buffer. 144 /* List of functions to call that can query about killing a buffer.
145 If any of these functions returns nil, we don't kill it. */ 145 If any of these functions returns nil, we don't kill it. */
146 Lisp_Object Vkill_buffer_query_functions; 146 Lisp_Object Vkill_buffer_query_functions;
147 Lisp_Object Qkill_buffer_query_functions; 147 Lisp_Object Qkill_buffer_query_functions;
148
149 /* Hook run before changing a major mode. */
150 Lisp_Object Vchange_major_mode_hook, Qchange_major_mode_hook;
148 151
149 /* List of functions to call before changing an unmodified buffer. */ 152 /* List of functions to call before changing an unmodified buffer. */
150 Lisp_Object Vfirst_change_hook; 153 Lisp_Object Vfirst_change_hook;
151 154
152 Lisp_Object Qfirst_change_hook; 155 Lisp_Object Qfirst_change_hook;
2400 { 2403 {
2401 register Lisp_Object alist, sym, tem; 2404 register Lisp_Object alist, sym, tem;
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
2409 remain swapped in, in their symbols. */ 2412 remain swapped in, in their symbols. */
2410 2413
6012 6015
6013 DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions, 6016 DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions,
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.
6022 The 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);
6020 defsubr (&Sget_file_buffer); 6030 defsubr (&Sget_file_buffer);
6021 defsubr (&Sget_buffer_create); 6031 defsubr (&Sget_buffer_create);