aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1996-01-18 08:40:29 +0000
committerRichard M. Stallman1996-01-18 08:40:29 +0000
commitf029ca5f4a63013dba5c34d775ecf7f3c7dc474f (patch)
tree8a0a14e5b51c2af5052eeb158384dec2b0b3f0cc /src
parent61eaa91248ae6f832eb465e98454bedb451caf56 (diff)
downloademacs-f029ca5f4a63013dba5c34d775ecf7f3c7dc474f.tar.gz
emacs-f029ca5f4a63013dba5c34d775ecf7f3c7dc474f.zip
(run_hook_with_args): Do nothing if Vrun_hooks is nil.
Diffstat (limited to 'src')
-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.")
1083 return val; 1083 return val;
1084} 1084}
1085 1085
1086/* Call the function BFUN with no arguments, catching errors within it
1087 according to HANDLERS. If there is an error, call HFUN with
1088 one argument which is the data that describes the error:
1089 (SIGNALNAME . DATA)
1090
1091 HANDLERS can be a list of conditions to catch.
1092 If HANDLERS is Qt, catch all errors.
1093 If HANDLERS is Qerror, catch all errors
1094 but allow the debugger to run if that is enabled. */
1095
1086Lisp_Object 1096Lisp_Object
1087internal_condition_case (bfun, handlers, hfun) 1097internal_condition_case (bfun, handlers, hfun)
1088 Lisp_Object (*bfun) (); 1098 Lisp_Object (*bfun) ();
@@ -1124,6 +1134,8 @@ internal_condition_case (bfun, handlers, hfun)
1124 return val; 1134 return val;
1125} 1135}
1126 1136
1137/* Like internal_condition_case but call HFUN with ARG as its argument. */
1138
1127Lisp_Object 1139Lisp_Object
1128internal_condition_case_1 (bfun, arg, handlers, hfun) 1140internal_condition_case_1 (bfun, arg, handlers, hfun)
1129 Lisp_Object (*bfun) (); 1141 Lisp_Object (*bfun) ();
@@ -1970,6 +1982,11 @@ run_hook_with_args (nargs, args, cond)
1970 Lisp_Object sym, val, ret; 1982 Lisp_Object sym, val, ret;
1971 struct gcpro gcpro1, gcpro2; 1983 struct gcpro gcpro1, gcpro2;
1972 1984
1985 /* If we are dying or still initializing,
1986 don't do anything--it would probably crash if we tried. */
1987 if (NILP (Vrun_hooks))
1988 return;
1989
1973 sym = args[0]; 1990 sym = args[0];
1974 val = find_symbol_value (sym); 1991 val = find_symbol_value (sym);
1975 ret = (cond == until_failure ? Qt : Qnil); 1992 ret = (cond == until_failure ? Qt : Qnil);