diff options
| author | Paul Eggert | 2011-04-15 00:48:51 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-15 00:48:51 -0700 |
| commit | 4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9 (patch) | |
| tree | e993b231bb5555c9c961f5d0b20d90ac76f77bbd /src/eval.c | |
| parent | 1963a2e0bb07cc8dee6d27f972f93d9cfd7c6b2d (diff) | |
| parent | 49093f601b69d91126aefd328ee8f6bfeb797407 (diff) | |
| download | emacs-4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9.tar.gz emacs-4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9.zip | |
Merge from mainline.
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 43 |
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 | ||
| 59 | struct backtrace *backtrace_list; | 59 | static struct backtrace *backtrace_list; |
| 60 | |||
| 61 | #if !BYTE_MARK_STACK | ||
| 62 | static | ||
| 63 | #endif | ||
| 60 | struct catchtag *catchlist; | 64 | struct 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 | ||
| 73 | static | ||
| 74 | #endif | ||
| 75 | struct 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. */ |
| 64 | int gcpro_level; | 79 | int gcpro_level; |
| @@ -66,12 +81,13 @@ int gcpro_level; | |||
| 66 | 81 | ||
| 67 | Lisp_Object Qautoload, Qmacro, Qexit, Qinteractive, Qcommandp, Qdefun; | 82 | Lisp_Object Qautoload, Qmacro, Qexit, Qinteractive, Qcommandp, Qdefun; |
| 68 | Lisp_Object Qinhibit_quit; | 83 | Lisp_Object Qinhibit_quit; |
| 69 | Lisp_Object Qand_rest, Qand_optional; | 84 | Lisp_Object Qand_rest; |
| 70 | Lisp_Object Qdebug_on_error; | 85 | static Lisp_Object Qand_optional; |
| 71 | Lisp_Object Qdeclare; | 86 | static Lisp_Object Qdebug_on_error; |
| 87 | static Lisp_Object Qdeclare; | ||
| 72 | Lisp_Object Qinternal_interpreter_environment, Qclosure; | 88 | Lisp_Object Qinternal_interpreter_environment, Qclosure; |
| 73 | 89 | ||
| 74 | Lisp_Object Qdebug; | 90 | static 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 | ||
| 103 | EMACS_INT lisp_eval_depth; | 119 | static 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 | ||
| 112 | int when_entered_debugger; | 128 | static 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 *); | |||
| 126 | static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; | 142 | static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; |
| 127 | static int interactive_p (int); | 143 | static int interactive_p (int); |
| 128 | static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args); | 144 | static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args); |
| 145 | static Lisp_Object Ffetch_bytecode (Lisp_Object); | ||
| 129 | 146 | ||
| 130 | void | 147 | void |
| 131 | init_eval_once (void) | 148 | init_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 | |||
| 1352 | struct handler *handlerlist; | ||
| 1353 | |||
| 1354 | DEFUN ("condition-case", Fcondition_case, Scondition_case, 2, UNEVALLED, 0, | 1363 | DEFUN ("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. |
| 1356 | Executes BODYFORM and returns its value if no error happens. | 1365 | Executes 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 | ||
| 3630 | void | 3640 | void |
| 3631 | mark_backtrace (void) | 3641 | mark_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 | |
| 3650 | EXFUN (Funintern, 2); | ||
| 3651 | 3660 | ||
| 3652 | void | 3661 | void |
| 3653 | syms_of_eval (void) | 3662 | syms_of_eval (void) |