aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c37
1 files changed, 17 insertions, 20 deletions
diff --git a/src/eval.c b/src/eval.c
index 3b4e9fe0324..26d1ce967a7 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -235,6 +235,7 @@ restore_stack_limits (data)
235{ 235{
236 max_specpdl_size = XINT (XCAR (data)); 236 max_specpdl_size = XINT (XCAR (data));
237 max_lisp_eval_depth = XINT (XCDR (data)); 237 max_lisp_eval_depth = XINT (XCDR (data));
238 return Qnil;
238} 239}
239 240
240/* Call the Lisp debugger, giving it argument ARG. */ 241/* Call the Lisp debugger, giving it argument ARG. */
@@ -471,10 +472,10 @@ usage: (prog1 FIRST BODY...) */)
471} 472}
472 473
473DEFUN ("prog2", Fprog2, Sprog2, 2, UNEVALLED, 0, 474DEFUN ("prog2", Fprog2, Sprog2, 2, UNEVALLED, 0,
474 doc: /* Eval X, Y and BODY sequentially; value from Y. 475 doc: /* Eval FORM1, FORM2 and BODY sequentially; value from FORM2.
475The value of Y is saved during the evaluation of the remaining args, 476The value of FORM2 is saved during the evaluation of the
476whose values are discarded. 477remaining args, whose values are discarded.
477usage: (prog2 X Y BODY...) */) 478usage: (prog2 FORM1 FORM2 BODY...) */)
478 (args) 479 (args)
479 Lisp_Object args; 480 Lisp_Object args;
480{ 481{
@@ -564,8 +565,8 @@ usage: (function ARG) */)
564 565
565DEFUN ("interactive-p", Finteractive_p, Sinteractive_p, 0, 0, 0, 566DEFUN ("interactive-p", Finteractive_p, Sinteractive_p, 0, 0, 0,
566 doc: /* Return t if the function was run directly by user input. 567 doc: /* Return t if the function was run directly by user input.
567This means that the function was called with call-interactively (which 568This means that the function was called with `call-interactively'
568includes being called as the binding of a key) 569\(which includes being called as the binding of a key)
569and input is currently coming from the keyboard (not in keyboard macro), 570and input is currently coming from the keyboard (not in keyboard macro),
570and Emacs is not running in batch mode (`noninteractive' is nil). 571and Emacs is not running in batch mode (`noninteractive' is nil).
571 572
@@ -586,14 +587,14 @@ unconditionally for that argument. (`p' is a good way to do this.) */)
586 587
587 588
588DEFUN ("called-interactively-p", Fcalled_interactively_p, Scalled_interactively_p, 0, 0, 0, 589DEFUN ("called-interactively-p", Fcalled_interactively_p, Scalled_interactively_p, 0, 0, 0,
589 doc: /* Return t if the function using this was called with call-interactively. 590 doc: /* Return t if the function using this was called with `call-interactively'.
590This is used for implementing advice and other function-modifying 591This is used for implementing advice and other function-modifying
591features of Emacs. 592features of Emacs.
592 593
593The cleanest way to test whether your function was called with 594The cleanest way to test whether your function was called with
594`call-interactively', the way to do that is by adding an extra 595`call-interactively' is by adding an extra optional argument,
595optional argument, and making the `interactive' spec specify non-nil 596and making the `interactive' spec specify non-nil unconditionally
596unconditionally for that argument. (`p' is a good way to do this.) */) 597for that argument. (`p' is a good way to do this.) */)
597 () 598 ()
598{ 599{
599 return interactive_p (1) ? Qt : Qnil; 600 return interactive_p (1) ? Qt : Qnil;
@@ -779,7 +780,7 @@ The return value is BASE-VARIABLE. */)
779 780
780 781
781DEFUN ("defvar", Fdefvar, Sdefvar, 1, UNEVALLED, 0, 782DEFUN ("defvar", Fdefvar, Sdefvar, 1, UNEVALLED, 0,
782 doc: /* Define SYMBOL as a variable. 783 doc: /* Define SYMBOL as a variable, and return SYMBOL.
783You are not required to define a variable in order to use it, 784You are not required to define a variable in order to use it,
784but the definition can supply documentation and an initial value 785but the definition can supply documentation and an initial value
785in a way that tags can recognize. 786in a way that tags can recognize.
@@ -2859,8 +2860,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
2859 val = (*XSUBR (fun)->function) (internal_args[0]); 2860 val = (*XSUBR (fun)->function) (internal_args[0]);
2860 goto done; 2861 goto done;
2861 case 2: 2862 case 2:
2862 val = (*XSUBR (fun)->function) (internal_args[0], 2863 val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1]);
2863 internal_args[1]);
2864 goto done; 2864 goto done;
2865 case 3: 2865 case 3:
2866 val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1], 2866 val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1],
@@ -2868,8 +2868,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
2868 goto done; 2868 goto done;
2869 case 4: 2869 case 4:
2870 val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1], 2870 val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1],
2871 internal_args[2], 2871 internal_args[2], internal_args[3]);
2872 internal_args[3]);
2873 goto done; 2872 goto done;
2874 case 5: 2873 case 5:
2875 val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1], 2874 val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1],
@@ -3395,7 +3394,7 @@ void
3395syms_of_eval () 3394syms_of_eval ()
3396{ 3395{
3397 DEFVAR_INT ("max-specpdl-size", &max_specpdl_size, 3396 DEFVAR_INT ("max-specpdl-size", &max_specpdl_size,
3398 doc: /* *Limit on number of Lisp variable bindings & unwind-protects. 3397 doc: /* *Limit on number of Lisp variable bindings and `unwind-protect's.
3399If Lisp code tries to increase the total number past this amount, 3398If Lisp code tries to increase the total number past this amount,
3400an error is signaled. 3399an error is signaled.
3401You can safely use a value considerably larger than the default value, 3400You can safely use a value considerably larger than the default value,
@@ -3492,10 +3491,8 @@ It does not apply to errors handled by `condition-case'. */);
3492 Vdebug_ignored_errors = Qnil; 3491 Vdebug_ignored_errors = Qnil;
3493 3492
3494 DEFVAR_BOOL ("debug-on-quit", &debug_on_quit, 3493 DEFVAR_BOOL ("debug-on-quit", &debug_on_quit,
3495 doc: /* *Non-nil means enter debugger if quit is signaled (C-g, for example). 3494 doc: /* *Non-nil means enter debugger if quit is signaled (C-g, for example).
3496Does not apply if quit is handled by a `condition-case'. 3495Does not apply if quit is handled by a `condition-case'. */);
3497When you evaluate an expression interactively, this variable
3498is temporarily non-nil if `eval-expression-debug-on-quit' is non-nil. */);
3499 debug_on_quit = 0; 3496 debug_on_quit = 0;
3500 3497
3501 DEFVAR_BOOL ("debug-on-next-call", &debug_on_next_call, 3498 DEFVAR_BOOL ("debug-on-next-call", &debug_on_next_call,