diff options
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 82 |
1 files changed, 15 insertions, 67 deletions
diff --git a/src/eval.c b/src/eval.c index 709a54fc2ec..c2d64d6ba3b 100644 --- a/src/eval.c +++ b/src/eval.c @@ -58,7 +58,7 @@ int gcpro_level; #endif Lisp_Object Qautoload, Qmacro, Qexit, Qinteractive, Qcommandp, Qdefun; -Lisp_Object Qinhibit_quit, Vinhibit_quit, Vquit_flag; +Lisp_Object Qinhibit_quit; Lisp_Object Qand_rest, Qand_optional; Lisp_Object Qdebug_on_error; Lisp_Object Qdeclare; @@ -89,56 +89,10 @@ struct specbinding *specpdl; struct specbinding *specpdl_ptr; -/* Maximum size allowed for specpdl allocation */ - -EMACS_INT max_specpdl_size; - /* Depth in Lisp evaluations and function calls. */ EMACS_INT lisp_eval_depth; -/* Maximum allowed depth in Lisp evaluations and function calls. */ - -EMACS_INT max_lisp_eval_depth; - -/* Nonzero means enter debugger before next function call */ - -int debug_on_next_call; - -/* Non-zero means debugger may continue. This is zero when the - debugger is called during redisplay, where it might not be safe to - continue the interrupted redisplay. */ - -int debugger_may_continue; - -/* List of conditions (non-nil atom means all) which cause a backtrace - if an error is handled by the command loop's error handler. */ - -Lisp_Object Vstack_trace_on_error; - -/* List of conditions (non-nil atom means all) which enter the debugger - if an error is handled by the command loop's error handler. */ - -Lisp_Object Vdebug_on_error; - -/* List of conditions and regexps specifying error messages which - do not enter the debugger even if Vdebug_on_error says they should. */ - -Lisp_Object Vdebug_ignored_errors; - -/* Non-nil means call the debugger even if the error will be handled. */ - -Lisp_Object Vdebug_on_signal; - -/* Hook for edebug to use. */ - -Lisp_Object Vsignal_hook_function; - -/* Nonzero means enter debugger if a quit signal - is handled by the command loop's error handler. */ - -int debug_on_quit; - /* The value of num_nonmacro_input_events as of the last time we started to enter the debugger. If we decide to enter the debugger again when this is still equal to num_nonmacro_input_events, then we @@ -148,8 +102,6 @@ int debug_on_quit; int when_entered_debugger; -Lisp_Object Vdebugger; - /* The function from which the last `signal' was called. Set in Fsignal. */ @@ -161,10 +113,6 @@ Lisp_Object Vsignaling_function; int handling_signal; -/* Function to process declarations in defmacro forms. */ - -Lisp_Object Vmacro_declaration_function; - static Lisp_Object funcall_lambda (Lisp_Object, int, Lisp_Object*); static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; static int interactive_p (int); @@ -3505,7 +3453,7 @@ mark_backtrace (void) void syms_of_eval (void) { - DEFVAR_INT ("max-specpdl-size", &max_specpdl_size, + DEFVAR_INT ("max-specpdl-size", max_specpdl_size, doc: /* *Limit on number of Lisp variable bindings and `unwind-protect's. If Lisp code tries to increase the total number past this amount, an error is signaled. @@ -3513,7 +3461,7 @@ You can safely use a value considerably larger than the default value, if that proves inconveniently small. However, if you increase it too far, Emacs could run out of memory trying to make the stack bigger. */); - DEFVAR_INT ("max-lisp-eval-depth", &max_lisp_eval_depth, + DEFVAR_INT ("max-lisp-eval-depth", max_lisp_eval_depth, doc: /* *Limit on depth in `eval', `apply' and `funcall' before error. This limit serves to catch infinite recursions for you before they cause @@ -3522,7 +3470,7 @@ You can safely make it considerably larger than its default value, if that proves inconveniently small. However, if you increase it too far, Emacs could overflow the real C stack, and crash. */); - DEFVAR_LISP ("quit-flag", &Vquit_flag, + DEFVAR_LISP ("quit-flag", Vquit_flag, doc: /* Non-nil causes `eval' to abort, unless `inhibit-quit' is non-nil. If the value is t, that means do an ordinary quit. If the value equals `throw-on-input', that means quit by throwing @@ -3531,7 +3479,7 @@ Typing C-g sets `quit-flag' to t, regardless of `inhibit-quit', but `inhibit-quit' non-nil prevents anything from taking notice of that. */); Vquit_flag = Qnil; - DEFVAR_LISP ("inhibit-quit", &Vinhibit_quit, + DEFVAR_LISP ("inhibit-quit", Vinhibit_quit, doc: /* Non-nil inhibits C-g quitting from happening immediately. Note that `quit-flag' will still be set by typing C-g, so a quit will be signaled as soon as `inhibit-quit' is nil. @@ -3577,7 +3525,7 @@ before making `inhibit-quit' nil. */); Qdebug = intern_c_string ("debug"); staticpro (&Qdebug); - DEFVAR_LISP ("stack-trace-on-error", &Vstack_trace_on_error, + DEFVAR_LISP ("stack-trace-on-error", Vstack_trace_on_error, doc: /* *Non-nil means errors display a backtrace buffer. More precisely, this happens for any error that is handled by the editor command loop. @@ -3585,7 +3533,7 @@ If the value is a list, an error only means to display a backtrace if one of its condition symbols appears in the list. */); Vstack_trace_on_error = Qnil; - DEFVAR_LISP ("debug-on-error", &Vdebug_on_error, + DEFVAR_LISP ("debug-on-error", Vdebug_on_error, doc: /* *Non-nil means enter debugger if an error is signaled. Does not apply to errors handled by `condition-case' or those matched by `debug-ignored-errors'. @@ -3597,7 +3545,7 @@ The command `toggle-debug-on-error' toggles this. See also the variable `debug-on-quit'. */); Vdebug_on_error = Qnil; - DEFVAR_LISP ("debug-ignored-errors", &Vdebug_ignored_errors, + DEFVAR_LISP ("debug-ignored-errors", Vdebug_ignored_errors, doc: /* *List of errors for which the debugger should not be called. Each element may be a condition-name or a regexp that matches error messages. If any element applies to a given error, that error skips the debugger @@ -3606,21 +3554,21 @@ This overrides the variable `debug-on-error'. It does not apply to errors handled by `condition-case'. */); Vdebug_ignored_errors = Qnil; - DEFVAR_BOOL ("debug-on-quit", &debug_on_quit, + DEFVAR_BOOL ("debug-on-quit", debug_on_quit, doc: /* *Non-nil means enter debugger if quit is signaled (C-g, for example). Does not apply if quit is handled by a `condition-case'. */); debug_on_quit = 0; - DEFVAR_BOOL ("debug-on-next-call", &debug_on_next_call, + DEFVAR_BOOL ("debug-on-next-call", debug_on_next_call, doc: /* Non-nil means enter debugger before next `eval', `apply' or `funcall'. */); - DEFVAR_BOOL ("debugger-may-continue", &debugger_may_continue, + DEFVAR_BOOL ("debugger-may-continue", debugger_may_continue, doc: /* Non-nil means debugger may continue execution. This is nil when the debugger is called under circumstances where it might not be safe to continue. */); debugger_may_continue = 1; - DEFVAR_LISP ("debugger", &Vdebugger, + DEFVAR_LISP ("debugger", Vdebugger, doc: /* Function to call to invoke debugger. If due to frame exit, args are `exit' and the value being returned; this function's value will be returned instead of that. @@ -3629,19 +3577,19 @@ If due to `apply' or `funcall' entry, one arg, `lambda'. If due to `eval' entry, one arg, t. */); Vdebugger = Qnil; - DEFVAR_LISP ("signal-hook-function", &Vsignal_hook_function, + DEFVAR_LISP ("signal-hook-function", Vsignal_hook_function, doc: /* If non-nil, this is a function for `signal' to call. It receives the same arguments that `signal' was given. The Edebug package uses this to regain control. */); Vsignal_hook_function = Qnil; - DEFVAR_LISP ("debug-on-signal", &Vdebug_on_signal, + DEFVAR_LISP ("debug-on-signal", Vdebug_on_signal, doc: /* *Non-nil means call the debugger regardless of condition handlers. Note that `debug-on-error', `debug-on-quit' and friends still determine whether to handle the particular condition. */); Vdebug_on_signal = Qnil; - DEFVAR_LISP ("macro-declaration-function", &Vmacro_declaration_function, + DEFVAR_LISP ("macro-declaration-function", Vmacro_declaration_function, doc: /* Function to process declarations in a macro definition. The function will be called with two args MACRO and DECL. MACRO is the name of the macro being defined. |