]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fkill_buffer, Fkill_all_local_variables):
authorRichard M. Stallman <rms@gnu.org>
Sat, 5 Mar 1994 20:31:10 +0000 (20:31 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 5 Mar 1994 20:31:10 +0000 (20:31 +0000)
Don't call Vrun_hooks if it is nil.

src/buffer.c

index 15ed613efd00e7332dfdae188823d6fdbd5092d8..007b095a9a80e77372256a43ea1cae056cf87872 100644 (file)
@@ -753,7 +753,8 @@ with `delete-process'.")
       }
 
     /* 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 @@ a non-nil `permanent-local' property are not eliminated by this function.")
   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