comparison src/buffer.c @ 6205:88e41d7d1e27

(Fkill_buffer, Fkill_all_local_variables): Don't call Vrun_hooks if it is nil.
author Richard M. Stallman <rms@gnu.org>
date Sat, 05 Mar 1994 20:31:10 +0000
parents 16fdee72722b
children f5a437637850
comparison
equal deleted inserted replaced
6204:ba6268a3dee9 6205:88e41d7d1e27
751 if (NILP (tem)) 751 if (NILP (tem))
752 return unbind_to (count, Qnil); 752 return unbind_to (count, Qnil);
753 } 753 }
754 754
755 /* Then run the hooks. */ 755 /* Then run the hooks. */
756 call1 (Vrun_hooks, Qkill_buffer_hook); 756 if (!NILP (Vrun_hooks))
757 call1 (Vrun_hooks, Qkill_buffer_hook);
757 unbind_to (count, Qnil); 758 unbind_to (count, Qnil);
758 } 759 }
759 760
760 /* We have no more questions to ask. Verify that it is valid 761 /* We have no more questions to ask. Verify that it is valid
761 to kill the buffer. This must be done after the questions 762 to kill the buffer. This must be done after the questions
1209 () 1210 ()
1210 { 1211 {
1211 register Lisp_Object alist, sym, tem; 1212 register Lisp_Object alist, sym, tem;
1212 Lisp_Object oalist; 1213 Lisp_Object oalist;
1213 1214
1214 call1 (Vrun_hooks, intern ("change-major-mode-hook")); 1215 if (!NILP (Vrun_hooks))
1216 call1 (Vrun_hooks, intern ("change-major-mode-hook"));
1215 oalist = current_buffer->local_var_alist; 1217 oalist = current_buffer->local_var_alist;
1216 1218
1217 /* Make sure no local variables remain set up with this buffer 1219 /* Make sure no local variables remain set up with this buffer
1218 for their current values. */ 1220 for their current values. */
1219 1221