diff options
author | Andy Wingo <wingo@pobox.com> | 2011-03-29 12:18:20 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-03-29 12:18:20 +0200 |
commit | 2460274d360d36bc758b763a1bbb1dc2cb85a87b (patch) | |
tree | cd178c9bbb2eeb993278c1fa0db245acd50e4e4e /doc/ref/scheme-using.texi | |
parent | 56dbc8a89958fcc401b0980ffcd0047f20470cd3 (diff) | |
download | guile-2460274d360d36bc758b763a1bbb1dc2cb85a87b.tar.gz |
document -q, repl options
* doc/ref/scheme-scripts.texi (Invoking Guile): Document -q.
* doc/ref/scheme-using.texi (Init File): New section, on .guile.
(Readline): Link to Init File.
(System Commands): Document the various REPL options, and
repl-default-option-set!.
Diffstat (limited to 'doc/ref/scheme-using.texi')
-rw-r--r-- | doc/ref/scheme-using.texi | 54 |
1 files changed, 49 insertions, 5 deletions
diff --git a/doc/ref/scheme-using.texi b/doc/ref/scheme-using.texi index a119d4218..7995c8c04 100644 --- a/doc/ref/scheme-using.texi +++ b/doc/ref/scheme-using.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. -@c Copyright (C) 2006, 2010 +@c Copyright (C) 2006, 2010, 2011 @c Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @@ -35,6 +35,7 @@ current language is @code{scheme}, and the current module is support for languages other than Scheme. @menu +* Init File:: * Readline:: * Value History:: * REPL Commands:: @@ -43,6 +44,22 @@ support for languages other than Scheme. @end menu +@node Init File +@subsection The Init File, @file{~/.guile} + +@cindex .guile +When run interactively, Guile will load a local initialization file from +@file{~/.guile}. This file should contain Scheme expressions for +evaluation. + +This facility lets the user customize their interactive Guile +environment, pulling in extra modules or parameterizing the REPL +implementation. + +To run Guile without loading the init file, use the @code{-q} +command-line option. + + @node Readline @subsection Readline @@ -58,10 +75,8 @@ scheme@@(guile-user)> (activate-readline) @end lisp It's a good idea to put these two lines (without the -@code{scheme@@(guile-user)>} prompts) in your @file{.guile} file. Guile -reads this file when it starts up interactively, so anything in this -file has the same effect as if you type it in by hand at the -@code{scheme@@(guile-user)>} prompt. +@code{scheme@@(guile-user)>} prompts) in your @file{.guile} file. +@xref{Init File}, for more on @file{.guile}. @node Value History @@ -410,6 +425,35 @@ List/show/set options. Quit this session. @end deffn +Current REPL options include: + +@table @code +@item compile-options +The options used when compiling expressions entered at the REPL. +@xref{Compilation}, for more on compilation options. +@item interp +Whether to interpret or compile expressions given at the REPL, if such a +choice is available. Off by default (indicating compilation). +@item prompt +A customized REPL prompt. @code{#f} by default, indicating the default +prompt. +@item value-history +Whether value history is on or not. @xref{Value History}. +@item on-error +What to do when an error happens. By default, @code{debug}, meaning to +enter the debugger. Other values include @code{backtrace}, to show a +backtrace without entering the debugger, or @code{report}, to simply +show a short error printout. +@end table + +Default values for REPL options may be set using +@code{repl-default-option-set!} from @code{(system repl common)}: + +@deffn {Scheme Procedure} repl-set-default-option! key value +Set the default value of a REPL option. This function is particularly +useful in a user's init file. @xref{Init File}. +@end deffn + @node Error Handling @subsection Error Handling |