The behaviour of Guile's evaluator can be modified by manipulating the
evaluator options. For more information about options, @xref{User level
-options interfaces}. If you want to know which evaluator options are
-available, @xref{Evaluator options}.
-
-@c FIXME::martin: This is taken from libguile/options.c. Is there
-@c actually a difference between 'help and 'full?
-
-@deffn {Scheme Procedure} eval-options [setting]
-Display the current settings of the evaluator options. If @var{setting}
-is omitted, only a short form of the current evaluator options is
-printed. Otherwise, @var{setting} should be one of the following
-symbols:
-@table @code
-@item help
-Display the complete option settings.
-@item full
-Like @code{help}, but also print programmer options.
-@end table
-@end deffn
-
-@deffn {Scheme Procedure} eval-enable option-name
-@deffnx {Scheme Procedure} eval-disable option-name
-@deffnx {Scheme Procedure} eval-set! option-name value
-Modify the evaluator options. @code{eval-enable} should be used with boolean
-options and switches them on, @code{eval-disable} switches them off.
-@code{eval-set!} can be used to set an option to a specific value.
-@end deffn
-
-@deffn {Scheme Procedure} eval-options-interface [setting]
-@deffnx {C Function} scm_eval_options_interface (setting)
-Option interface for the evaluation options. Instead of using
-this procedure directly, use the procedures @code{eval-enable},
-@code{eval-disable}, @code{eval-set!} and @code{eval-options}.
-@end deffn
+options interfaces}.
@c FIXME::martin: Why aren't these procedure named like the other options
@c procedures?
* Reader options::
* Printing options::
* Debugger options::
-* Evaluator options::
* Evaluator trap options::
* Examples of option use::
@end menu
@subsubsection Low Level Options Interfaces
@deffn {Scheme Procedure} read-options-interface [setting]
-@deffnx {Scheme Procedure} eval-options-interface [setting]
@deffnx {Scheme Procedure} print-options-interface [setting]
@deffnx {Scheme Procedure} debug-options-interface [setting]
@deffnx {Scheme Procedure} evaluator-traps-interface [setting]
@end smallexample
-@node Evaluator options
-@subsubsection Evaluator options
-
-These are the evaluator options with their default values, as they are
-printed by typing @code{(eval-options 'full)} in Guile.
-
-@smallexample
-stack 22000 Size of thread stacks (in machine words).
-@end smallexample
-
-
@node Evaluator trap options
@subsubsection Evaluator trap options
[FIXME: These flags, together with their corresponding handlers, are not
}
}
-scm_t_option scm_eval_opts[] = {
- { SCM_OPTION_INTEGER, "stack", 22000, "Size of thread stacks (in machine words)." },
- { 0 }
-};
-
scm_t_option scm_debug_opts[] = {
{ SCM_OPTION_BOOLEAN, "cheap", 1,
"*This option is now obsolete. Setting it has no effect." },
};
-SCM_DEFINE (scm_eval_options_interface, "eval-options-interface", 0, 1, 0,
- (SCM setting),
- "Option interface for the evaluation options. Instead of using\n"
- "this procedure directly, use the procedures @code{eval-enable},\n"
- "@code{eval-disable}, @code{eval-set!} and @code{eval-options}.")
-#define FUNC_NAME s_scm_eval_options_interface
-{
- SCM ans;
-
- scm_dynwind_begin (0);
- scm_dynwind_critical_section (SCM_BOOL_F);
- ans = scm_options (setting,
- scm_eval_opts,
- FUNC_NAME);
- scm_dynwind_end ();
-
- return ans;
-}
-#undef FUNC_NAME
-
-
SCM_DEFINE (scm_evaluator_traps, "evaluator-traps-interface", 0, 1, 0,
(SCM setting),
"Option interface for the evaluator trap options.")
scm_init_opts (scm_evaluator_traps,
scm_evaluator_trap_table);
- scm_init_opts (scm_eval_options_interface,
- scm_eval_opts);
f_apply = scm_c_define_gsubr ("apply", 2, 0, 1, scm_apply);
/*
evaluator
*/
-SCM_API scm_t_option scm_eval_opts[];
-
SCM_API scm_t_option scm_evaluator_trap_table[];
-SCM_API SCM scm_eval_options_interface (SCM setting);
-
-#define SCM_EVAL_STACK scm_eval_opts[0].val
-
#define SCM_TRAPS_P scm_evaluator_trap_table[0].val
#define SCM_ENTER_FRAME_P scm_evaluator_trap_table[1].val
#define SCM_APPLY_FRAME_P scm_evaluator_trap_table[2].val
((_ opt val)
(options (append (options) (list 'opt val))))))))))
-(define-option-interface
- (eval-options-interface
- (eval-options eval-enable eval-disable)
- (eval-set!)))
-
(define-option-interface
(debug-options-interface
(debug-options debug-enable debug-disable)