~ chicken-core (chicken-5) ab2c7c2b62eee3dc047a7dfa809dd97abfe29aa9


commit ab2c7c2b62eee3dc047a7dfa809dd97abfe29aa9
Author:     Peter Bex <peter@more-magic.net>
AuthorDate: Sun Jan 5 19:31:16 2020 +0100
Commit:     Peter Bex <peter@more-magic.net>
CommitDate: Sun Jan 5 19:31:16 2020 +0100

    Sync manual from wiki

diff --git a/manual/Egg specification format b/manual/Egg specification format
index f35398ba..9eabfd2c 100644
--- a/manual/Egg specification format	
+++ b/manual/Egg specification format	
@@ -105,7 +105,7 @@ are {{(not PLATFORM)}}, {{(or PLATFORM ...)}} and {{(and PLATFORM ...)}}.
 If the expression can not be satisfied, then installation of this
 egg will abort.
 
-===== distribution-files
+==== distribution-files
 
  [egg property] (distribution-files FILE ...)
 
diff --git a/manual/Extensions b/manual/Extensions
index 40c9b30c..babee17d 100644
--- a/manual/Extensions
+++ b/manual/Extensions
@@ -151,7 +151,7 @@ Here we create a simple application:
 
 <enscript highlight=scheme>
 ;;;; hello2.scm
-
+(import scheme chicken.format chicken.process-context)
 (print "Hello, ")
 (for-each (lambda (x) (printf "~A " x)) (command-line-arguments))
 (print "!")
diff --git a/manual/Foreign type specifiers b/manual/Foreign type specifiers
index ad4048dd..6a9ac462 100644
--- a/manual/Foreign type specifiers	
+++ b/manual/Foreign type specifiers	
@@ -214,7 +214,7 @@ value will raise an exception.
 <type>nonnull-f32vector</type><br>
 <type>nonnull-f64vector</type><br>
 
-A [[Unit srfi-4|SRFI-4]] number-vector object, passed as a pointer to its contents.
+A [[Module srfi-4|SRFI-4]] number-vector object, passed as a pointer to its contents.
 These are allowed only as argument types, not as return types.
 
 The value {{#f}} is also allowed and is passed to C as a NULL pointer.
@@ -242,7 +242,7 @@ e.g. via {{(address->pointer 0)}}.)
 <type>pointer-vector</type><br>
 <type>nonnull-pointer-vector</type>
 
-A vector of foreign pointer objects; see [[Unit lolevel#Pointer vectors|Pointer vectors]].
+A vector of foreign pointer objects; see [[Module (chicken memory)#pointer-vectors|Pointer vectors]].
 Permitted only as an argument type, not as return type.  This type was introduced in CHICKEN 4.6.3.
 
 A pointer vector contains a C array of void pointers, and the argument
diff --git a/manual/Getting started b/manual/Getting started
index 1dbf19a5..d2b6bee7 100644
--- a/manual/Getting started	
+++ b/manual/Getting started	
@@ -218,7 +218,7 @@ for information about how to obtain them.
 The simplest development environment is a text editor and terminal
 window (Windows: Command Prompt, OSX: Terminal, Linux/Unix: xterm) for
 using the interpreter and/or invoking the compiler.  If you install one
-of the line editing extensions (e.g., [[/egg/readline|readline]],
+of the line editing extensions (e.g., [[/egg/breadline|breadline]],
 [[/egg/parley|parley]], [[/egg/linenoise|linenoise]]), you have some
 useful command line editing features in the interpreter (e.g., Emacs
 or vi-compatible line editing, customization).
diff --git a/manual/Module (chicken base) b/manual/Module (chicken base)
index 54707d3e..fd86d8f6 100644
--- a/manual/Module (chicken base)	
+++ b/manual/Module (chicken base)	
@@ -1095,6 +1095,12 @@ interpreted.
 
 === Conditional forms
 
+==== select
+
+<macro>(select EXP ((KEY ...) EXP1 ...) ... [(else EXPn ...)])</macro>
+
+This is similar to {{case}}, but the keys are evaluated.
+
 ==== unless
 
 <macro>(unless TEST EXP1 EXP2 ...)</macro>
@@ -1441,9 +1447,9 @@ Any other value disables the alternative syntaxes.  In the interpreter
 the default is {{#:suffix}}.
 
 
-==== parenthesis-synonyms
+==== parentheses-synonyms
 
-<parameter>(parenthesis-synonyms)</parameter>
+<parameter>(parentheses-synonyms)</parameter>
 
 If true, then the list delimiter synonyms {{#\[}} {{#\]}} and {{#\{}} {{#\}}} are enabled. Defaults to {{#t}}.
 
diff --git a/manual/Module (chicken foreign) b/manual/Module (chicken foreign)
index 87551e40..e434a41f 100644
--- a/manual/Module (chicken foreign)	
+++ b/manual/Module (chicken foreign)	
@@ -336,7 +336,7 @@ is essentially equivalent to
 
  (make-locative X)
 
-(See the [[Unit lolevel#locatives|manual section on locatives]] for more
+(See the [[Module (chicken locative)|manual section on locatives]] for more
 information about locatives)
 
 Note that {{(location X)}} may be abbreviated as {{#$X}}.
diff --git a/manual/Module (chicken irregex) b/manual/Module (chicken irregex)
index 82061397..e09e3c37 100644
--- a/manual/Module (chicken irregex)	
+++ b/manual/Module (chicken irregex)	
@@ -184,6 +184,8 @@ Fetches the matched substring (or its start or end offset) at the
 given submatch index, or named submatch.  The entire match is index 0,
 the first 1, etc.  The default is index 0.
 
+Returns {{#f}} if the given submatch did not match the source string (can happen when you have the submatch inside an {{or}} alternative, for example).
+
 ==== irregex-match-subchunk
 ==== irregex-match-start-chunk
 ==== irregex-match-end-chunk
@@ -199,6 +201,8 @@ match item, of the same type as the underlying chunk type (see Chunked
 String Matching below).  This is only available if the chunk type
 specifies the get-subchunk API, otherwise an error is raised.
 
+Returns {{#f}} if the given submatch did not match the source string (can happen when you have the submatch inside an {{or}} alternative, for example).
+
 ==== irregex-replace
 ==== irregex-replace/all
 
diff --git a/manual/Module (chicken random) b/manual/Module (chicken random)
index e86fe481..64e8c19b 100644
--- a/manual/Module (chicken random)	
+++ b/manual/Module (chicken random)	
@@ -11,7 +11,7 @@ On Linux, the {{getrandom(2)}} system call is used instead, if available.
 On OpenBSD it is {{arc4random_buf(3)}}, on Windows {{RtlGenRandom}}.
 
 The pseudo random number generator is an implementation of the
-[[https://en.wikipedia.org/wiki/Well_equidistributed_long-period_linear]] algorithm.
+[[https://en.wikipedia.org/wiki/Well_equidistributed_long-period_linear|WELL]] algorithm.
 
 ==== set-pseudo-random-seed!
 
diff --git a/manual/Types b/manual/Types
index 89d534d6..921ec65d 100644
--- a/manual/Types
+++ b/manual/Types
@@ -5,7 +5,7 @@
 === Types
 
 A dynamically typed language like Scheme does not restrict the type of
-values bound or assigned to variables to be constant troughout the
+values bound or assigned to variables to be constant throughout the
 run-time of a program. This provides a lot of flexibility and makes it
 easy to get code up and running quickly, but can make maintenance of
 larger code bases more difficult as the implicit assignment of types
diff --git a/manual/Using the compiler b/manual/Using the compiler
index 9b096153..fd656362 100644
--- a/manual/Using the compiler	
+++ b/manual/Using the compiler	
@@ -195,7 +195,7 @@ by the startup code and will not be contained in the result of
 
 ; {{-:aNUMBER}} : Specifies the length of the buffer for recording a trace of the last invoked procedures. Defaults to 16.
 
-; {{-:ANUMBER}} : Specifies fixed ''temporary stack'' size. This is used mostly for {{apply}}. If you supply a zero size (the default), the temorary stack will be dynamically reallocated as needed.
+; {{-:ANUMBER}} : Specifies fixed ''temporary stack'' size. This is used mostly for {{apply}}. If you supply a zero size (the default), the temporary stack will be dynamically reallocated as needed.
 
 ; {{-:b}} : Enter a read-eval-print-loop when an error is encountered.
 
diff --git a/manual/Using the interpreter b/manual/Using the interpreter
index 2709a8f9..d70fdf23 100644
--- a/manual/Using the interpreter	
+++ b/manual/Using the interpreter	
@@ -16,6 +16,7 @@ The easiest way is to use the {{-script}} option like this:
 
  % cat foo
  #! /usr/local/bin/csi -script
+ (import (chicken process-context))
  (print (eval (with-input-from-string
                  (car (command-line-arguments))
                   read)))
@@ -34,6 +35,7 @@ this on Windows:
 
  C:>type foo.bat
  @;csibatch %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
+ (import (chicken process-context))
  (print (eval (with-input-from-string
                  (car (command-line-arguments))
                  read)))
@@ -72,6 +74,7 @@ executed as a script or normally loaded into the interpreter, say for debugging
 #| demonstrates a slightly different way to run a script on UNIX systems
 exec csi -s "$0" "$@"
 |#
+(import (chicken process-context))
 
 (define (main args) ...)
 
Trap