]> code.delx.au - gnu-emacs/blobdiff - src/eval.c
(set-auto-mode): Run multiple mode: specs in left-to-right order.
[gnu-emacs] / src / eval.c
index bbdaa4fd7ee31a205500326a7237afb07ef0cabe..295ddc3852cea16701c666f468877c899352d05a 100644 (file)
@@ -157,6 +157,7 @@ init_eval_once ()
 {
   specpdl_size = 50;
   specpdl = (struct specbinding *) xmalloc (specpdl_size * sizeof (struct specbinding));
+  specpdl_ptr = specpdl;
   max_specpdl_size = 600;
   max_lisp_eval_depth = 200;
 
@@ -1083,6 +1084,16 @@ See also the function `signal' for more info.")
   return val;
 }
 
+/* Call the function BFUN with no arguments, catching errors within it
+   according to HANDLERS.  If there is an error, call HFUN with
+   one argument which is the data that describes the error:
+   (SIGNALNAME . DATA)
+
+   HANDLERS can be a list of conditions to catch.
+   If HANDLERS is Qt, catch all errors.
+   If HANDLERS is Qerror, catch all errors
+   but allow the debugger to run if that is enabled.  */
+
 Lisp_Object
 internal_condition_case (bfun, handlers, hfun)
      Lisp_Object (*bfun) ();
@@ -1124,6 +1135,8 @@ internal_condition_case (bfun, handlers, hfun)
   return val;
 }
 
+/* Like internal_condition_case but call HFUN with ARG as its argument.  */
+
 Lisp_Object
 internal_condition_case_1 (bfun, arg, handlers, hfun)
      Lisp_Object (*bfun) ();
@@ -1188,7 +1201,7 @@ See also the function `condition-case'.")
   if (gc_in_progress || waiting_for_input)
     abort ();
 
-#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_WINDOW_SYSTEM
   TOTALLY_UNBLOCK_INPUT;
 #endif
 
@@ -1970,6 +1983,11 @@ run_hook_with_args (nargs, args, cond)
   Lisp_Object sym, val, ret;
   struct gcpro gcpro1, gcpro2;
 
+  /* If we are dying or still initializing,
+     don't do anything--it would probably crash if we tried.  */
+  if (NILP (Vrun_hooks))
+    return;
+
   sym = args[0];
   val = find_symbol_value (sym);
   ret = (cond == until_failure ? Qt : Qnil);