diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-10-15 01:05:32 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-10-15 01:05:32 +0200 |
commit | 31ab99de563027fe2bceb60bbd712407fcaf868e (patch) | |
tree | 426e1b25bd5ccc01f3152eabcae62906ca62801e /doc/ref/api-evaluation.texi | |
parent | 682d78d05e567a46b1c443c5f852c575ab529f5a (diff) | |
download | guile-31ab99de563027fe2bceb60bbd712407fcaf868e.tar.gz |
Restore signature of `scm_primitive_load_path ()' as found in 1.8.
The incompatibility was introduced by
0fb81f95b0222c5ba49efd3e36cf797df54c0863 ("add exception_on_error
optional arg to primitive-load-path").
* libguile/load.c (scm_primitive_load_path): Change to take 1 rest
argument. Interpret the argument as either a file name (C-level
backward compatibility with 1.8) or an actual argument list.
(scm_c_primitive_load_path): Update caller.
* libguile/load.h (scm_primitive_load_path): Update accordingly.
* doc/ref/api-evaluation.texi (Loading): Update documentation of
`primitive-load-path' and `scm_primitive_load_path ()'.
Diffstat (limited to 'doc/ref/api-evaluation.texi')
-rw-r--r-- | doc/ref/api-evaluation.texi | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/ref/api-evaluation.texi b/doc/ref/api-evaluation.texi index b245ab8b7..c4849529e 100644 --- a/doc/ref/api-evaluation.texi +++ b/doc/ref/api-evaluation.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. -@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 @c Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @@ -538,13 +538,20 @@ documentation for @code{%load-hook} later in this section. @code{SCM}. @end deftypefn -@deffn {Scheme Procedure} primitive-load-path filename +@deffn {Scheme Procedure} primitive-load-path filename [exception-on-not-found] @deffnx {C Function} scm_primitive_load_path (filename) Search @code{%load-path} for the file named @var{filename} and load it into the top-level environment. If @var{filename} is a relative pathname and is not found in the list of search paths, an error is signalled. Preferentially loads a compiled version of the file, if it is available and up-to-date. + +By default or if @var{exception-on-not-found} is true, an exception is +raised if @var{filename} is not found. If @var{exception-on-not-found} +is @code{#f} and @var{filename} is not found, no exception is raised and +@code{#f} is returned. For compatibility with Guile 1.8 and earlier, +the C function takes only one argument, which can be either a string +(the file name) or an argument list. @end deffn @deffn {Scheme Procedure} %search-load-path filename |