Mercurial > emacs
comparison src/eval.c @ 41114:242c6928accc
(max_specpdl_size, max_lisp_eval_depth): Use EMACS_INT.
(funcall_lambda, run_hook_with_args): Make static and add prototype.
(ml_apply, find_handler_clause): Add prototype.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 16 Nov 2001 11:43:41 +0000 |
parents | 2823497a0206 |
children | b28d5d866500 |
comparison
equal
deleted
inserted
replaced
41113:7a17adb38c88 | 41114:242c6928accc |
---|---|
118 | 118 |
119 struct specbinding *specpdl_ptr; | 119 struct specbinding *specpdl_ptr; |
120 | 120 |
121 /* Maximum size allowed for specpdl allocation */ | 121 /* Maximum size allowed for specpdl allocation */ |
122 | 122 |
123 int max_specpdl_size; | 123 EMACS_INT max_specpdl_size; |
124 | 124 |
125 /* Depth in Lisp evaluations and function calls. */ | 125 /* Depth in Lisp evaluations and function calls. */ |
126 | 126 |
127 int lisp_eval_depth; | 127 int lisp_eval_depth; |
128 | 128 |
129 /* Maximum allowed depth in Lisp evaluations and function calls. */ | 129 /* Maximum allowed depth in Lisp evaluations and function calls. */ |
130 | 130 |
131 int max_lisp_eval_depth; | 131 EMACS_INT max_lisp_eval_depth; |
132 | 132 |
133 /* Nonzero means enter debugger before next function call */ | 133 /* Nonzero means enter debugger before next function call */ |
134 | 134 |
135 int debug_on_next_call; | 135 int debug_on_next_call; |
136 | 136 |
188 make sure the Lisp interpreter isn't called from a signal handler, | 188 make sure the Lisp interpreter isn't called from a signal handler, |
189 which is unsafe because the interpreter isn't reentrant. */ | 189 which is unsafe because the interpreter isn't reentrant. */ |
190 | 190 |
191 int handling_signal; | 191 int handling_signal; |
192 | 192 |
193 void specbind (), record_unwind_protect (); | 193 static Lisp_Object funcall_lambda P_ ((Lisp_Object, int, Lisp_Object*)); |
194 | 194 /* Apply a mocklisp function to unevaluated argument list. */ |
195 Lisp_Object run_hook_with_args (); | 195 extern Lisp_Object ml_apply P_ ((Lisp_Object, Lisp_Object)); |
196 | |
197 Lisp_Object funcall_lambda (); | |
198 extern Lisp_Object ml_apply (); /* Apply a mocklisp function to unevaluated argument list */ | |
199 | 196 |
200 void | 197 void |
201 init_eval_once () | 198 init_eval_once () |
202 { | 199 { |
203 specpdl_size = 50; | 200 specpdl_size = 50; |
1402 handlerlist = h.next; | 1399 handlerlist = h.next; |
1403 return val; | 1400 return val; |
1404 } | 1401 } |
1405 | 1402 |
1406 | 1403 |
1407 static Lisp_Object find_handler_clause (); | 1404 static Lisp_Object find_handler_clause P_ ((Lisp_Object, Lisp_Object, |
1405 Lisp_Object, Lisp_Object, | |
1406 Lisp_Object *)); | |
1408 | 1407 |
1409 DEFUN ("signal", Fsignal, Ssignal, 2, 2, 0, | 1408 DEFUN ("signal", Fsignal, Ssignal, 2, 2, 0, |
1410 doc: /* Signal an error. Args are ERROR-SYMBOL and associated DATA. | 1409 doc: /* Signal an error. Args are ERROR-SYMBOL and associated DATA. |
1411 This function does not return. | 1410 This function does not return. |
1412 | 1411 |
2222 } | 2221 } |
2223 | 2222 |
2224 /* Run hook variables in various ways. */ | 2223 /* Run hook variables in various ways. */ |
2225 | 2224 |
2226 enum run_hooks_condition {to_completion, until_success, until_failure}; | 2225 enum run_hooks_condition {to_completion, until_success, until_failure}; |
2226 static Lisp_Object run_hook_with_args P_ ((int, Lisp_Object *, | |
2227 enum run_hooks_condition)); | |
2227 | 2228 |
2228 DEFUN ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0, | 2229 DEFUN ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0, |
2229 doc: /* Run each hook in HOOKS. Major mode functions use this. | 2230 doc: /* Run each hook in HOOKS. Major mode functions use this. |
2230 Each argument should be a symbol, a hook variable. | 2231 Each argument should be a symbol, a hook variable. |
2231 These symbols are processed in the order specified. | 2232 These symbols are processed in the order specified. |
2319 COND specifies a condition to test after each call | 2320 COND specifies a condition to test after each call |
2320 to decide whether to stop. | 2321 to decide whether to stop. |
2321 The caller (or its caller, etc) must gcpro all of ARGS, | 2322 The caller (or its caller, etc) must gcpro all of ARGS, |
2322 except that it isn't necessary to gcpro ARGS[0]. */ | 2323 except that it isn't necessary to gcpro ARGS[0]. */ |
2323 | 2324 |
2324 Lisp_Object | 2325 static Lisp_Object |
2325 run_hook_with_args (nargs, args, cond) | 2326 run_hook_with_args (nargs, args, cond) |
2326 int nargs; | 2327 int nargs; |
2327 Lisp_Object *args; | 2328 Lisp_Object *args; |
2328 enum run_hooks_condition cond; | 2329 enum run_hooks_condition cond; |
2329 { | 2330 { |
2832 | 2833 |
2833 /* Apply a Lisp function FUN to the NARGS evaluated arguments in ARG_VECTOR | 2834 /* Apply a Lisp function FUN to the NARGS evaluated arguments in ARG_VECTOR |
2834 and return the result of evaluation. | 2835 and return the result of evaluation. |
2835 FUN must be either a lambda-expression or a compiled-code object. */ | 2836 FUN must be either a lambda-expression or a compiled-code object. */ |
2836 | 2837 |
2837 Lisp_Object | 2838 static Lisp_Object |
2838 funcall_lambda (fun, nargs, arg_vector) | 2839 funcall_lambda (fun, nargs, arg_vector) |
2839 Lisp_Object fun; | 2840 Lisp_Object fun; |
2840 int nargs; | 2841 int nargs; |
2841 register Lisp_Object *arg_vector; | 2842 register Lisp_Object *arg_vector; |
2842 { | 2843 { |