a number of doc fixes
[bpt/guile.git] / doc / ref / api-data.texi
index 8153a5d..75e5e68 100755 (executable)
@@ -4,7 +4,6 @@
 @c   Free Software Foundation, Inc.
 @c See the file guile.texi for copying conditions.
 
-@page
 @node Simple Data Types
 @section Simple Generic Data Types
 
@@ -1512,9 +1511,13 @@ through @var{end} (exclusive) bits of @var{n}.  The
 @subsubsection Random Number Generation
 
 Pseudo-random numbers are generated from a random state object, which
-can be created with @code{seed->random-state}.  The @var{state}
-parameter to the various functions below is optional, it defaults to
-the state object in the @code{*random-state*} variable.
+can be created with @code{seed->random-state} or
+@code{datum->random-state}.  An external representation (i.e. one
+which can written with @code{write} and read with @code{read}) of a
+random state object can be obtained via
+@code{random-state->datum}.  The @var{state} parameter to the
+various functions below is optional, it defaults to the state object
+in the @code{*random-state*} variable.
 
 @deffn {Scheme Procedure} copy-random-state [state]
 @deffnx {C Function} scm_copy_random_state (state)
@@ -1583,6 +1586,18 @@ Return a uniformly distributed inexact real random number in
 Return a new random state using @var{seed}.
 @end deffn
 
+@deffn {Scheme Procedure} datum->random-state datum
+@deffnx {C Function} scm_datum_to_random_state (datum)
+Return a new random state from @var{datum}, which should have been
+obtained by @code{random-state->datum}.
+@end deffn
+
+@deffn {Scheme Procedure} random-state->datum state
+@deffnx {C Function} scm_random_state_to_datum (state)
+Return a datum representation of @var{state} that may be written out and
+read back with the Scheme reader.
+@end deffn
+
 @defvar *random-state*
 The global random state used by the above functions when the
 @var{state} parameter is not given.
@@ -1764,17 +1779,9 @@ Characters may also be written using their code point values.  They can
 be written with as an octal number, such as @code{#\10} for
 @code{#\bs} or @code{#\177} for @code{#\del}.
 
-When the @code{r6rs-hex-escapes} reader option is enabled, there is an
-additional syntax for character escapes: @code{#\xHHHH} -- the letter 'x'
-followed by a hexadecimal number of one to eight digits.
-
-@lisp
-(read-enable 'r6rs-hex-escapes)
-@end lisp
-
-Enabling this option will also change the hex escape format for strings.  More
-on string escapes can be found at (@pxref{String Syntax}).  More on reader
-options in general can be found at (@pxref{Reader options}).
+If one prefers hex to octal, there is an additional syntax for character
+escapes: @code{#\xHHHH} -- the letter 'x' followed by a hexadecimal
+number of one to eight digits.
 
 @rnindex char?
 @deffn {Scheme Procedure} char? x
@@ -2699,9 +2706,8 @@ it can be enabled with the reader option @code{r6rs-hex-escapes}.
 (read-enable 'r6rs-hex-escapes)
 @end lisp
 
-Enabling this option will also change the hex escape format for characters.
-More on character escapes can be found at (@pxref{Characters}).  More on
-reader options in general can be found at (@pxref{Reader options}).
+More on reader options in general can be found at (@pxref{Reader
+options}).
 
 @node String Predicates
 @subsubsection String Predicates
@@ -4034,7 +4040,7 @@ or @code{#f} if they are stored in an 8-bit buffer
 @cindex bytevector
 @cindex R6RS
 
-A @dfn{bytevector} is a raw bit string.  The @code{(rnrs bytevector)}
+A @dfn{bytevector} is a raw bit string.  The @code{(rnrs bytevectors)}
 module provides the programming interface specified by the
 @uref{http://www.r6rs.org/, Revised^6 Report on the Algorithmic Language
 Scheme (R6RS)}.  It contains procedures to manipulate bytevectors and
@@ -5860,7 +5866,7 @@ Equivalent to @code{scm_symbol_to_keyword (scm_from_locale_symbol
 @subsection ``Functionality-Centric'' Data Types
 
 Procedures and macros are documented in their own chapter: see
-@ref{Procedures and Macros}.
+@ref{Procedures} and @ref{Macros}.
 
 Variable objects are documented as part of the description of Guile's
 module system: see @ref{Variables}.