Merge commit '495cea0c931de23f074892b3f32808e676712a18'
[bpt/guile.git] / doc / ref / scheme-using.texi
index 07096bb..4422c18 100644 (file)
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Guile Reference Manual.
-@c Copyright (C) 2006, 2010, 2011
+@c Copyright (C) 2006, 2010, 2011, 2012, 2013
 @c   Free Software Foundation, Inc.
 @c See the file guile.texi for copying conditions.
 
@@ -125,7 +125,7 @@ The programmatic interface to value history is in a module:
 @end lisp
 
 @deffn {Scheme Procedure} value-history-enabled?
-Return true iff value history is enabled.
+Return true if value history is enabled, or false otherwise.
 @end deffn
 
 @deffn {Scheme Procedure} enable-value-history!
@@ -230,7 +230,7 @@ Show description/documentation.
 Change modules / Show current module.
 @end deffn
 
-@deffn {REPL Command} import [module ...]
+@deffn {REPL Command} import module @dots{}
 Import modules / List those imported.
 @end deffn
 
@@ -247,7 +247,7 @@ List current bindings.
 @end deffn
 
 @deffn {REPL Command} in module expression
-@deffnx {REPL Command} in module command [args ...]
+@deffnx {REPL Command} in module command arg @dots{}
 Evaluate an expression, or alternatively, execute another meta-command
 in the context of a module.  For example, @samp{,in (foo bar) ,binding}
 will show the bindings in the module @code{(foo bar)}.
@@ -298,8 +298,13 @@ Time execution.
 Profile execution.
 @end deffn
 
-@deffn {REPL Command} trace exp
+@deffn {REPL Command} trace exp [#:width w] [#:max-indent i]
 Trace execution.
+
+By default, the trace will limit its width to the width of your
+terminal, or @var{width} if specified.  Nested procedure invocations
+will be printed farther to the right, though if the width of the
+indentation passes the @var{max-indent}, the indentation is abbreviated.
 @end deffn
 
 @node Debug Commands
@@ -311,7 +316,7 @@ they do not work at the top level.
 @deffn {REPL Command} backtrace [count] [#:width w] [#:full? f]
 Print a backtrace.
 
-Print a backtrace of all stack frames, or innermost @var{COUNT} frames.
+Print a backtrace of all stack frames, or innermost @var{count} frames.
 If @var{count} is negative, the last @var{count} frames will be shown.
 @end deffn
 
@@ -406,11 +411,11 @@ reenter the REPL.
 @node Inspect Commands
 @subsubsection Inspect Commands
 
-@deffn {REPL Command} inspect EXP
+@deffn {REPL Command} inspect exp
 Inspect the result(s) of evaluating @var{exp}.
 @end deffn
 
-@deffn {REPL Command} pretty-print EXP
+@deffn {REPL Command} pretty-print exp
 Pretty-print the result(s) of evaluating @var{exp}.
 @end deffn
 
@@ -425,8 +430,11 @@ Garbage collection.
 Display statistics.
 @end deffn
 
-@deffn {REPL Command} option [key value]
-List/show/set options.
+@deffn {REPL Command} option [name] [exp]
+With no arguments, lists all options.  With one argument, shows the
+current value of the @var{name} option.  With two arguments, sets the
+@var{name} option to the result of evaluating the Scheme expression
+@var{exp}.
 @end deffn
 
 @deffn {REPL Command} quit
@@ -445,6 +453,10 @@ choice is available.  Off by default (indicating compilation).
 @item prompt
 A customized REPL prompt.  @code{#f} by default, indicating the default
 prompt.
+@item print
+A procedure of two arguments used to print the result of evaluating each
+expression.  The arguments are the current REPL and the value to print.
+By default, @code{#f}, to use the default procedure.
 @item value-history
 Whether value history is on or not.  @xref{Value History}.
 @item on-error
@@ -457,7 +469,7 @@ show a short error printout.
 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
+@deffn {Scheme Procedure} repl-default-option-set! 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
@@ -740,6 +752,7 @@ list}, or simply @code{guild}.
 @cindex site path
 @cindex load path
 @findex %site-dir
+@findex %site-ccache-dir
 
 At some point, you will probably want to share your code with other
 people.  To do so effectively, it is important to follow a set of common
@@ -771,16 +784,17 @@ find them.
 As with Scheme files, Guile searches a path to find compiled @code{.go}
 files, the @code{%load-compiled-path}.  By default, this path has two
 entries: a path for Guile's files, and a path for site packages.  You
-should install your @code{.go} files into the latter.  Currently there
-is no procedure to get at this path, which is probably a bug.  As in the
-previous example, if Guile @value{EFFECTIVE-VERSION} is installed on
-your system in @code{/usr/}, then the place to put compiled files for
-site packages will be
+should install your @code{.go} files into the latter directory, whose
+value is returned by invoking the @code{%site-ccache-dir} procedure.  As
+in the previous example, if Guile @value{EFFECTIVE-VERSION} is installed
+on your system in @code{/usr/}, then @code{(%site-ccache-dir)} site
+packages will be
 @code{/usr/lib/guile/@value{EFFECTIVE-VERSION}/site-ccache}.
 
 Note that a @code{.go} file will only be loaded in preference to a
 @code{.scm} file if it is newer.  For that reason, you should install
-your Scheme files first, and your compiled files second.
+your Scheme files first, and your compiled files second.  @code{Load
+Paths}, for more on the loading process.
 
 Finally, although this section is only about Scheme, sometimes you need
 to install C extensions too.  Shared libraries should be installed in