Next: , Up: Options and Config


33.1 General option interface

We will use the expression <group> to represent read, print, debug or evaluator.

Low level

— Scheme Procedure: <group>-options-interface
— Scheme Procedure: read-options-interface [SOME-INT]
— Scheme Procedure: print-options-interface [SOME-INT]
— Scheme Procedure: evaluator-traps-interface [SOME-INT]
— Scheme Procedure: read-options-interface [SOME-INT]

[FIXME: I have just taken the comments for C routine scm_options that implements all of these. It needs to be presented better.]

If scm_options is called without arguments, the current option setting is returned. If the argument is an option setting, options are altered and the old setting is returned. If the argument isn't a list, a list of sublists is returned, where each sublist contains option name, value and documentation string.

User level

— Scheme Procedure: <group>-options [arg]
— Scheme Procedure: read-options [arg]
— Scheme Procedure: print-options [arg]
— Scheme Procedure: debug-options [arg]
— Scheme Procedure: traps [arg]

These functions list the options in their group. The optional argument arg is a symbol which modifies the form in which the options are presented.

With no arguments, <group>-options returns the values of the options in that particular group. If arg is 'help, a description of each option is given. If arg is 'full, programmers' options are also shown.

arg can also be a list representing the state of all options. In this case, the list contains single symbols (for enabled boolean options) and symbols followed by values.

[FIXME: I don't think 'full is ever any different from 'help. What's up?]
— Scheme Procedure: <group>-enable option-symbol
— Scheme Procedure: read-enable option-symbol
— Scheme Procedure: print-enable option-symbol
— Scheme Procedure: debug-enable option-symbol
— Scheme Procedure: trap-enable option-symbol

These functions set the specified option-symbol in their options group. They only work if the option is boolean, and throw an error otherwise.

— Scheme Procedure: <group>-disable option-symbol
— Scheme Procedure: read-disable option-symbol
— Scheme Procedure: print-disable option-symbol
— Scheme Procedure: debug-disable option-symbol
— Scheme Procedure: trap-disable option-symbol

These functions turn off the specified option-symbol in their options group. They only work if the option is boolean, and throw an error otherwise.

— Syntax: <group>-set! option-symbol value
— Syntax: read-set! option-symbol value
— Syntax: print-set! option-symbol value
— Syntax: debug-set! option-symbol value
— Syntax: trap-set! option-symbol value

These functions set a non-boolean option-symbol to the specified value.