diff options
author | Gary Houston <ghouston@arglist.com> | 1996-09-24 07:21:17 +0000 |
---|---|---|
committer | Gary Houston <ghouston@arglist.com> | 1996-09-24 07:21:17 +0000 |
commit | b59b97ba3a1280a78463b8d16c247b6283425466 (patch) | |
tree | 61281f096a6611215b7b1cf4f83fe26049b78b83 /libguile/load.c | |
parent | 855c0eacc8201c9e0b0c28696ae8de8c7aeff2e6 (diff) | |
download | guile-b59b97ba3a1280a78463b8d16c247b6283425466.tar.gz |
* load.c (scm_sys_try_load): don't check whether value returned
by scm_open_file is #f, it won't be. Always return SCM_UNSPECIFIED.
Change the Scheme name from %try-load to primitive-load.
* error.c (scm_error): convert a NULL message to SCM_BOOL_F.
Can avoid passing a message, allowing it to be derived in the
error handler (e.g., if we want to throw to the key both from
Scheme and C).
Diffstat (limited to 'libguile/load.c')
-rw-r--r-- | libguile/load.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libguile/load.c b/libguile/load.c index ccc32a618..bbf86bbee 100644 --- a/libguile/load.c +++ b/libguile/load.c @@ -63,7 +63,7 @@ /* Loading a file, given an absolute filename. */ -SCM_PROC(s_sys_try_load, "%try-load", 1, 2, 0, scm_sys_try_load); +SCM_PROC(s_sys_try_load, "primitive-load", 1, 2, 0, scm_sys_try_load); SCM scm_sys_try_load (filename, case_insensitive_p, sharp) SCM filename; @@ -76,8 +76,6 @@ scm_sys_try_load (filename, case_insensitive_p, sharp) SCM form, port; port = scm_open_file (filename, scm_makfromstr ("r", (scm_sizet) sizeof (char), 0)); - if (SCM_FALSEP (port)) - return SCM_BOOL_F; while (1) { form = scm_read (port, case_insensitive_p, sharp); @@ -87,7 +85,7 @@ scm_sys_try_load (filename, case_insensitive_p, sharp) } scm_close_port (port); } - return SCM_BOOL_T; + return SCM_UNSPECIFIED; } |