Mercurial > hg > xemacs-beta
comparison src/eval.c @ 424:11054d720c21 r21-2-20
Import from CVS: tag r21-2-20
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:26:11 +0200 |
parents | 41dbb7a9d5f2 |
children |
comparison
equal
deleted
inserted
replaced
423:28d9c139be4c | 424:11054d720c21 |
---|---|
71 /* If subrs take more than 8 arguments, more cases need to be added | 71 /* If subrs take more than 8 arguments, more cases need to be added |
72 to this switch. (But wait - don't do it - if you really need | 72 to this switch. (But wait - don't do it - if you really need |
73 a SUBR with more than 8 arguments, use max_args == MANY. | 73 a SUBR with more than 8 arguments, use max_args == MANY. |
74 See the DEFUN macro in lisp.h) */ | 74 See the DEFUN macro in lisp.h) */ |
75 #define PRIMITIVE_FUNCALL(rv, fn, av, ac) do { \ | 75 #define PRIMITIVE_FUNCALL(rv, fn, av, ac) do { \ |
76 void (*PF_fn)() = (void (*)()) (fn); \ | 76 void (*PF_fn)(void) = (void (*)(void)) fn; \ |
77 Lisp_Object *PF_av = (av); \ | 77 Lisp_Object *PF_av = (av); \ |
78 switch (ac) \ | 78 switch (ac) \ |
79 { \ | 79 { \ |
80 default: abort(); \ | 80 default: abort(); \ |
81 case 0: rv = PRIMITIVE_FUNCALL_1(PF_fn, PF_av, 0); break; \ | 81 case 0: rv = PRIMITIVE_FUNCALL_1(PF_fn, PF_av, 0); break; \ |
168 | 168 |
169 /* Maximum size allowed for specpdl allocation */ | 169 /* Maximum size allowed for specpdl allocation */ |
170 int max_specpdl_size; | 170 int max_specpdl_size; |
171 | 171 |
172 /* Depth in Lisp evaluations and function calls. */ | 172 /* Depth in Lisp evaluations and function calls. */ |
173 int lisp_eval_depth; | 173 static int lisp_eval_depth; |
174 | 174 |
175 /* Maximum allowed depth in Lisp evaluations and function calls. */ | 175 /* Maximum allowed depth in Lisp evaluations and function calls. */ |
176 int max_lisp_eval_depth; | 176 int max_lisp_eval_depth; |
177 | 177 |
178 /* Nonzero means enter debugger before next function call */ | 178 /* Nonzero means enter debugger before next function call */ |
293 write_c_string (header, printcharfun); | 293 write_c_string (header, printcharfun); |
294 write_c_string (name, printcharfun); | 294 write_c_string (name, printcharfun); |
295 write_c_string (trailer, printcharfun); | 295 write_c_string (trailer, printcharfun); |
296 } | 296 } |
297 | 297 |
298 DEFINE_LRECORD_IMPLEMENTATION ("subr", subr, | 298 static const struct lrecord_description subr_description[] = { |
299 this_one_is_unmarkable, print_subr, 0, 0, 0, 0, | 299 { XD_DOC_STRING, offsetof(Lisp_Subr, doc) }, |
300 Lisp_Subr); | 300 { XD_END } |
301 }; | |
302 | |
303 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("subr", subr, | |
304 this_one_is_unmarkable, print_subr, 0, 0, 0, | |
305 subr_description, | |
306 Lisp_Subr); | |
301 | 307 |
302 /************************************************************************/ | 308 /************************************************************************/ |
303 /* Entering the debugger */ | 309 /* Entering the debugger */ |
304 /************************************************************************/ | 310 /************************************************************************/ |
305 | 311 |
1002 /* Defining functions/variables */ | 1008 /* Defining functions/variables */ |
1003 /************************************************************************/ | 1009 /************************************************************************/ |
1004 static Lisp_Object | 1010 static Lisp_Object |
1005 define_function (Lisp_Object name, Lisp_Object defn) | 1011 define_function (Lisp_Object name, Lisp_Object defn) |
1006 { | 1012 { |
1007 if (purify_flag) | |
1008 defn = Fpurecopy (defn); | |
1009 Ffset (name, defn); | 1013 Ffset (name, defn); |
1010 LOADHIST_ATTACH (name); | 1014 LOADHIST_ATTACH (name); |
1011 return name; | 1015 return name; |
1012 } | 1016 } |
1013 | 1017 |
1076 } | 1080 } |
1077 | 1081 |
1078 if (!NILP (args = XCDR (args))) | 1082 if (!NILP (args = XCDR (args))) |
1079 { | 1083 { |
1080 Lisp_Object doc = XCAR (args); | 1084 Lisp_Object doc = XCAR (args); |
1081 #if 0 /* FSFmacs */ | |
1082 /* #### We should probably do this but it might be dangerous */ | |
1083 if (purify_flag) | |
1084 doc = Fpurecopy (doc); | |
1085 Fput (sym, Qvariable_documentation, doc); | 1085 Fput (sym, Qvariable_documentation, doc); |
1086 #else | |
1087 pure_put (sym, Qvariable_documentation, doc); | |
1088 #endif | |
1089 if (!NILP (args = XCDR (args))) | 1086 if (!NILP (args = XCDR (args))) |
1090 error ("too many arguments"); | 1087 error ("too many arguments"); |
1091 } | 1088 } |
1092 } | 1089 } |
1093 | 1090 |
1094 #ifdef I18N3 | 1091 #ifdef I18N3 |
1095 if (!NILP (Vfile_domain)) | 1092 if (!NILP (Vfile_domain)) |
1096 pure_put (sym, Qvariable_domain, Vfile_domain); | 1093 Fput (sym, Qvariable_domain, Vfile_domain); |
1097 #endif | 1094 #endif |
1098 | 1095 |
1099 LOADHIST_ATTACH (sym); | 1096 LOADHIST_ATTACH (sym); |
1100 return sym; | 1097 return sym; |
1101 } | 1098 } |
1131 UNGCPRO; | 1128 UNGCPRO; |
1132 | 1129 |
1133 if (!NILP (args = XCDR (args))) | 1130 if (!NILP (args = XCDR (args))) |
1134 { | 1131 { |
1135 Lisp_Object doc = XCAR (args); | 1132 Lisp_Object doc = XCAR (args); |
1136 #if 0 /* FSFmacs */ | |
1137 /* #### We should probably do this but it might be dangerous */ | |
1138 if (purify_flag) | |
1139 doc = Fpurecopy (doc); | |
1140 Fput (sym, Qvariable_documentation, doc); | 1133 Fput (sym, Qvariable_documentation, doc); |
1141 #else | |
1142 pure_put (sym, Qvariable_documentation, doc); | |
1143 #endif | |
1144 if (!NILP (args = XCDR (args))) | 1134 if (!NILP (args = XCDR (args))) |
1145 error ("too many arguments"); | 1135 error ("too many arguments"); |
1146 } | 1136 } |
1147 | 1137 |
1148 #ifdef I18N3 | 1138 #ifdef I18N3 |
1149 if (!NILP (Vfile_domain)) | 1139 if (!NILP (Vfile_domain)) |
1150 pure_put (sym, Qvariable_domain, Vfile_domain); | 1140 Fput (sym, Qvariable_domain, Vfile_domain); |
1151 #endif | 1141 #endif |
1152 | 1142 |
1153 LOADHIST_ATTACH (sym); | 1143 LOADHIST_ATTACH (sym); |
1154 return sym; | 1144 return sym; |
1155 } | 1145 } |
1165 Lisp_Object documentation = Fget (variable, Qvariable_documentation, Qnil); | 1155 Lisp_Object documentation = Fget (variable, Qvariable_documentation, Qnil); |
1166 | 1156 |
1167 return | 1157 return |
1168 ((INTP (documentation) && XINT (documentation) < 0) || | 1158 ((INTP (documentation) && XINT (documentation) < 0) || |
1169 | 1159 |
1170 ((STRINGP (documentation)) && | 1160 (STRINGP (documentation) && |
1171 (string_byte (XSTRING (documentation), 0) == '*')) || | 1161 (string_byte (XSTRING (documentation), 0) == '*')) || |
1172 | 1162 |
1173 /* If (STRING . INTEGER), a negative integer means a user variable. */ | 1163 /* If (STRING . INTEGER), a negative integer means a user variable. */ |
1174 (CONSP (documentation) | 1164 (CONSP (documentation) |
1175 && STRINGP (XCAR (documentation)) | 1165 && STRINGP (XCAR (documentation)) |
2631 } | 2621 } |
2632 else | 2622 else |
2633 { | 2623 { |
2634 Fsignal (Qwrong_type_argument, | 2624 Fsignal (Qwrong_type_argument, |
2635 Fcons (Qcommandp, | 2625 Fcons (Qcommandp, |
2636 ((EQ (cmd, final)) | 2626 (EQ (cmd, final) |
2637 ? list1 (cmd) | 2627 ? list1 (cmd) |
2638 : list2 (cmd, final)))); | 2628 : list2 (cmd, final)))); |
2639 return Qnil; | 2629 return Qnil; |
2640 } | 2630 } |
2641 } | 2631 } |
2748 if (purify_flag) | 2738 if (purify_flag) |
2749 { | 2739 { |
2750 /* Attempt to avoid consing identical (string=) pure strings. */ | 2740 /* Attempt to avoid consing identical (string=) pure strings. */ |
2751 file = Fsymbol_name (Fintern (file, Qnil)); | 2741 file = Fsymbol_name (Fintern (file, Qnil)); |
2752 } | 2742 } |
2753 | 2743 |
2754 return Ffset (function, | 2744 return Ffset (function, Fcons (Qautoload, list4 (file, |
2755 Fpurecopy (Fcons (Qautoload, list4 (file, | 2745 docstring, |
2756 docstring, | 2746 interactive, |
2757 interactive, | 2747 type))); |
2758 type)))); | |
2759 } | 2748 } |
2760 | 2749 |
2761 Lisp_Object | 2750 Lisp_Object |
2762 un_autoload (Lisp_Object oldqueue) | 2751 un_autoload (Lisp_Object oldqueue) |
2763 { | 2752 { |
2953 goto wrong_number_of_arguments; | 2942 goto wrong_number_of_arguments; |
2954 | 2943 |
2955 if (max_args == UNEVALLED) /* Optimize for the common case */ | 2944 if (max_args == UNEVALLED) /* Optimize for the common case */ |
2956 { | 2945 { |
2957 backtrace.evalargs = 0; | 2946 backtrace.evalargs = 0; |
2958 val = (((Lisp_Object (*) (Lisp_Object)) (subr_function (subr))) | 2947 val = (((Lisp_Object (*) (Lisp_Object)) subr_function (subr)) |
2959 (original_args)); | 2948 (original_args)); |
2960 } | 2949 } |
2961 else if (nargs <= max_args) | 2950 else if (nargs <= max_args) |
2962 { | 2951 { |
2963 struct gcpro gcpro1; | 2952 struct gcpro gcpro1; |
3007 } | 2996 } |
3008 | 2997 |
3009 backtrace.args = args; | 2998 backtrace.args = args; |
3010 backtrace.nargs = nargs; | 2999 backtrace.nargs = nargs; |
3011 | 3000 |
3012 val = (((Lisp_Object (*) (int, Lisp_Object *)) (subr_function (subr))) | 3001 val = (((Lisp_Object (*) (int, Lisp_Object *)) subr_function (subr)) |
3013 (nargs, args)); | 3002 (nargs, args)); |
3014 | 3003 |
3015 UNGCPRO; | 3004 UNGCPRO; |
3016 } | 3005 } |
3017 else | 3006 else |
3201 fun_args = spacious_args; | 3190 fun_args = spacious_args; |
3202 goto funcall_subr; | 3191 goto funcall_subr; |
3203 } | 3192 } |
3204 else if (max_args == MANY) | 3193 else if (max_args == MANY) |
3205 { | 3194 { |
3206 val = ((Lisp_Object (*) (int, Lisp_Object *)) (subr_function (subr))) | 3195 val = ((Lisp_Object (*) (int, Lisp_Object *)) subr_function (subr)) |
3207 (fun_nargs, fun_args); | 3196 (fun_nargs, fun_args); |
3208 } | 3197 } |
3209 else if (max_args == UNEVALLED) /* Can't funcall a special form */ | 3198 else if (max_args == UNEVALLED) /* Can't funcall a special form */ |
3210 { | 3199 { |
3211 goto invalid_function; | 3200 goto invalid_function; |
3625 args[0] = val; | 3614 args[0] = val; |
3626 return Ffuncall (nargs, args); | 3615 return Ffuncall (nargs, args); |
3627 } | 3616 } |
3628 else | 3617 else |
3629 { | 3618 { |
3630 struct gcpro gcpro1, gcpro2; | 3619 struct gcpro gcpro1, gcpro2, gcpro3; |
3631 GCPRO2 (sym, val); | 3620 Lisp_Object globals = Qnil; |
3621 GCPRO3 (sym, val, globals); | |
3632 | 3622 |
3633 for (; | 3623 for (; |
3634 CONSP (val) && ((cond == RUN_HOOKS_TO_COMPLETION) | 3624 CONSP (val) && ((cond == RUN_HOOKS_TO_COMPLETION) |
3635 || (cond == RUN_HOOKS_UNTIL_SUCCESS ? NILP (ret) | 3625 || (cond == RUN_HOOKS_UNTIL_SUCCESS ? NILP (ret) |
3636 : !NILP (ret))); | 3626 : !NILP (ret))); |
3638 { | 3628 { |
3639 if (EQ (XCAR (val), Qt)) | 3629 if (EQ (XCAR (val), Qt)) |
3640 { | 3630 { |
3641 /* t indicates this hook has a local binding; | 3631 /* t indicates this hook has a local binding; |
3642 it means to run the global binding too. */ | 3632 it means to run the global binding too. */ |
3643 Lisp_Object globals = Fdefault_value (sym); | 3633 globals = Fdefault_value (sym); |
3644 | 3634 |
3645 if ((! CONSP (globals) || EQ (XCAR (globals), Qlambda)) && | 3635 if ((! CONSP (globals) || EQ (XCAR (globals), Qlambda)) && |
3646 ! NILP (globals)) | 3636 ! NILP (globals)) |
3647 { | 3637 { |
3648 args[0] = globals; | 3638 args[0] = globals; |
4205 | 4195 |
4206 specbind (Qinhibit_quit, Qt); | 4196 specbind (Qinhibit_quit, Qt); |
4207 /* gc_currently_forbidden = 1; Currently no reason to do this; */ | 4197 /* gc_currently_forbidden = 1; Currently no reason to do this; */ |
4208 | 4198 |
4209 cons = noseeum_cons (buffer, form); | 4199 cons = noseeum_cons (buffer, form); |
4210 opaque = (warning_string ? make_opaque_ptr (warning_string) : Qnil); | 4200 opaque = (warning_string ? make_opaque_ptr ((void *)warning_string) : Qnil); |
4211 GCPRO2 (cons, opaque); | 4201 GCPRO2 (cons, opaque); |
4212 /* Qerror not Qt, so you can get a backtrace */ | 4202 /* Qerror not Qt, so you can get a backtrace */ |
4213 tem = condition_case_1 (Qerror, | 4203 tem = condition_case_1 (Qerror, |
4214 catch_them_squirmers_eval_in_buffer, cons, | 4204 catch_them_squirmers_eval_in_buffer, cons, |
4215 caught_a_squirmer, opaque); | 4205 caught_a_squirmer, opaque); |
4216 free_cons (XCONS (cons)); | 4206 free_cons (XCONS (cons)); |
4217 if (OPAQUEP (opaque)) | 4207 if (OPAQUE_PTRP (opaque)) |
4218 free_opaque_ptr (opaque); | 4208 free_opaque_ptr (opaque); |
4219 UNGCPRO; | 4209 UNGCPRO; |
4220 | 4210 |
4221 /* gc_currently_forbidden = 0; */ | 4211 /* gc_currently_forbidden = 0; */ |
4222 return unbind_to (speccount, tem); | 4212 return unbind_to (speccount, tem); |
4245 return Qnil; | 4235 return Qnil; |
4246 | 4236 |
4247 speccount = specpdl_depth(); | 4237 speccount = specpdl_depth(); |
4248 specbind (Qinhibit_quit, Qt); | 4238 specbind (Qinhibit_quit, Qt); |
4249 | 4239 |
4250 opaque = (warning_string ? make_opaque_ptr (warning_string) : Qnil); | 4240 opaque = (warning_string ? make_opaque_ptr ((void *)warning_string) : Qnil); |
4251 GCPRO1 (opaque); | 4241 GCPRO1 (opaque); |
4252 /* Qerror not Qt, so you can get a backtrace */ | 4242 /* Qerror not Qt, so you can get a backtrace */ |
4253 tem = condition_case_1 (Qerror, | 4243 tem = condition_case_1 (Qerror, |
4254 catch_them_squirmers_run_hook, hook_symbol, | 4244 catch_them_squirmers_run_hook, hook_symbol, |
4255 caught_a_squirmer, opaque); | 4245 caught_a_squirmer, opaque); |
4256 if (OPAQUEP (opaque)) | 4246 if (OPAQUE_PTRP (opaque)) |
4257 free_opaque_ptr (opaque); | 4247 free_opaque_ptr (opaque); |
4258 UNGCPRO; | 4248 UNGCPRO; |
4259 | 4249 |
4260 return unbind_to (speccount, tem); | 4250 return unbind_to (speccount, tem); |
4261 } | 4251 } |
4281 | 4271 |
4282 if (!allow_quit) | 4272 if (!allow_quit) |
4283 specbind (Qinhibit_quit, Qt); | 4273 specbind (Qinhibit_quit, Qt); |
4284 | 4274 |
4285 cons = noseeum_cons (hook_symbol, | 4275 cons = noseeum_cons (hook_symbol, |
4286 warning_string ? make_opaque_ptr (warning_string) | 4276 warning_string ? make_opaque_ptr ((void *)warning_string) |
4287 : Qnil); | 4277 : Qnil); |
4288 GCPRO1 (cons); | 4278 GCPRO1 (cons); |
4289 /* Qerror not Qt, so you can get a backtrace */ | 4279 /* Qerror not Qt, so you can get a backtrace */ |
4290 tem = condition_case_1 (Qerror, | 4280 tem = condition_case_1 (Qerror, |
4291 catch_them_squirmers_run_hook, | 4281 catch_them_squirmers_run_hook, |
4292 hook_symbol, | 4282 hook_symbol, |
4293 allow_quit ? | 4283 allow_quit ? |
4294 allow_quit_safe_run_hook_caught_a_squirmer : | 4284 allow_quit_safe_run_hook_caught_a_squirmer : |
4295 safe_run_hook_caught_a_squirmer, | 4285 safe_run_hook_caught_a_squirmer, |
4296 cons); | 4286 cons); |
4297 if (OPAQUEP (XCDR (cons))) | 4287 if (OPAQUE_PTRP (XCDR (cons))) |
4298 free_opaque_ptr (XCDR (cons)); | 4288 free_opaque_ptr (XCDR (cons)); |
4299 free_cons (XCONS (cons)); | 4289 free_cons (XCONS (cons)); |
4300 UNGCPRO; | 4290 UNGCPRO; |
4301 | 4291 |
4302 return unbind_to (speccount, tem); | 4292 return unbind_to (speccount, tem); |
4327 GCPRO2 (opaque, function); | 4317 GCPRO2 (opaque, function); |
4328 speccount = specpdl_depth(); | 4318 speccount = specpdl_depth(); |
4329 specbind (Qinhibit_quit, Qt); | 4319 specbind (Qinhibit_quit, Qt); |
4330 /* gc_currently_forbidden = 1; Currently no reason to do this; */ | 4320 /* gc_currently_forbidden = 1; Currently no reason to do this; */ |
4331 | 4321 |
4332 opaque = (warning_string ? make_opaque_ptr (warning_string) : Qnil); | 4322 opaque = (warning_string ? make_opaque_ptr ((void *)warning_string) : Qnil); |
4333 /* Qerror not Qt, so you can get a backtrace */ | 4323 /* Qerror not Qt, so you can get a backtrace */ |
4334 tem = condition_case_1 (Qerror, | 4324 tem = condition_case_1 (Qerror, |
4335 catch_them_squirmers_call0, function, | 4325 catch_them_squirmers_call0, function, |
4336 caught_a_squirmer, opaque); | 4326 caught_a_squirmer, opaque); |
4337 if (OPAQUEP (opaque)) | 4327 if (OPAQUE_PTRP (opaque)) |
4338 free_opaque_ptr (opaque); | 4328 free_opaque_ptr (opaque); |
4339 UNGCPRO; | 4329 UNGCPRO; |
4340 | 4330 |
4341 /* gc_currently_forbidden = 0; */ | 4331 /* gc_currently_forbidden = 0; */ |
4342 return unbind_to (speccount, tem); | 4332 return unbind_to (speccount, tem); |
4377 | 4367 |
4378 specbind (Qinhibit_quit, Qt); | 4368 specbind (Qinhibit_quit, Qt); |
4379 /* gc_currently_forbidden = 1; Currently no reason to do this; */ | 4369 /* gc_currently_forbidden = 1; Currently no reason to do this; */ |
4380 | 4370 |
4381 cons = noseeum_cons (function, object); | 4371 cons = noseeum_cons (function, object); |
4382 opaque = (warning_string ? make_opaque_ptr (warning_string) : Qnil); | 4372 opaque = (warning_string ? make_opaque_ptr ((void *)warning_string) : Qnil); |
4383 /* Qerror not Qt, so you can get a backtrace */ | 4373 /* Qerror not Qt, so you can get a backtrace */ |
4384 tem = condition_case_1 (Qerror, | 4374 tem = condition_case_1 (Qerror, |
4385 catch_them_squirmers_call1, cons, | 4375 catch_them_squirmers_call1, cons, |
4386 caught_a_squirmer, opaque); | 4376 caught_a_squirmer, opaque); |
4387 if (OPAQUEP (opaque)) | 4377 if (OPAQUE_PTRP (opaque)) |
4388 free_opaque_ptr (opaque); | 4378 free_opaque_ptr (opaque); |
4389 free_cons (XCONS (cons)); | 4379 free_cons (XCONS (cons)); |
4390 UNGCPRO; | 4380 UNGCPRO; |
4391 | 4381 |
4392 /* gc_currently_forbidden = 0; */ | 4382 /* gc_currently_forbidden = 0; */ |
4413 GCPRO5 (cons, opaque, function, object1, object2); | 4403 GCPRO5 (cons, opaque, function, object1, object2); |
4414 specbind (Qinhibit_quit, Qt); | 4404 specbind (Qinhibit_quit, Qt); |
4415 /* gc_currently_forbidden = 1; Currently no reason to do this; */ | 4405 /* gc_currently_forbidden = 1; Currently no reason to do this; */ |
4416 | 4406 |
4417 cons = list3 (function, object1, object2); | 4407 cons = list3 (function, object1, object2); |
4418 opaque = (warning_string ? make_opaque_ptr (warning_string) : Qnil); | 4408 opaque = (warning_string ? make_opaque_ptr ((void *)warning_string) : Qnil); |
4419 /* Qerror not Qt, so you can get a backtrace */ | 4409 /* Qerror not Qt, so you can get a backtrace */ |
4420 tem = condition_case_1 (Qerror, | 4410 tem = condition_case_1 (Qerror, |
4421 catch_them_squirmers_call2, cons, | 4411 catch_them_squirmers_call2, cons, |
4422 caught_a_squirmer, opaque); | 4412 caught_a_squirmer, opaque); |
4423 if (OPAQUEP (opaque)) | 4413 if (OPAQUE_PTRP (opaque)) |
4424 free_opaque_ptr (opaque); | 4414 free_opaque_ptr (opaque); |
4425 free_list (cons); | 4415 free_list (cons); |
4426 UNGCPRO; | 4416 UNGCPRO; |
4427 | 4417 |
4428 /* gc_currently_forbidden = 0; */ | 4418 /* gc_currently_forbidden = 0; */ |
5051 lisp_eval_depth = 0; | 5041 lisp_eval_depth = 0; |
5052 entering_debugger = 0; | 5042 entering_debugger = 0; |
5053 } | 5043 } |
5054 | 5044 |
5055 void | 5045 void |
5046 reinit_vars_of_eval (void) | |
5047 { | |
5048 preparing_for_armageddon = 0; | |
5049 in_warnings = 0; | |
5050 Qunbound_suspended_errors_tag = make_opaque_ptr (&Qunbound_suspended_errors_tag); | |
5051 staticpro_nodump (&Qunbound_suspended_errors_tag); | |
5052 | |
5053 specpdl_size = 50; | |
5054 specpdl = xnew_array (struct specbinding, specpdl_size); | |
5055 /* XEmacs change: increase these values. */ | |
5056 max_specpdl_size = 3000; | |
5057 max_lisp_eval_depth = 500; | |
5058 #if 0 /* no longer used */ | |
5059 throw_level = 0; | |
5060 #endif | |
5061 } | |
5062 | |
5063 void | |
5056 vars_of_eval (void) | 5064 vars_of_eval (void) |
5057 { | 5065 { |
5066 reinit_vars_of_eval (); | |
5067 | |
5058 DEFVAR_INT ("max-specpdl-size", &max_specpdl_size /* | 5068 DEFVAR_INT ("max-specpdl-size", &max_specpdl_size /* |
5059 Limit on number of Lisp variable bindings & unwind-protects before error. | 5069 Limit on number of Lisp variable bindings & unwind-protects before error. |
5060 */ ); | 5070 */ ); |
5061 | 5071 |
5062 DEFVAR_INT ("max-lisp-eval-depth", &max_lisp_eval_depth /* | 5072 DEFVAR_INT ("max-lisp-eval-depth", &max_lisp_eval_depth /* |
5154 If due to `apply' or `funcall' entry, one arg, `lambda'. | 5164 If due to `apply' or `funcall' entry, one arg, `lambda'. |
5155 If due to `eval' entry, one arg, t. | 5165 If due to `eval' entry, one arg, t. |
5156 */ ); | 5166 */ ); |
5157 Vdebugger = Qnil; | 5167 Vdebugger = Qnil; |
5158 | 5168 |
5159 preparing_for_armageddon = 0; | |
5160 | |
5161 staticpro (&Vpending_warnings); | 5169 staticpro (&Vpending_warnings); |
5162 Vpending_warnings = Qnil; | 5170 Vpending_warnings = Qnil; |
5163 Vpending_warnings_tail = Qnil; /* no need to protect this */ | 5171 pdump_wire (&Vpending_warnings_tail); |
5164 | 5172 Vpending_warnings_tail = Qnil; |
5165 in_warnings = 0; | |
5166 | 5173 |
5167 staticpro (&Vautoload_queue); | 5174 staticpro (&Vautoload_queue); |
5168 Vautoload_queue = Qnil; | 5175 Vautoload_queue = Qnil; |
5169 | 5176 |
5170 staticpro (&Vcondition_handlers); | 5177 staticpro (&Vcondition_handlers); |
5173 Vcurrent_warning_class = Qnil; | 5180 Vcurrent_warning_class = Qnil; |
5174 | 5181 |
5175 staticpro (&Vcurrent_error_state); | 5182 staticpro (&Vcurrent_error_state); |
5176 Vcurrent_error_state = Qnil; /* errors as normal */ | 5183 Vcurrent_error_state = Qnil; /* errors as normal */ |
5177 | 5184 |
5178 Qunbound_suspended_errors_tag = make_opaque_long (0); | |
5179 staticpro (&Qunbound_suspended_errors_tag); | |
5180 | |
5181 specpdl_size = 50; | |
5182 specpdl_depth_counter = 0; | |
5183 specpdl = xnew_array (struct specbinding, specpdl_size); | |
5184 /* XEmacs change: increase these values. */ | |
5185 max_specpdl_size = 3000; | |
5186 max_lisp_eval_depth = 500; | |
5187 #if 0 /* no longer used */ | |
5188 throw_level = 0; | |
5189 #endif | |
5190 | |
5191 reinit_eval (); | 5185 reinit_eval (); |
5192 } | 5186 } |