summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-01-18 08:40:29 +0000
committerRichard M. Stallman <rms@gnu.org>1996-01-18 08:40:29 +0000
commit86a7016e8226ffc5dba57b28787de16e8d075796 (patch)
tree0863fbe252ec281fc542e5b1b33063321217bdb8
parent966af63c3e8e30cad263240031c31ec20ecf5977 (diff)
downloademacs-86a7016e8226ffc5dba57b28787de16e8d075796.tar.gz
(run_hook_with_args): Do nothing if Vrun_hooks is nil.
-rw-r--r--src/eval.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index bbdaa4fd7ee..cecf18cbfeb 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1083,6 +1083,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 +1134,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) ();
@@ -1970,6 +1982,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);