aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c43
1 files changed, 26 insertions, 17 deletions
diff --git a/src/eval.c b/src/eval.c
index 0f9e012b823..c068f5f3fbf 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -56,9 +56,24 @@ struct backtrace
56 char debug_on_exit : 1; 56 char debug_on_exit : 1;
57}; 57};
58 58
59struct backtrace *backtrace_list; 59static struct backtrace *backtrace_list;
60
61#if !BYTE_MARK_STACK
62static
63#endif
60struct catchtag *catchlist; 64struct catchtag *catchlist;
61 65
66/* Chain of condition handlers currently in effect.
67 The elements of this chain are contained in the stack frames
68 of Fcondition_case and internal_condition_case.
69 When an error is signaled (by calling Fsignal, below),
70 this chain is searched for an element that applies. */
71
72#if !BYTE_MARK_STACK
73static
74#endif
75struct handler *handlerlist;
76
62#ifdef DEBUG_GCPRO 77#ifdef DEBUG_GCPRO
63/* Count levels of GCPRO to detect failure to UNGCPRO. */ 78/* Count levels of GCPRO to detect failure to UNGCPRO. */
64int gcpro_level; 79int gcpro_level;
@@ -66,12 +81,13 @@ int gcpro_level;
66 81
67Lisp_Object Qautoload, Qmacro, Qexit, Qinteractive, Qcommandp, Qdefun; 82Lisp_Object Qautoload, Qmacro, Qexit, Qinteractive, Qcommandp, Qdefun;
68Lisp_Object Qinhibit_quit; 83Lisp_Object Qinhibit_quit;
69Lisp_Object Qand_rest, Qand_optional; 84Lisp_Object Qand_rest;
70Lisp_Object Qdebug_on_error; 85static Lisp_Object Qand_optional;
71Lisp_Object Qdeclare; 86static Lisp_Object Qdebug_on_error;
87static Lisp_Object Qdeclare;
72Lisp_Object Qinternal_interpreter_environment, Qclosure; 88Lisp_Object Qinternal_interpreter_environment, Qclosure;
73 89
74Lisp_Object Qdebug; 90static Lisp_Object Qdebug;
75 91
76/* This holds either the symbol `run-hooks' or nil. 92/* This holds either the symbol `run-hooks' or nil.
77 It is nil at an early stage of startup, and when Emacs 93 It is nil at an early stage of startup, and when Emacs
@@ -100,7 +116,7 @@ struct specbinding *specpdl_ptr;
100 116
101/* Depth in Lisp evaluations and function calls. */ 117/* Depth in Lisp evaluations and function calls. */
102 118
103EMACS_INT lisp_eval_depth; 119static EMACS_INT lisp_eval_depth;
104 120
105/* The value of num_nonmacro_input_events as of the last time we 121/* The value of num_nonmacro_input_events as of the last time we
106 started to enter the debugger. If we decide to enter the debugger 122 started to enter the debugger. If we decide to enter the debugger
@@ -109,7 +125,7 @@ EMACS_INT lisp_eval_depth;
109 signal the error instead of entering an infinite loop of debugger 125 signal the error instead of entering an infinite loop of debugger
110 invocations. */ 126 invocations. */
111 127
112int when_entered_debugger; 128static int when_entered_debugger;
113 129
114/* The function from which the last `signal' was called. Set in 130/* The function from which the last `signal' was called. Set in
115 Fsignal. */ 131 Fsignal. */
@@ -126,6 +142,7 @@ static Lisp_Object funcall_lambda (Lisp_Object, size_t, Lisp_Object *);
126static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; 142static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN;
127static int interactive_p (int); 143static int interactive_p (int);
128static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args); 144static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args);
145static Lisp_Object Ffetch_bytecode (Lisp_Object);
129 146
130void 147void
131init_eval_once (void) 148init_eval_once (void)
@@ -1343,14 +1360,6 @@ usage: (unwind-protect BODYFORM UNWINDFORMS...) */)
1343 return unbind_to (count, val); 1360 return unbind_to (count, val);
1344} 1361}
1345 1362
1346/* Chain of condition handlers currently in effect.
1347 The elements of this chain are contained in the stack frames
1348 of Fcondition_case and internal_condition_case.
1349 When an error is signaled (by calling Fsignal, below),
1350 this chain is searched for an element that applies. */
1351
1352struct handler *handlerlist;
1353
1354DEFUN ("condition-case", Fcondition_case, Scondition_case, 2, UNEVALLED, 0, 1363DEFUN ("condition-case", Fcondition_case, Scondition_case, 2, UNEVALLED, 0,
1355 doc: /* Regain control when an error is signaled. 1364 doc: /* Regain control when an error is signaled.
1356Executes BODYFORM and returns its value if no error happens. 1365Executes BODYFORM and returns its value if no error happens.
@@ -3627,6 +3636,7 @@ If NFRAMES is more than the number of frames, the value is nil. */)
3627} 3636}
3628 3637
3629 3638
3639#if BYTE_MARK_STACK
3630void 3640void
3631mark_backtrace (void) 3641mark_backtrace (void)
3632{ 3642{
@@ -3646,8 +3656,7 @@ mark_backtrace (void)
3646 mark_object (backlist->args[i]); 3656 mark_object (backlist->args[i]);
3647 } 3657 }
3648} 3658}
3649 3659#endif
3650EXFUN (Funintern, 2);
3651 3660
3652void 3661void
3653syms_of_eval (void) 3662syms_of_eval (void)