diff options
author | Andy Wingo <wingo@pobox.com> | 2013-01-20 19:33:42 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-01-21 11:21:52 +0100 |
commit | f6fd2c03a5f8b910e666b91b73e94da9eb6d03a2 (patch) | |
tree | 48d8dc9f9edf0bc7c595ecda84d9d0543c163cbf /doc/ref/api-evaluation.texi | |
parent | 7f420e49e462ae8faa60d61358ce4e1fdbbb0f21 (diff) | |
download | guile-f6fd2c03a5f8b910e666b91b73e94da9eb6d03a2.tar.gz |
fix try-module-autoload, which did not detect failure to find the file
* libguile/load.c (scm_primitive_load_path): If the second argument is a
procedure, call it like a thunk.
* doc/ref/api-evaluation.texi (Load Paths): Update docs.
* module/ice-9/boot-9.scm (resolve-interface): Use `unless'.
(try-module-autoload): Use the new primitive-load-path to detect
failure to find an appropriate file. Fixes a bug reported by Diogo
F. S. Ramos. Thanks to Noah Lavine for tracking it down.
Diffstat (limited to 'doc/ref/api-evaluation.texi')
-rw-r--r-- | doc/ref/api-evaluation.texi | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/doc/ref/api-evaluation.texi b/doc/ref/api-evaluation.texi index 2e5a3d251..f80d7ad7f 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, 2009, 2010, 2011, 2012 +@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010, 2011, 2012, 2013 @c Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @@ -878,15 +878,20 @@ of modifying the path both at compile-time and at run-time. 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 +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. +If @var{filename} is a relative pathname and is not found in the list of +search paths, one of three things may happen, depending on the optional +second argument, @var{exception-on-not-found}. If it is @code{#f}, +@code{#f} will be returned. If it is a procedure, it will be called +with no arguments. (This allows a distinction to be made between +exceptions raised by loading a file, and exceptions related to the +loader itself.) Otherwise an error is signalled. + +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 |