debug and readline options doc tweak
[bpt/guile.git] / doc / ref / api-options.texi
index d2710bb..3b600db 100644 (file)
@@ -383,284 +383,32 @@ control interface, and a user-level interface which allows the enabling
 or disabling of options.
 
 Moreover, the options are classified in groups according to whether they
-configure @emph{reading}, @emph{printing}, @emph{debugging} or
-@emph{evaluating}.
+configure @emph{reading}, @emph{printing}, or @emph{debugging}.
 
 @menu
-* Low level options interfaces::
-* User level options interfaces::
-* Reader options::
-* Printing options::
 * Debugger options::
-* Evaluator trap options::
 * Examples of option use::
 @end menu
 
 
-@node Low level options interfaces
-@subsubsection Low Level Options Interfaces
-
-@deffn {Scheme Procedure} read-options-interface [setting]
-@deffnx {Scheme Procedure} print-options-interface [setting]
-@deffnx {Scheme Procedure} debug-options-interface [setting]
-@deffnx {Scheme Procedure} evaluator-traps-interface [setting]
-@deffnx {C Function} scm_read_options (setting)
-@deffnx {C Function} scm_eval_options_interface (setting)
-@deffnx {C Function} scm_print_options (setting)
-@deffnx {C Function} scm_debug_options (setting)
-@deffnx {C Function} scm_evaluator_traps (setting)
-If one of these procedures is called with no arguments (or with
-@code{setting == SCM_UNDEFINED} in C code), it returns a list describing
-the current setting of the read, eval, print, debug or evaluator traps
-options respectively.  The setting of a boolean option is indicated
-simply by the presence or absence of the option symbol in the list.  The
-setting of a non-boolean option is indicated by the presence of the
-option symbol immediately followed by the option's current value.
-
-If called with a list argument, these procedures interpret the list as
-an option setting and modify the relevant options accordingly.  [FIXME
---- this glosses over a lot of details!]
-
-If called with any other argument, such as @code{'help}, these
-procedures return a list of entries like @code{(@var{OPTION-SYMBOL}
-@var{DEFAULT-VALUE} @var{DOC-STRING})}, with each entry giving the
-default value and documentation for each option symbol in the relevant
-set of options.
-@end deffn
-
-
-@node User level options interfaces
-@subsubsection User Level Options Interfaces
-
-@c @deftp {Data type} scm_option
-@c @code{scm_option} is used to represent run time options.  It can be a
-@c @emph{boolean} type, in which case the option will be set by the strings
-@c @code{"yes"} and @code{"no"}.  It can be a
-@c @end deftp
-
-@c NJFIXME
-@deffn {Scheme Procedure} <group>-options [arg]
-@deffnx {Scheme Procedure} read-options [arg]
-@deffnx {Scheme Procedure} print-options [arg]
-@deffnx {Scheme Procedure} debug-options [arg]
-@deffnx {Scheme Procedure} traps [arg]
-These functions list the options in their group.  The optional argument
-@var{arg} is a symbol which modifies the form in which the options are
-presented.
-
-With no arguments, @code{<group>-options} returns the values of the
-options in that particular group.  If @var{arg} is @code{'help}, a
-description of each option is given.  If @var{arg} is @code{'full},
-programmers' options are also shown.
-
-@var{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.
-@end deffn
-[FIXME: I don't think 'full is ever any different from 'help.  What's
-up?]
-
-@c NJFIXME
-@deffn {Scheme Procedure} <group>-enable option-symbol
-@deffnx {Scheme Procedure} read-enable option-symbol
-@deffnx {Scheme Procedure} print-enable option-symbol
-@deffnx {Scheme Procedure} debug-enable option-symbol
-@deffnx {Scheme Procedure} trap-enable option-symbol
-These functions set the specified @var{option-symbol} in their options
-group.  They only work if the option is boolean, and throw an error
-otherwise.
-@end deffn
-
-@c NJFIXME
-@deffn {Scheme Procedure} <group>-disable option-symbol
-@deffnx {Scheme Procedure} read-disable option-symbol
-@deffnx {Scheme Procedure} print-disable option-symbol
-@deffnx {Scheme Procedure} debug-disable option-symbol
-@deffnx {Scheme Procedure} trap-disable option-symbol
-These functions turn off the specified @var{option-symbol} in their
-options group.  They only work if the option is boolean, and throw an
-error otherwise.
-@end deffn
-
-@c NJFIXME
-@deffn syntax <group>-set! option-symbol value
-@deffnx syntax read-set! option-symbol value
-@deffnx syntax print-set! option-symbol value
-@deffnx syntax debug-set! option-symbol value
-@deffnx syntax trap-set! option-symbol value
-These functions set a non-boolean @var{option-symbol} to the specified
-@var{value}.
-@end deffn
-
-
-@node Reader options
-@subsubsection Reader options
-@cindex options - read
-@cindex read options
-
-Here is the list of reader options generated by typing
-@code{(read-options 'full)} in Guile.  You can also see the default
-values.
-
-@smalllisp
-keywords         #f      Style of keyword recognition: #f, 'prefix or 'postfix
-case-insensitive no      Convert symbols to lower case.
-positions        yes     Record positions of source code expressions.
-copy             no      Copy source code expressions.
-r6rs-hex-escapes no      Use R6RS-style string hex escapes
-@end smalllisp
-
-Notice that while Standard Scheme is case insensitive, to ease
-translation of other Lisp dialects, notably Emacs Lisp, into Guile,
-Guile is case-sensitive by default.
-
-To make Guile case insensitive, you can type
-
-@lisp
-(read-enable 'case-insensitive)
-@end lisp
-
-For more information on the effect of the @code{r6rs-hex-escapes} option, see
-(@pxref{String Syntax}).
-
-@node Printing options
-@subsubsection Printing options
-
-Here is the list of print options generated by typing
-@code{(print-options 'full)} in Guile.  You can also see the default
-values.
-
-@smallexample
-quote-keywordish-symbols reader How to print symbols that have a colon
-                                as their first or last character. The
-                                value '#f' does not quote the colons;
-                                '#t' quotes them; 'reader' quotes
-                                them when the reader option
-                                'keywords' is not '#f'.
-
-highlight-prefix         @{      The string to print before highlighted values.
-highlight-suffix         @}      The string to print after highlighted values.
-
-source                   no     Print closures with source.
-closure-hook             #f     Hook for printing closures.
-@end smallexample
-
-
-@node Evaluator trap options
-@subsubsection Evaluator trap options
-[FIXME: These flags, together with their corresponding handlers, are not
-user level options.  Probably this entire section should be moved to the
-documentation about the low-level programmer debugging interface.]
-
-Here is the list of evaluator trap options generated by typing
-@code{(traps 'full)} in Guile.  You can also see the default values.
-
-@smallexample
-exit-frame      no      Trap when exiting eval or apply.
-apply-frame     no      Trap when entering apply.
-enter-frame     no      Trap when eval enters new frame.
-memoize-symbol  no      Trap when eval memoizes a symbol's value
-traps          yes     Enable evaluator traps.
-@end smallexample
-
-@deffn apply-frame-handler key cont tailp
-Called when a procedure is being applied.
-
-Called if:
-
-@itemize @bullet
-@item
-evaluator traps are enabled [traps interface], and
-@item
-either
-@itemize @minus
-@item
-@code{apply-frame} is enabled [traps interface], or
-@item
-trace mode is on [debug-options interface], and the procedure being
-called has the trace property enabled.
-@end itemize
-@end itemize
-
-@var{cont} is a ``debug object'', which means that it can be passed to
-@code{make-stack} to discover the stack at the point of the trap.  The
-apply frame handler's code can capture a restartable continuation if it
-wants to by using @code{call-with-current-continuation} in the usual way.
-
-@var{tailp} is true if this is a tail call
-@end deffn
-
-@deffn exit-frame-handler key cont retval
-Called when a value is returned from a procedure.
-
-Called if:
-
-@itemize @bullet
-@item
-evaluator traps are enabled [traps interface], and
-@item
-either
-@itemize @minus
-@item
- @code{exit-frame} is enabled [traps interface], or
-@item
-trace mode is on [debug-options interface], and the procedure being
-called has the trace property enabled.
-@end itemize
-@end itemize
-
-@var{cont} is a ``debug object'', which means that it can be passed to
-@code{make-stack} to discover the stack at the point of the trap.  The
-exit frame handler's code can capture a restartable continuation if it
-wants to by using @code{call-with-current-continuation} in the usual
-way.
-
-@var{retval} is the return value.
-@end deffn
-
-@deffn memoize-symbol-handler key cont expression env
-Called when the evaluator memoizes the value of a procedure symbol
-
-@var{cont} is a ``debug object'', which means that it can be passed to
-@code{make-stack} to discover the stack at the point of the trap.  The
-exit frame handler's code can capture a restartable continuation if it
-wants to by using @code{call-with-current-continuation} in the usual
-way.
-
-@var{retval} is the return value.
-@end deffn
-
-@deffn {Scheme Procedure} with-traps thunk
-@deffnx {C Function} scm_with_traps (thunk)
-Call @var{thunk} with traps enabled.
-@end deffn
-
-@deffn {Scheme Procedure} debug-object? obj
-@deffnx {C Function} scm_debug_object_p (obj)
-Return @code{#t} if @var{obj} is a debug object.
-@end deffn
-
-
 @node Debugger options
 @subsubsection Debugger options
 
 Here is the list of print options generated by typing
-@code{(debug-options 'full)} in Guile.  You can also see the default
+@code{(debug-options 'help)} in Guile.  You can also see the default
 values.
 
 @smallexample
-stack           20000   Stack size limit (0 = no check).
-debug           yes     Use the debugging evaluator.
-backtrace       no      Show backtrace on error.
-depth           20      Maximal length of printed backtrace.
-maxdepth        1000    Maximal number of stored backtrace frames.
-frames          3       Maximum number of tail-recursive frames in backtrace.
-indent          10      Maximal indentation in backtrace.
 backwards       no      Display backtrace in anti-chronological order.
-procnames       yes     Record procedure names at definition.
-trace           no      *Trace mode.
-breakpoints     no      *Check for breakpoints.
-cheap           yes     *This option is now obsolete.  Setting it has no effect.
+width           79      Maximal width of backtrace.
+depth           20      Maximal length of printed backtrace.
+backtrace       yes     Show backtrace on error.
+stack           1048576 Stack size limit (measured in words;
+                        0 = no check). 
+show-file-name  #t      Show file names and line numbers in backtraces
+                        when not `#f'.  A value of `base' displays only
+                        base names, while `#t' displays full names. 
+warn-deprecated no      Warn when deprecated features are used.
 @end smallexample
 
 @subsubheading Stack overflow
@@ -740,17 +488,9 @@ positions  yes     Record positions of source code expressions.
 copy           no      Copy source code expressions.
 guile> (debug-options 'help)
 stack          20000   Stack size limit (0 = no check).
-debug          yes     Use the debugging evaluator.
 backtrace      no      Show backtrace on error.
 depth          20      Maximal length of printed backtrace.
-maxdepth       1000    Maximal number of stored backtrace frames.
-frames         3       Maximum number of tail-recursive frames in backtrace.
-indent         10      Maximal indentation in backtrace.
 backwards      no      Display backtrace in anti-chronological order.
-procnames      yes     Record procedure names at definition.
-trace          no      *Trace mode.
-breakpoints    no      *Check for breakpoints.
-cheap          yes     *This option is now obsolete.  Setting it has no effect.
 guile> (read-enable 'case-insensitive)
 (keywords #f case-insensitive positions)
 guile> aBc