document -q, repl options
authorAndy Wingo <wingo@pobox.com>
Tue, 29 Mar 2011 10:18:20 +0000 (12:18 +0200)
committerAndy Wingo <wingo@pobox.com>
Tue, 29 Mar 2011 10:18:20 +0000 (12:18 +0200)
* 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!.

doc/ref/scheme-scripts.texi
doc/ref/scheme-using.texi

index 5a6f494d10009205d508a12ccb281a2b66a99e6e..0ad1becf3bbc00b3a3906eb65252db53e2aac82f 100644 (file)
@@ -196,6 +196,11 @@ interactive session.  When executing a script with @code{-s} or
 Do not use the debugging VM engine, even when entering an interactive
 session.
 
+@item -q
+Do not the local initialization file, @code{.guile}.  This option only
+has an effect when running interactively; running scripts does not load
+the @code{.guile} file.  @xref{Init File}.
+
 @item --listen[=@var{p}]
 While this program runs, listen on a local port or a path for REPL
 clients.  If @var{p} starts with a number, it is assumed to be a local
index a119d4218fff63a098af943baf20e58f2d0d4107..7995c8c04724bb831389380eb9f9465174b4c087 100644 (file)
@@ -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