export *USERINIT-PATHNAME-FUNCTION* and *SYSINIT-PATHNAME-FUNCTION*
authorNikodemus Siivola <nikodemus@sb-studio.net>
Fri, 10 Jun 2011 17:19:37 +0000 (20:19 +0300)
committerNikodemus Siivola <nikodemus@sb-studio.net>
Fri, 10 Jun 2011 17:19:37 +0000 (20:19 +0300)
  I have no idea why I didn't do that in the first place.

NEWS
doc/manual/start-stop.texinfo
package-data-list.lisp-expr
src/code/toplevel.lisp

diff --git a/NEWS b/NEWS
index 9221aa1..5e912b3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,9 @@
 changes relative to sbcl-1.0.49:
   * enhancement: errors from FD handlers now provide a restart to remove
     the offending handler.
+  * enhancement: location of user or system initialization file can now easily
+    be customized for saved cores. See: SB-EXT:*USERINIT-PATHNAME-FUNCTION*
+    and SB-EXT:*SYSINIT-PATHNAME-FUNCTION*.
   * bug fix: bound derivation for floating point operations is now more
     careful about rounding possibly closing open bounds. (lp#793771)
   * bug fix: SB-POSIX:SYSCALL-ERROR's argument is now optional. (accidental
index 362ad40..f97aef4 100644 (file)
@@ -132,6 +132,13 @@ process, and is also provided as an extension to the user.
 @include fun-sb-ext-save-lisp-and-die.texinfo
 @include var-sb-ext-star-save-hooks-star.texinfo
 
+In cases where the standard initialization files have already been loaded
+into the saved core, and alternative ones should be used (or none at all),
+SBCL allows customizing the initfile pathname computation.
+
+@include var-sb-ext-star-sysinit-pathname-function-star.texinfo
+@include var-sb-ext-star-userinit-pathname-function-star.texinfo
+
 To facilitate distribution of SBCL applications using external
 resources, the filesystem location of the SBCL core file being used is
 available from Lisp.
index 80a6f61..92395f4 100644 (file)
@@ -580,11 +580,15 @@ like *STACK-TOP-HINT* and unsupported stuff like *TRACED-FUN-LIST*."
       :name "SB!EXT"
       :doc "public: miscellaneous supported extensions to the ANSI Lisp spec"
       :use ("CL" "SB!ALIEN" "SB!INT" "SB!SYS" "SB!GRAY")
-      :export ( ;; Information about how the program was invoked is
+      :export (;; Information about how the program was invoked is
                ;; nonstandard but very useful.
                "*POSIX-ARGV*" "*CORE-PATHNAME*" "*RUNTIME-PATHNAME*"
                "POSIX-GETENV" "POSIX-ENVIRON"
 
+               ;; Customizing initfile locations
+               "*USERINIT-PATHNAME-FUNCTION*"
+               "*SYSINIT-PATHNAME-FUNCTION*"
+
                ;; Atomic operations and types related to them
                "COMPARE-AND-SWAP"
                "ATOMIC-INCF"
index c9986bf..05445b9 100644 (file)
 
 (defvar *sysinit-pathname-function* #'sysinit-pathname
   #!+sb-doc
-  "Designator for a function of zero arguments called to obtain a pathname
-designator for the default sysinit file, or NIL. If the function returns NIL,
-no sysinit file is used unless one has been specified on the command-line.")
+  "Designator for a function of zero arguments called to obtain a
+pathname designator for the default sysinit file, or NIL. If the
+function returns NIL, no sysinit file is used unless one has been
+specified on the command-line.")
 
 (defvar *userinit-pathname-function* #'userinit-pathname
   #!+sb-doc
-  "Designator for a function of zero arguments called to obtain a pathname
-designator or a stream for the default userinit file, or NIL. If the function
-returns NIL, no userinit file is used unless one has been specified on the
-command-line.")
+  "Designator for a function of zero arguments called to obtain a
+pathname designator or a stream for the default userinit file, or NIL.
+If the function returns NIL, no userinit file is used unless one has
+been specified on the command-line.")
 
 \f
 ;;;; miscellaneous utilities for working with with TOPLEVEL