changeset 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 ba6268a3dee9
children 67c608b0e2f7
files src/buffer.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/buffer.c	Sat Mar 05 03:58:45 1994 +0000
+++ b/src/buffer.c	Sat Mar 05 20:31:10 1994 +0000
@@ -753,7 +753,8 @@
       }
 
     /* Then run the hooks.  */
-    call1 (Vrun_hooks, Qkill_buffer_hook);
+    if (!NILP (Vrun_hooks))
+      call1 (Vrun_hooks, Qkill_buffer_hook);
     unbind_to (count, Qnil);
   }
 
@@ -1211,7 +1212,8 @@
   register Lisp_Object alist, sym, tem;
   Lisp_Object oalist;
 
-  call1 (Vrun_hooks, intern ("change-major-mode-hook"));
+  if (!NILP (Vrun_hooks))
+    call1 (Vrun_hooks, intern ("change-major-mode-hook"));
   oalist = current_buffer->local_var_alist;
 
   /* Make sure no local variables remain set up with this buffer