diff options
| author | Joakim Verona | 2012-09-28 10:01:27 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-09-28 10:01:27 +0200 |
| commit | 5fcc7035c884b4419a1619551222b5f28ad9906f (patch) | |
| tree | 8b85fa0b18603b47383794afd2607a2edc97dd99 /src/eval.c | |
| parent | be25526e5384268a6a834e701a194626ecc3ca53 (diff) | |
| parent | 5bc93c6718562a9819b4919b595281bf85689306 (diff) | |
| download | emacs-5fcc7035c884b4419a1619551222b5f28ad9906f.tar.gz emacs-5fcc7035c884b4419a1619551222b5f28ad9906f.zip | |
finally builds again
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 41 |
1 files changed, 12 insertions, 29 deletions
diff --git a/src/eval.c b/src/eval.c index 1c565e233c6..d984331ec41 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -31,17 +31,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 31 | #include "xterm.h" | 31 | #include "xterm.h" |
| 32 | #endif | 32 | #endif |
| 33 | 33 | ||
| 34 | struct backtrace | 34 | struct backtrace *backtrace_list; |
| 35 | { | ||
| 36 | struct backtrace *next; | ||
| 37 | Lisp_Object *function; | ||
| 38 | Lisp_Object *args; /* Points to vector of args. */ | ||
| 39 | ptrdiff_t nargs; /* Length of vector. */ | ||
| 40 | /* Nonzero means call value of debugger when done with this operation. */ | ||
| 41 | unsigned int debug_on_exit : 1; | ||
| 42 | }; | ||
| 43 | |||
| 44 | static struct backtrace *backtrace_list; | ||
| 45 | 35 | ||
| 46 | #if !BYTE_MARK_STACK | 36 | #if !BYTE_MARK_STACK |
| 47 | static | 37 | static |
| @@ -1076,7 +1066,7 @@ internal_catch (Lisp_Object tag, Lisp_Object (*func) (Lisp_Object), Lisp_Object | |||
| 1076 | /* Unwind the specbind, catch, and handler stacks back to CATCH, and | 1066 | /* Unwind the specbind, catch, and handler stacks back to CATCH, and |
| 1077 | jump to that CATCH, returning VALUE as the value of that catch. | 1067 | jump to that CATCH, returning VALUE as the value of that catch. |
| 1078 | 1068 | ||
| 1079 | This is the guts Fthrow and Fsignal; they differ only in the way | 1069 | This is the guts of Fthrow and Fsignal; they differ only in the way |
| 1080 | they choose the catch tag to throw to. A catch tag for a | 1070 | they choose the catch tag to throw to. A catch tag for a |
| 1081 | condition-case form has a TAG of Qnil. | 1071 | condition-case form has a TAG of Qnil. |
| 1082 | 1072 | ||
| @@ -1085,7 +1075,7 @@ internal_catch (Lisp_Object tag, Lisp_Object (*func) (Lisp_Object), Lisp_Object | |||
| 1085 | the handler stack as we go, so that the proper handlers are in | 1075 | the handler stack as we go, so that the proper handlers are in |
| 1086 | effect for each unwind-protect clause we run. At the end, restore | 1076 | effect for each unwind-protect clause we run. At the end, restore |
| 1087 | some static info saved in CATCH, and longjmp to the location | 1077 | some static info saved in CATCH, and longjmp to the location |
| 1088 | specified in the | 1078 | specified there. |
| 1089 | 1079 | ||
| 1090 | This is used for correct unwinding in Fthrow and Fsignal. */ | 1080 | This is used for correct unwinding in Fthrow and Fsignal. */ |
| 1091 | 1081 | ||
| @@ -1099,7 +1089,7 @@ unwind_to_catch (struct catchtag *catch, Lisp_Object value) | |||
| 1099 | 1089 | ||
| 1100 | /* Restore certain special C variables. */ | 1090 | /* Restore certain special C variables. */ |
| 1101 | set_poll_suppress_count (catch->poll_suppress_count); | 1091 | set_poll_suppress_count (catch->poll_suppress_count); |
| 1102 | UNBLOCK_INPUT_TO (catch->interrupt_input_blocked); | 1092 | unblock_input_to (catch->interrupt_input_blocked); |
| 1103 | immediate_quit = 0; | 1093 | immediate_quit = 0; |
| 1104 | 1094 | ||
| 1105 | do | 1095 | do |
| @@ -1114,16 +1104,6 @@ unwind_to_catch (struct catchtag *catch, Lisp_Object value) | |||
| 1114 | } | 1104 | } |
| 1115 | while (! last_time); | 1105 | while (! last_time); |
| 1116 | 1106 | ||
| 1117 | #if HAVE_X_WINDOWS | ||
| 1118 | /* If x_catch_errors was done, turn it off now. | ||
| 1119 | (First we give unbind_to a chance to do that.) */ | ||
| 1120 | #if 0 /* This would disable x_catch_errors after x_connection_closed. | ||
| 1121 | The catch must remain in effect during that delicate | ||
| 1122 | state. --lorentey */ | ||
| 1123 | x_fully_uncatch_errors (); | ||
| 1124 | #endif | ||
| 1125 | #endif | ||
| 1126 | |||
| 1127 | byte_stack_list = catch->byte_stack; | 1107 | byte_stack_list = catch->byte_stack; |
| 1128 | gcprolist = catch->gcpro; | 1108 | gcprolist = catch->gcpro; |
| 1129 | #ifdef DEBUG_GCPRO | 1109 | #ifdef DEBUG_GCPRO |
| @@ -1713,7 +1693,7 @@ maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data) | |||
| 1713 | if ( | 1693 | if ( |
| 1714 | /* Don't try to run the debugger with interrupts blocked. | 1694 | /* Don't try to run the debugger with interrupts blocked. |
| 1715 | The editing loop would return anyway. */ | 1695 | The editing loop would return anyway. */ |
| 1716 | ! INPUT_BLOCKED_P | 1696 | ! input_blocked_p () |
| 1717 | && NILP (Vinhibit_debugger) | 1697 | && NILP (Vinhibit_debugger) |
| 1718 | /* Does user want to enter debugger for this kind of error? */ | 1698 | /* Does user want to enter debugger for this kind of error? */ |
| 1719 | && (EQ (sig, Qquit) | 1699 | && (EQ (sig, Qquit) |
| @@ -2065,11 +2045,11 @@ eval_sub (Lisp_Object form) | |||
| 2065 | original_args = XCDR (form); | 2045 | original_args = XCDR (form); |
| 2066 | 2046 | ||
| 2067 | backtrace.next = backtrace_list; | 2047 | backtrace.next = backtrace_list; |
| 2068 | backtrace_list = &backtrace; | ||
| 2069 | backtrace.function = &original_fun; /* This also protects them from gc. */ | 2048 | backtrace.function = &original_fun; /* This also protects them from gc. */ |
| 2070 | backtrace.args = &original_args; | 2049 | backtrace.args = &original_args; |
| 2071 | backtrace.nargs = UNEVALLED; | 2050 | backtrace.nargs = UNEVALLED; |
| 2072 | backtrace.debug_on_exit = 0; | 2051 | backtrace.debug_on_exit = 0; |
| 2052 | backtrace_list = &backtrace; | ||
| 2073 | 2053 | ||
| 2074 | if (debug_on_next_call) | 2054 | if (debug_on_next_call) |
| 2075 | do_debug_on_call (Qt); | 2055 | do_debug_on_call (Qt); |
| @@ -2399,6 +2379,7 @@ If it is a list of functions, those functions are called, in order, | |||
| 2399 | with the given arguments ARGS, until one of them | 2379 | with the given arguments ARGS, until one of them |
| 2400 | returns a non-nil value. Then we return that value. | 2380 | returns a non-nil value. Then we return that value. |
| 2401 | However, if they all return nil, we return nil. | 2381 | However, if they all return nil, we return nil. |
| 2382 | If the value of HOOK is nil, this function returns nil. | ||
| 2402 | 2383 | ||
| 2403 | Do not use `make-local-variable' to make a hook variable buffer-local. | 2384 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 2404 | Instead, use `add-hook' and specify t for the LOCAL argument. | 2385 | Instead, use `add-hook' and specify t for the LOCAL argument. |
| @@ -2420,10 +2401,12 @@ DEFUN ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure, | |||
| 2420 | HOOK should be a symbol, a hook variable. If HOOK has a non-nil | 2401 | HOOK should be a symbol, a hook variable. If HOOK has a non-nil |
| 2421 | value, that value may be a function or a list of functions to be | 2402 | value, that value may be a function or a list of functions to be |
| 2422 | called to run the hook. If the value is a function, it is called with | 2403 | called to run the hook. If the value is a function, it is called with |
| 2423 | the given arguments and its return value is returned. | 2404 | the given arguments. Then we return nil if the function returns nil, |
| 2405 | and t if it returns non-nil. | ||
| 2424 | If it is a list of functions, those functions are called, in order, | 2406 | If it is a list of functions, those functions are called, in order, |
| 2425 | with the given arguments ARGS, until one of them returns nil. | 2407 | with the given arguments ARGS, until one of them returns nil. |
| 2426 | Then we return nil. However, if they all return non-nil, we return non-nil. | 2408 | Then we return nil. However, if they all return non-nil, we return t. |
| 2409 | If the value of HOOK is nil, this function returns t. | ||
| 2427 | 2410 | ||
| 2428 | Do not use `make-local-variable' to make a hook variable buffer-local. | 2411 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 2429 | Instead, use `add-hook' and specify t for the LOCAL argument. | 2412 | Instead, use `add-hook' and specify t for the LOCAL argument. |
| @@ -2737,11 +2720,11 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) | |||
| 2737 | } | 2720 | } |
| 2738 | 2721 | ||
| 2739 | backtrace.next = backtrace_list; | 2722 | backtrace.next = backtrace_list; |
| 2740 | backtrace_list = &backtrace; | ||
| 2741 | backtrace.function = &args[0]; | 2723 | backtrace.function = &args[0]; |
| 2742 | backtrace.args = &args[1]; /* This also GCPROs them. */ | 2724 | backtrace.args = &args[1]; /* This also GCPROs them. */ |
| 2743 | backtrace.nargs = nargs - 1; | 2725 | backtrace.nargs = nargs - 1; |
| 2744 | backtrace.debug_on_exit = 0; | 2726 | backtrace.debug_on_exit = 0; |
| 2727 | backtrace_list = &backtrace; | ||
| 2745 | 2728 | ||
| 2746 | /* Call GC after setting up the backtrace, so the latter GCPROs the args. */ | 2729 | /* Call GC after setting up the backtrace, so the latter GCPROs the args. */ |
| 2747 | maybe_gc (); | 2730 | maybe_gc (); |