guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-142-g94906


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-142-g94906b7
Date: Thu, 30 Jun 2011 12:02:59 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=94906b754120343f1e767d2feadc2be5666c70ed

The branch, stable-2.0 has been updated
       via  94906b754120343f1e767d2feadc2be5666c70ed (commit)
       via  dcada7d8e7f295906983fc762080b5b8de2a209e (commit)
       via  08969a24079bd73582308dc8e8df0ff7c572f0c6 (commit)
       via  1fa542989ab949b34fcc8f58c8b37e0f20725708 (commit)
      from  ccb80964cd7cd112e300c34d32f67125a6d6da9a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 94906b754120343f1e767d2feadc2be5666c70ed
Author: Mark Harig <address@hidden>
Date:   Mon Apr 25 11:33:22 2011 -0400

    better invocation documentation
    
    * doc/ref/guile.texi (Programming in Scheme):
    * doc/ref/scheme-scripts.texi (Guile Scripting): Moved "Invoking Guile"
      to its own file.
    
    * doc/ref/guile-invoke.texi (Invoking Guile): Initial revision. This
      file contains the former section "Invoking Guile" that was included in
      the chapter "Programming in Scheme" as a subsection named
      "Command-line Options." It also includes a new subsection "Environment
      Variables," which describes those variables that can be set in the
      operating system before Guile is started and which affect Guile's
      run-time behavior.

commit dcada7d8e7f295906983fc762080b5b8de2a209e
Author: Andy Wingo <address@hidden>
Date:   Thu Jun 30 12:56:12 2011 +0200

    %load-hook not just for primitive-load
    
    * libguile/load.c (scm_primitive_load_path):
    * module/ice-9/boot-9.scm (load-in-vicinity): Call %load-hook as needed.

commit 08969a24079bd73582308dc8e8df0ff7c572f0c6
Author: Andy Wingo <address@hidden>
Date:   Thu Jun 30 12:26:31 2011 +0200

    fix --disable-modules build
    
    * configure.ac (HAVE_MODULES): Define HAVE_MODULES iff
      --enable-modules.
    
    * libguile/deprecated.c (scm_dynamic_args_call)
    * libguile/extensions.c (load_extension):
    * libguile/init.c (scm_i_init_guile): Use HAVE_MODULES in a few places.

commit 1fa542989ab949b34fcc8f58c8b37e0f20725708
Author: Andy Wingo <address@hidden>
Date:   Thu Jun 30 11:32:09 2011 +0200

    HAVE_POSIX warning fix
    
    * libguile/filesys.c (scm_dir_free, scm_dir_print): Don't compile when
      not HAVE_POSIX.

-----------------------------------------------------------------------

Summary of changes:
 configure.ac                |    2 +
 doc/ref/guile-invoke.texi   |  355 +++++++++++++++++++++++++++++++++++++++++++
 doc/ref/guile.texi          |   10 +-
 doc/ref/scheme-scripts.texi |  173 ---------------------
 libguile/deprecated.c       |   10 +-
 libguile/extensions.c       |    8 +-
 libguile/filesys.c          |    2 +
 libguile/init.c             |    2 +
 libguile/load.c             |    9 +
 module/ice-9/boot-9.scm     |    5 +-
 10 files changed, 396 insertions(+), 180 deletions(-)
 create mode 100644 doc/ref/guile-invoke.texi

diff --git a/configure.ac b/configure.ac
index 890557b..cf31cfe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -234,6 +234,8 @@ dnl files which are destined for separate modules.
 
 if test "$use_modules" != no; then
    AC_LIBOBJ([dynl])
+   AC_DEFINE([HAVE_MODULES], 1,
+     [Define this if you want support for dynamically loaded modules in 
Guile.])
 fi
 
 if test "$enable_posix" = yes; then
diff --git a/doc/ref/guile-invoke.texi b/doc/ref/guile-invoke.texi
new file mode 100644
index 0000000..9379a8b
--- /dev/null
+++ b/doc/ref/guile-invoke.texi
@@ -0,0 +1,355 @@
address@hidden -*-texinfo-*-
address@hidden This is part of the GNU Guile Reference Manual.
address@hidden Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 
2010, 2011
address@hidden   Free Software Foundation, Inc.
address@hidden See the file guile.texi for copying conditions.
+
address@hidden Invoking Guile
address@hidden Invoking Guile
address@hidden invocation
+
+Many features of Guile depend on and can be changed by information that
+the user provides either before or when Guile is started.  Below is a
+description of what information to provide and how to provide it.
+
address@hidden
+* Command-line Options::        Command-line options understood by Guile.
+* Environment Variables::       Variables that affect Guile's behavior.
address@hidden menu
+
address@hidden Command-line Options
address@hidden Command-line Options
address@hidden Command-line Options
address@hidden command-line arguments
address@hidden arguments (command line)
address@hidden options (command line)
address@hidden switches (command line)
address@hidden startup (command-line arguments)
address@hidden invocation (command-line arguments)
+
+Here we describe Guile's command-line processing in detail.  Guile
+processes its arguments from left to right, recognizing the switches
+described below.  For examples, see @ref{Scripting Examples}.
+
address@hidden @code
+
address@hidden @var{script} @var{arg...}
address@hidden -s @var{script} @var{arg...}
address@hidden script mode
+By default, Guile will read a file named on the command line as a
+script.  Any command-line arguments @var{arg...} following @var{script}
+become the script's arguments; the @code{command-line} function returns
+a list of strings of the form @code{(@var{script} @var{arg...})}.
+
+It is possible to name a file using a leading hyphen, for example,
address@hidden  In this case, the file name must be preceded by
address@hidden to tell Guile that a (script) file is being named.
+
+Scripts are read and evaluated as Scheme source code just as the
address@hidden function would.  After loading @var{script}, Guile exits.
+
address@hidden -c @var{expr} @var{arg...}
address@hidden evaluate expression, command-line argument
+Evaluate @var{expr} as Scheme code, and then exit.  Any command-line
+arguments @var{arg...} following @var{expr} become command-line
+arguments; the @code{command-line} function returns a list of strings of
+the form @code{(@var{guile} @var{arg...})}, where @var{guile} is the
+path of the Guile executable.
+
address@hidden -- @var{arg...}
+Run interactively, prompting the user for expressions and evaluating
+them.  Any command-line arguments @var{arg...} following the @option{--}
+become command-line arguments for the interactive session; the
address@hidden function returns a list of strings of the form
address@hidden(@var{guile} @var{arg...})}, where @var{guile} is the path of the
+Guile executable.
+
address@hidden -L @var{directory}
+Add @var{directory} to the front of Guile's module load path.  The given
+directories are searched in the order given on the command line and
+before any directories in the @env{GUILE_LOAD_PATH} environment
+variable.  Paths added here are @emph{not} in effect during execution of
+the user's @file{.guile} file.
+
address@hidden -x @var{extension}
+Add @var{extension} to the front of Guile's load extension list
+(@pxref{Loading, @code{%load-extensions}}).  The specified extensions
+are tried in the order given on the command line, and before the default
+load extensions.  Extensions added here are @emph{not} in effect during
+execution of the user's @file{.guile} file.
+
address@hidden -l @var{file}
+Load Scheme source code from @var{file}, and continue processing the
+command line.
+
address@hidden -e @var{function}
+Make @var{function} the @dfn{entry point} of the script.  After loading
+the script file (with @option{-s}) or evaluating the expression (with
address@hidden), apply @var{function} to a list containing the program name
+and the command-line arguments---the list provided by the
address@hidden function.
+
+A @option{-e} switch can appear anywhere in the argument list, but Guile
+always invokes the @var{function} as the @emph{last} action it performs.
+This is weird, but because of the way script invocation works under
+POSIX, the @option{-s} option must always come last in the list.
+
+The @var{function} is most often a simple symbol that names a function
+that is defined in the script.  It can also be of the form @code{(@@
address@hidden @var{symbol})}, and in that case, the symbol is
+looked up in the module named @var{module-name}.
+
+For compatibility with some versions of Guile 1.4, you can also use the
+form @code{(symbol ...)} (that is, a list of only symbols that doesn't
+start with @code{@@}), which is equivalent to @code{(@@ (symbol ...)
+main)}, or @code{(symbol ...)  symbol} (that is, a list of only symbols
+followed by a symbol), which is equivalent to @code{(@@ (symbol ...)
+symbol)}.  We recommend to use the equivalent forms directly since they
+correspond to the @code{(@@ ...)}  read syntax that can be used in
+normal code.  See @ref{Using Guile Modules} and @ref{Scripting
+Examples}.
+
address@hidden -ds
+Treat a final @option{-s} option as if it occurred at this point in the
+command line; load the script here.
+
+This switch is necessary because, although the POSIX script invocation
+mechanism effectively requires the @option{-s} option to appear last, the
+programmer may well want to run the script before other actions
+requested on the command line.  For examples, see @ref{Scripting
+Examples}.
+
address@hidden \
+Read more command-line arguments, starting from the second line of the
+script file.  @xref{The Meta Switch}.
+
address@hidden address@hidden
address@hidden loading srfi modules (command line)
+The option @option{--use-srfi} expects a comma-separated list of numbers,
+each representing a SRFI module to be loaded into the interpreter
+before evaluating a script file or starting the REPL.  Additionally,
+the feature identifier for the loaded SRFIs is recognized by
+the procedure @code{cond-expand} when this option is used.
+
+Here is an example that loads the modules SRFI-8 ('receive') and SRFI-13
+('string library') before the GUILE interpreter is started:
+
address@hidden
+guile --use-srfi=8,13
address@hidden example
+
address@hidden --debug
address@hidden debugging virtual machine (command line)
+Start with the debugging virtual machine (VM) engine.  Using the
+debugging VM will enable support for VM hooks, which are needed for
+tracing, breakpoints, and accurate call counts when profiling.  The
+debugging VM is slower than the regular VM, though, by about ten
+percent.  @xref{VM Hooks}, for more information.
+
+By default, the debugging VM engine is only used when entering an
+interactive session.  When executing a script with @option{-s} or
address@hidden, the normal, faster VM is used by default.
+
address@hidden
address@hidden --no-debug
address@hidden debugging virtual machine (command line)
+Do not use the debugging VM engine, even when entering an interactive
+session.
+
address@hidden -q
address@hidden init file, not loading
address@hidden @file{.guile} file, not loading
+Do not load the initialization file, @file{.guile}.  This option only
+has an effect when running interactively; running scripts does not load
+the @file{.guile} file.  @xref{Init File}.
+
address@hidden address@hidden
+While this program runs, listen on a local port or a path for REPL
+clients.  If @var{p} starts with a number, it is assumed to be a local
+port on which to listen.  If it starts with a forward slash, it is
+assumed to be a path to a UNIX domain socket on which to listen.
+
+If @var{p} is not given, the default is local port 37146.  If you look
+at it upside down, it almost spells ``Guile''.  If you have netcat
+installed, you should be able to @kbd{nc localhost 37146} and get a
+Guile prompt.  Alternately you can fire up Emacs and connect to the
+process; see @ref{Using Guile in Emacs} for more details.
+
+Note that opening a port allows anyone who can connect to that port---in
+the TCP case, any local user---to do anything Guile can do, as the user
+that the Guile process is running as.  Do not use @option{--listen} on
+multi-user machines.  Of course, if you do not pass @option{--listen} to
+Guile, no port will be opened.
+
+That said, @option{--listen} is great for interactive debugging and
+development.
+
address@hidden
+
address@hidden --auto-compile
+Compile source files automatically (default behavior).
+
address@hidden
+
address@hidden --fresh-auto-compile
+Treat the auto-compilation cache as invalid, forcing recompilation.
+
address@hidden
+
address@hidden --no-auto-compile
+Disable automatic source file compilation.
+
address@hidden
+
address@hidden address@hidden, }--help
+Display help on invoking Guile, and then exit.
+
address@hidden address@hidden, }--version
+Display the current version of Guile, and then exit.
+
address@hidden table
+
address@hidden Environment Variables
address@hidden Environment Variables
address@hidden environment variables
address@hidden shell
address@hidden initialization
+The @dfn{environment} is a feature of the operating system; it consists
+of a collection of variables with names and values.  Each variable is
+called an @dfn{environment variable} (or, sometimes, a ``shell
+variable''); environment variable names are case-sensitive, and it is
+conventional to use upper-case letters only.  The values are all text
+strings, even those that are written as numerals.  (Note that here we
+are referring to names and values that are defined in the operating
+system shell from which Guile is invoked.  This is not the same as a
+Scheme environment that is defined within a running instance of Guile.
+For a description of Scheme environments, @pxref{About Environments}.)
+   
+How to set environment variables before starting Guile depends on the
+operating system and, especially, the shell that you are using.  For
+example, here is how to tell Guile to provide detailed warning messages
+about deprecated features by setting @env{GUILE_WARN_DEPRECATED} using
+Bash:
+
address@hidden
+$ export GUILE_WARN_DEPRECATED="detailed"
+$ guile
address@hidden example
+
address@hidden
+Or, detailed warnings can be turned on for a single invocation using:
+
address@hidden
+$ env GUILE_WARN_DEPRECATED="detailed" guile
address@hidden example
+
+If you wish to retrieve or change the value of the shell environment
+variables that affect the run-time behavior of Guile from within a
+running instance of Guile, see @ref{Runtime Environment}.
+
+Here are the environment variables that affect the run-time behavior of
+Guile:
+
address@hidden @env
address@hidden GUILE_AUTO_COMPILE
address@hidden GUILE_AUTO_COMPILE
+This is a flag that can be used to tell Guile whether or not to compile
+Scheme source files automatically.  Starting with Guile 2.0, Scheme
+source files will be compiled automatically, by default.
+
+If a compiled (@file{.go}) file corresponding to a @file{.scm} file is
+not found or is not newer than the @file{.scm} file, the @file{.scm}
+file will be compiled on the fly, and the resulting @file{.go} file
+stored away.  An advisory note will be printed on the console.
+
+Compiled files will be stored in the directory
address@hidden/@/guile/@/ccache}, where @env{XDG_CACHE_HOME}
+defaults to the directory @file{$HOME/.cache}.  This directory will be
+created if it does not already exist.
+
+Note that this mechanism depends on the timestamp of the @file{.go} file
+being newer than that of the @file{.scm} file; if the @file{.scm} or
address@hidden files are moved after installation, care should be taken to
+preserve their original timestamps.
+
+Set @env{GUILE_AUTO_COMPILE} to zero (0), to prevent Scheme files from
+being compiled automatically.  Set this variable to ``fresh'' to tell
+Guile to compile Scheme files whether they are newer than the compiled
+files or not.
+
address@hidden
+
address@hidden GUILE_HISTORY
address@hidden GUILE_HISTORY
+This variable names the file that holds the Guile REPL command history.
+You can specify a different history file by setting this environment
+variable.  By default, the history file is @file{$HOME/.guile_history}.
+
address@hidden GUILE_LOAD_COMPILED_PATH
address@hidden GUILE_LOAD_COMPILED_PATH
+This variable may be used to augment the path that is searched for
+compiled Scheme files (@file{.go} files) when loading.  Its value should
+be a colon-separated list of directories, which will be prefixed to the
+value of the default search path stored in @code{%load-compiled-path}.
+
+Here is an example using the Bash shell that adds the current directory,
address@hidden, and the relative directory @file{../my-library} to
address@hidden:
+
address@hidden
+$ export GUILE_LOAD_COMPILED_PATH=".:../my-library"
+$ guile -c '(display %load-compiled-path) (newline)'
+(. ../my-library /usr/local/lib/guile/2.0/ccache)
address@hidden example
+
address@hidden GUILE_LOAD_PATH
address@hidden GUILE_LOAD_PATH
+This variable may be used to augment the path that is searched for
+Scheme files when loading.  Its value should be a colon-separated list
+of directories, which will be prefixed to the value of the default
+search path stored in @code{%load-path}.
+
+Here is an example using the Bash shell that adds the current directory
+and the parent of the current directory to @code{%load-path}:
+
address@hidden
+$ env GUILE_LOAD_PATH=".:.." \
+guile -c '(display %load-path) (newline)'
+(. .. /usr/local/share/guile/2.0 \
+/usr/local/share/guile/site/2.0 \
+/usr/local/share/guile/site /usr/local/share/guile)
address@hidden example
+
+(Note: The line breaks, above, are for documentation purposes only, and
+not required in the actual example.)
+
address@hidden GUILE_WARN_DEPRECATED
address@hidden GUILE_WARN_DEPRECATED
+As Guile evolves, some features will be eliminated or replaced by newer
+features.  To help users migrate their code as this evolution occurs,
+Guile will issue warning messages about code that uses features that
+have been marked for eventual elimination.  @env{GUILE_WARN_DEPRECATED}
+can be set to ``no'' to tell Guile not to display these warning
+messages, or set to ``detailed'' to tell Guile to display more lengthy
+messages describing the warning.  @xref{Deprecation}.
+
address@hidden HOME
address@hidden HOME
+Guile uses the environment variable @env{HOME}, the name of your home
+directory, to locate various files, such as @file{.guile} or
address@hidden
+
address@hidden LTDL_LIBRARY_PATH
address@hidden LTDL_LIBRARY_PATH
+Guile now adds its install prefix to the @env{LTDL_LIBRARY_PATH}.
+
+Users may now install Guile in non-standard directories and run
+`/path/to/bin/guile', without having also to set @env{LTDL_LIBRARY_PATH}
+to include `/path/to/lib'.
+
address@hidden table
+
address@hidden Local Variables: 
address@hidden mode: texinfo
address@hidden TeX-master: "guile"
address@hidden End: 
diff --git a/doc/ref/guile.texi b/doc/ref/guile.texi
index ad7c0c6..f43cc5a 100644
--- a/doc/ref/guile.texi
+++ b/doc/ref/guile.texi
@@ -217,14 +217,15 @@ Guile's core language is Scheme, and a lot can be 
achieved simply by using Guile
 to write and run Scheme programs --- as opposed to having to dive into C code.
 In this part of the manual, we explain how to use Guile in this mode, and
 describe the tools that Guile provides to help you with script writing,
-debugging and packaging your programs for distribution.
+debugging, and packaging your programs for distribution.
 
-For detailed reference information on the variables, functions
-etc. that make up Guile's application programming interface (API),
address@hidden Reference}.
+For detailed reference information on the variables, functions, and so
+on that make up Guile's application programming interface (API), see
address@hidden Reference}.
 
 @menu
 * Guile Scheme::                Guile's implementation of Scheme.
+* Invoking Guile::              Selecting optional features when starting 
Guile.
 * Guile Scripting::             How to write Guile scripts.
 * Using Guile Interactively::   Guile's REPL features.
 * Using Guile in Emacs::        Guile and Emacs.
@@ -232,6 +233,7 @@ etc. that make up Guile's application programming interface 
(API),
 @end menu
 
 @include scheme-intro.texi
address@hidden guile-invoke.texi
 @include scheme-scripts.texi
 @include scheme-using.texi
 
diff --git a/doc/ref/scheme-scripts.texi b/doc/ref/scheme-scripts.texi
index c7d22a4..7552dba 100644
--- a/doc/ref/scheme-scripts.texi
+++ b/doc/ref/scheme-scripts.texi
@@ -14,7 +14,6 @@ then tells Guile how to handle the Scheme code.
 
 @menu
 * The Top of a Script File::    How to start a Guile script.
-* Invoking Guile::              Command line options understood by Guile.
 * The Meta Switch::             Passing complex argument lists to Guile
                                 from shell scripts.
 * Command Line Handling::       Accessing the command line from a script.
@@ -76,178 +75,6 @@ The rest of the file should be a Scheme program.
 Guile reads the program, evaluating expressions in the order that they
 appear.  Upon reaching the end of the file, Guile exits.
 
-
address@hidden Invoking Guile
address@hidden Invoking Guile
address@hidden invocation
-
-Here we describe Guile's command-line processing in detail.  Guile
-processes its arguments from left to right, recognizing the switches
-described below.  For examples, see @ref{Scripting Examples}.
-
address@hidden @code
-
address@hidden -s @var{script} @var{arg...}
-Read and evaluate Scheme source code from the file @var{script}, as the
address@hidden function would.  After loading @var{script}, exit.  Any
-command-line arguments @var{arg...} following @var{script} become the
-script's arguments; the @code{command-line} function returns a list of
-strings of the form @code{(@var{script} @var{arg...})}.
-
address@hidden -c @var{expr} @var{arg...}
-Evaluate @var{expr} as Scheme code, and then exit.  Any command-line
-arguments @var{arg...} following @var{expr} become command-line arguments; the
address@hidden function returns a list of strings of the form
address@hidden(@var{guile} @var{arg...})}, where @var{guile} is the path of the
-Guile executable.
-
address@hidden -- @var{arg...}
-Run interactively, prompting the user for expressions and evaluating
-them.  Any command-line arguments @var{arg...} following the @code{--}
-become command-line arguments for the interactive session; the
address@hidden function returns a list of strings of the form
address@hidden(@var{guile} @var{arg...})}, where @var{guile} is the path of the
-Guile executable.
-
address@hidden -L @var{directory}
-Add @var{directory} to the front of Guile's module load path.  The
-given directories are searched in the order given on the command line
-and before any directories in the GUILE_LOAD_PATH environment
-variable.  Paths added here are @emph{not} in effect during execution
-of the user's @file{.guile} file.
-
address@hidden -x @var{extension}
-Add @var{extension} to the front of Guile's load extension list
-(@pxref{Loading, @code{%load-extensions}}).  The specified extensions
-are tried in the order given on the command line, and before the default
-load extensions.  Extensions added here are @emph{not} in effect during
-execution of the user's @file{.guile} file.
-
address@hidden -l @var{file}
-Load Scheme source code from @var{file}, and continue processing the
-command line.
-
address@hidden -e @var{function}
-Make @var{function} the @dfn{entry point} of the script.  After loading
-the script file (with @code{-s}) or evaluating the expression (with
address@hidden), apply @var{function} to a list containing the program name
-and the command-line arguments --- the list provided by the
address@hidden function.
-
-A @code{-e} switch can appear anywhere in the argument list, but Guile
-always invokes the @var{function} as the @emph{last} action it performs.
-This is weird, but because of the way script invocation works under
-POSIX, the @code{-s} option must always come last in the list.
-
-The @var{function} is most often a simple symbol that names a function
-that is defined in the script.  It can also be of the form @code{(@@
address@hidden @var{symbol})} and in that case, the symbol is
-looked up in the module named @var{module-name}.
-
-For compatibility with some versions of Guile 1.4, you can also use the
-form @code{(symbol ...)} (that is, a list of only symbols that doesn't
-start with @code{@@}), which is equivalent to @code{(@@ (symbol ...)
-main)}, or @code{(symbol ...)  symbol} (that is, a list of only symbols
-followed by a symbol), which is equivalent to @code{(@@ (symbol ...)
-symbol)}.  We recommend to use the equivalent forms directly since they
-correspond to the @code{(@@ ...)}  read syntax that can be used in
-normal code, @xref{Using Guile Modules}.
-
address@hidden Examples}.
-
address@hidden -ds
-Treat a final @code{-s} option as if it occurred at this point in the
-command line; load the script here.
-
-This switch is necessary because, although the POSIX script invocation
-mechanism effectively requires the @code{-s} option to appear last, the
-programmer may well want to run the script before other actions
-requested on the command line.  For examples, see @ref{Scripting
-Examples}.
-
address@hidden \
-Read more command-line arguments, starting from the second line of the
-script file.  @xref{The Meta Switch}.
-
address@hidden address@hidden
-The option @code{--use-srfi} expects a comma-separated list of numbers,
-each representing a SRFI number to be loaded into the interpreter
-before starting evaluating a script file or the REPL.  Additionally,
-the feature identifier for the loaded SRFIs is recognized by
-`cond-expand' when using this option.
-
address@hidden
-guile --use-srfi=8,13
address@hidden example
-
address@hidden --debug
-Start with the debugging virtual machine engine.  Using the debugging VM
-will enable support for VM hooks, which are needed for tracing,
-breakpoints, and accurate call counts when profiling.  The debugging VM
-is slower than the regular VM, though, by about 10 percent.  @xref{VM
-Hooks}, for more information.
-
-By default, the debugging VM engine is only used when entering an
-interactive session.  When executing a script with @code{-s} or
address@hidden, the normal, faster VM is used by default.
-
address@hidden
address@hidden --no-debug
-Do not use the debugging VM engine, even when entering an interactive
-session.
-
address@hidden -q
-Do not the local initialization file, @code{.guile}.  This option only
-has an effect when running interactively; running scripts does not load
-the @code{.guile} file.  @xref{Init File}.
-
address@hidden address@hidden
-While this program runs, listen on a local port or a path for REPL
-clients.  If @var{p} starts with a number, it is assumed to be a local
-port on which to listen.  If it starts with a forward slash, it is
-assumed to be a path to a UNIX domain socket on which to listen.
-
-If @var{p} is not given, the default is local port 37146.  If you look
-at it upside down, it almost spells ``Guile''.  If you have netcat
-installed, you should be able to @kbd{nc localhost 37146} and get a
-Guile prompt.  Alternately you can fire up Emacs and connect to the
-process; see @ref{Using Guile in Emacs} for more details.
-
-Note that opening a port allows anyone who can connect to that port---in
-the TCP case, any local user---to do anything Guile can do, as the user
-that the Guile process is running as.  Don't use @option{--listen} on
-multi-user machines.  Of course, if you don't pass @option{--listen} to
-Guile, no port will be opened.
-
-That said, @code{--listen} is great for interactive debugging and
-development.
-
address@hidden
-
address@hidden --auto-compile
-Compile source files automatically (default behavior).
-
address@hidden
-
address@hidden --fresh-auto-compile
-Treat the auto-compilation cache as invalid, forcing recompilation.
-
address@hidden
-
address@hidden --no-auto-compile
-Disable automatic source file compilation.
-
address@hidden
-
address@hidden address@hidden, }--help
-Display help on invoking Guile, and then exit.
-
address@hidden address@hidden, }--version
-Display the current version of Guile, and then exit.
-
address@hidden table
-
-
 @node The Meta Switch
 @subsection The Meta Switch
 
diff --git a/libguile/deprecated.c b/libguile/deprecated.c
index 2026788..fb93cbd 100644
--- a/libguile/deprecated.c
+++ b/libguile/deprecated.c
@@ -1898,7 +1898,15 @@ SCM_DEFINE (scm_dynamic_args_call, "dynamic-args-call", 
3, 0, 0,
   char **argv;
 
   if (scm_is_string (func))
-    func = scm_dynamic_func (func, dobj);
+    {
+#if HAVE_MODULES
+      func = scm_dynamic_func (func, dobj);
+#else
+      scm_misc_error ("dynamic-args-call",
+                      "dynamic-func not available to resolve ~S",
+                      scm_list_1 (func));
+#endif
+    }
   SCM_VALIDATE_POINTER (SCM_ARG1, func);
 
   fptr = SCM_POINTER_VALUE (func);
diff --git a/libguile/extensions.c b/libguile/extensions.c
index d830acb..1c3d28f 100644
--- a/libguile/extensions.c
+++ b/libguile/extensions.c
@@ -1,6 +1,6 @@
 /* extensions.c - registering and loading extensions.
  *
- * Copyright (C) 2001, 2006, 2009, 2010 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2006, 2009, 2010, 2011 Free Software Foundation, Inc.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -111,7 +111,13 @@ load_extension (SCM lib, SCM init)
     }
 
   /* Dynamically link the library. */
+#if HAVE_MODULES
   scm_dynamic_call (init, scm_dynamic_link (lib));
+#else
+  scm_misc_error ("load-extension",
+                  "extension ~S:~S not registered and dynamic-link disabled",
+                  scm_list_2 (init, lib));
+#endif
 }
 
 void
diff --git a/libguile/filesys.c b/libguile/filesys.c
index 86287a1..ceec877 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -1788,6 +1788,7 @@ SCM_DEFINE (scm_closedir, "closedir", 1, 0, 0,
 #undef FUNC_NAME
 
 
+#ifdef HAVE_POSIX
 static int
 scm_dir_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED)
 {
@@ -1808,6 +1809,7 @@ scm_dir_free (SCM p)
     closedir ((DIR *) SCM_SMOB_DATA_1 (p));
   return 0;
 }
+#endif
 
 
 
diff --git a/libguile/init.c b/libguile/init.c
index 94de5c9..3dd966f 100644
--- a/libguile/init.c
+++ b/libguile/init.c
@@ -501,7 +501,9 @@ scm_i_init_guile (void *base)
   scm_init_debug ();   /* Requires macro smobs */
   scm_init_random ();   /* Requires smob_prehistory */
   scm_init_simpos ();
+#if HAVE_MODULES
   scm_init_dynamic_linking (); /* Requires smob_prehistory */
+#endif
   scm_bootstrap_i18n ();
   scm_init_script ();
 
diff --git a/libguile/load.c b/libguile/load.c
index b06fd77..3b6ba2b 100644
--- a/libguile/load.c
+++ b/libguile/load.c
@@ -806,6 +806,11 @@ SCM_DEFINE (scm_primitive_load_path, 
"primitive-load-path", 0, 0, 1,
   SCM filename, exception_on_not_found;
   SCM full_filename, compiled_filename;
   int compiled_is_fallback = 0;
+  SCM hook = *scm_loc_load_hook;
+
+  if (scm_is_true (hook) && scm_is_false (scm_procedure_p (hook)))
+    SCM_MISC_ERROR ("value of %load-hook is neither a procedure nor #f",
+                   SCM_EOL);
 
   if (scm_is_string (args))
     {
@@ -870,6 +875,10 @@ SCM_DEFINE (scm_primitive_load_path, 
"primitive-load-path", 0, 0, 1,
         return SCM_BOOL_F;
     }
 
+  if (!scm_is_false (hook))
+    scm_call_1 (hook, (scm_is_true (full_filename)
+                       ? full_filename : compiled_filename));
+
   if (scm_is_false (full_filename)
       || (scm_is_true (compiled_filename)
           && compiled_is_fresh (full_filename, compiled_filename)))
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index a70b9f7..24f63f5 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -3526,7 +3526,10 @@ module '(ice-9 q) '(make-q q-length))}."
                         (and go-path
                              (fresh-compiled-file-name abs-path go-path)))))))
       (if cfn
-          (load-compiled cfn)
+          (begin
+            (if %load-hook
+                (%load-hook abs-path))
+            (load-compiled cfn))
           (start-stack 'load-stack
                        (primitive-load abs-path)))))
   


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]