0.8.11.4:
[sbcl.git] / doc / manual / beyond-ansi.texinfo
index 084fe32..3a60c57 100644 (file)
@@ -1,4 +1,4 @@
-@node  Beyond The ANSI Standard, The Foreign Function Interface, Efficiency, Top
+@node  Beyond The ANSI Standard
 @comment  node-name,  next,  previous,  up
 @chapter Beyond The ANSI Standard
 
@@ -14,7 +14,7 @@ violates the standard.
 * Extensions::                  
 @end menu
 
-@node Non-Conformance With The ANSI Standard, Idiosyncrasies, Beyond The ANSI Standard, Beyond The ANSI Standard
+@node Non-Conformance With The ANSI Standard
 @comment  node-name,  next,  previous,  up
 @section Non-Conformance With The ANSI Standard
 
@@ -23,11 +23,11 @@ exceptions involve internal inconsistencies in the standard.)  In SBCL
 0.7.6, the master record of known bugs is in the @file{BUGS} file in
 the distribution.  Some highlight information about bugs may also be
 found in the manual page. The recommended way to report bugs is
-through the sbcl-help or sbcl-devel mailings lists.  For mailing list
-addresses, @ref{More SBCL Information}.
+through the sbcl-help or sbcl-devel mailing lists.  For mailing list
+addresses, @xref{More SBCL Information}.
 
 
-@node Idiosyncrasies, Extensions, Non-Conformance With The ANSI Standard, Beyond The ANSI Standard
+@node Idiosyncrasies
 @comment  node-name,  next,  previous,  up
 @section Idiosyncrasies
 
@@ -37,8 +37,8 @@ implementation.
 
 Declarations are generally treated as assertions. This general
 principle, and its implications, and the bugs which still keep the
-compiler from quite satisfying this principle, are discussed in the
-chapter on the compiler, @ref{The Compiler}.
+compiler from quite satisfying this principle, are discussed in
+@ref{The Compiler}.
 
 SBCL is essentially a compiler-only implementation of Common
 Lisp. That is, for all but a few special cases, @code{eval} creates a
@@ -48,6 +48,7 @@ resulting function object. This is explicitly allowed by the ANSI
 standard, but leads to some oddities, e.g. collapsing @code{functionp}
 and @code{compiled-function-p} into the same predicate.
 
+@findex defconstant
 SBCL is quite strict about ANSI's definition of
 @code{defconstant}. ANSI says that doing @code{defconstant} of the
 same symbol more than once is undefined unless the new value is
@@ -57,11 +58,9 @@ weaker test like @code{string=} or @code{equal}. It's especially
 annoying because, in SBCL, @code{defconstant} takes effect not only at
 load time but also at compile time, so that just compiling and loading
 reasonable code like
-
 @lisp
 (defconstant +foobyte+ '(1 4))
 @end lisp
-
 runs into this undefined behavior. Many implementations of Common Lisp
 try to help the programmer around this annoyance by silently accepting
 the undefined code and trying to do what the programmer probably
@@ -82,10 +81,10 @@ e.g.
 @itemize
   
 @item
-@code{defmethod} without @code{defgeneric}
+@code{defmethod} without a preceding @code{defgeneric};
   
 @item
-multiple @code{defun}s of the same symbol
+multiple @code{defun}s of the same symbol in different units;
   
 @item
 special variables not named in the conventional @code{*foo*} style,
@@ -107,13 +106,13 @@ wrapped in @code{eval-when}, and ideally should be suppressed in that
 case, but still isn't as of SBCL 0.7.6.)
 
 
-@node  Extensions,  , Idiosyncrasies, Beyond The ANSI Standard
+@node  Extensions
 @comment  node-name,  next,  previous,  up
 @section Extensions
 
 SBCL is derived from CMUCL, which implements many extensions to the
 ANSI standard. SBCL doesn't support as many extensions as CMUCL, but
-it still has quite a few.
+it still has quite a few.  @xref{Contributed Modules}.
 
 
 @menu
@@ -123,10 +122,11 @@ it still has quite a few.
 * Customization Hooks for Users::  
 * Tools To Help Developers::    
 * Interface To Low-Level SBCL Implementation::  
+* Stale Extensions::            
 * Efficiency Hacks::            
 @end menu
 
-@node  Things Which Might Be In The Next ANSI Standard, Threading, Extensions, Extensions
+@node  Things Which Might Be In The Next ANSI Standard
 @comment  node-name,  next,  previous,  up
 @subsection Things Which Might Be In The Next ANSI Standard
 
@@ -171,7 +171,7 @@ requested order from a user-supplied primary method.
 @end itemize
 
 
-@node  Threading, Support For Unix, Things Which Might Be In The Next ANSI Standard, Extensions
+@node  Threading
 @comment  node-name,  next,  previous,  up
 @subsection Threading (a.k.a Multiprocessing)
 
@@ -286,7 +286,7 @@ Lisp session makes a new POSIX session, so that pressing
 this has been found to be embarrassing.
 
 
-@node  Support For Unix, Customization Hooks for Users, Threading, Extensions
+@node  Support For Unix
 @comment  node-name,  next,  previous,  up
 @subsection Support For Unix
 
@@ -294,69 +294,80 @@ The UNIX command line can be read from the variable
 @code{sb-ext:*posix-argv*}. The UNIX environment can be queried with
 the @code{sb-ext:posix-getenv} function.
 
+@include fun-sb-ext-posix-getenv.texinfo
+
 The SBCL system can be terminated with @code{sb-ext:quit}, (but see
-notes above about threads and sessions) optionally returning a
-specified numeric value to the calling Unix process. The normal Unix
-idiom of terminating on end of file on input is also supported.
+notes in @ref{Threading} about the interaction between this feature and
+sessions) optionally returning a specified numeric value to the
+calling Unix process. The normal Unix idiom of terminating on end of
+file on input is also supported.
 
+@include fun-sb-ext-quit.texinfo
 
-@node  Customization Hooks for Users, Tools To Help Developers, Support For Unix, Extensions
+@node  Customization Hooks for Users
 @comment  node-name,  next,  previous,  up
 @subsection Customization Hooks for Users
 
-The behaviour of @code{require} when called with only one argument is
-implementation-defined.  In SBCL it calls functions on the
-user-settable list @code{sb-ext:*module-provider-functions*} - see the
-@code{require} documentation string for details.
-
 The toplevel repl prompt may be customized, and the function
 that reads user input may be replaced completely.
 @c <!-- FIXME but I don't currently remember how -->
 
+The behaviour of @code{require} when called with only one argument is
+implementation-defined.  In SBCL, @code{require} behaves in the
+following way:
+
+@include fun-common-lisp-require.texinfo
+@include var-sb-ext-star-module-provider-functions-star.texinfo
+
+Although SBCL does not provide a resident editor, the @code{ed}
+function can be customized to hook into user-provided editing
+mechanisms as follows:
+
+@include fun-common-lisp-ed.texinfo
+@include var-sb-ext-star-ed-functions-star.texinfo
 
-@node  Tools To Help Developers, Interface To Low-Level SBCL Implementation, Customization Hooks for Users, Extensions
+@node  Tools To Help Developers
 @comment  node-name,  next,  previous,  up
 @subsection Tools To Help Developers
 
-SBCL provides a profiler and other extensions to the ANSI
-@code{trace} facility. See the online function documentation for
-@code{trace} for more information.
+SBCL provides a profiler and other extensions to the ANSI @code{trace}
+facility.  For more information, see @ref{macro-common-lisp-trace}.
 
 The debugger supports a number of options. Its documentation is
-accessed by typing @kbd{help} at the debugger prompt.
-@c <!-- FIXME:
-@c      A true debugger section in the manual would be good. Start
-@c      with CMU CL's debugger section, but remember:
-@c      * no QUIT command (TOPLEVEL restart instead)
-@c      * no GO command (CONTINUE restart instead)
-@c      * Limitations of the x86 port of the debugger should be 
-@c      documented or fixed where possible.
-@c      * Discuss TRACE and its unification with PROFILE. -->
+accessed by typing @kbd{help} at the debugger prompt.  @xref{The
+Debugger}.
 
 Documentation for @code{inspect} is accessed by typing @kbd{help} at
 the @code{inspect} prompt.
 
-
-@node  Interface To Low-Level SBCL Implementation, Efficiency Hacks, Tools To Help Developers, Extensions
+@node  Interface To Low-Level SBCL Implementation
 @comment  node-name,  next,  previous,  up
 @subsection Interface To Low-Level SBCL Implementation
 
 SBCL has the ability to save its state as a file for later
 execution. This functionality is important for its bootstrapping
-process, and is also provided as an extension to the user. See the
-documentation string for @code{sb-ext:save-lisp-and-die} for more
-information.
+process, and is also provided as an extension to the user.  Note that
+foreign libraries loaded via @code{load-1-foreign} don't survive this
+process; a core should not be saved in this case.
+
+@emph{FIXME: what should be done for foreign libraries?}
+
+@emph{FIXME: document load-1-foreign somewhere}
+
+@include fun-sb-ext-save-lisp-and-die.texinfo
+
 
-@quotation
-Note: SBCL has inherited from CMUCL various hooks to allow the user to
+@node Stale Extensions
+@comment  node-name,  next,  previous,  up
+@subsection Stale Extensions
+
+SBCL has inherited from CMUCL various hooks to allow the user to
 tweak and monitor the garbage collection process. These are somewhat
 stale code, and their interface might need to be cleaned up. If you
 have urgent need of them, look at the code in @file{src/code/gc.lisp}
 and bring it up on the developers' mailing list.
-@end quotation
 
-@quotation
-Note: SBCL has various hooks inherited from CMUCL, like
+SBCL has various hooks inherited from CMUCL, like
 @code{sb-ext:float-denormalized-p}, to allow a program to take
 advantage of IEEE floating point arithmetic properties which aren't
 conveniently or efficiently expressible using the ANSI standard. These
@@ -366,10 +377,9 @@ infinities (because it wasn't in the ANSI spec and it didn't occur to
 me that it was in the IEEE spec). If you need this stuff, take a look
 at the code and bring it up on the developers' mailing
 list.
-@end quotation
 
 
-@node  Efficiency Hacks,  , Interface To Low-Level SBCL Implementation, Extensions
+@node  Efficiency Hacks
 @comment  node-name,  next,  previous,  up
 @subsection Efficiency Hacks
 
@@ -384,9 +394,13 @@ addresses, a precondition for using copy-on-write to share code
 between multiple Lisp processes. it is less important with modern
 generational garbage collectors.
 
-@code{sb-ext:truly-the} declaration declares the type of the result of
-the operations, producing its argument; the declaration is not
-checked. In short: don't use it.
+@include fun-sb-ext-purify.texinfo
+
+The @code{sb-ext:truly-the} special form declares the type of the
+result of the operations, producing its argument; the declaration is
+not checked. In short: don't use it.
+
+@include special-operator-sb-ext-truly-the.texinfo
 
 The @code{sb-ext:freeze-type} declaration declares that a
 type will never change, which can make type testing