diff options
author | Gary Houston <ghouston@arglist.com> | 2000-01-09 13:41:53 +0000 |
---|---|---|
committer | Gary Houston <ghouston@arglist.com> | 2000-01-09 13:41:53 +0000 |
commit | f25f761dacad24cee09213793f0debae0bafeeb6 (patch) | |
tree | de955d8c1300bde5ddb2f69e28f21bf27a43c9fa /libguile/eval.c | |
parent | a4dd2611b135c524fdc793cea22e3fae4ba7f331 (diff) | |
download | guile-f25f761dacad24cee09213793f0debae0bafeeb6.tar.gz |
* eval.c: define scm_unbound_variable_key ('unbound-variable).
scm_lookupcar1: throw an error with key 'unbound-variable instead
of 'misc-error when an unbound variable is encountered.
* filesys.c (scm_mkdir, scm_rmdir, scm_getcwd, scm_select,
scm_symlink, scm_readlink, scm_lstat),
posix.c (scm_setpgid, scm_setsid, scm_ctermid, scm_tcgetpgrp,
scm_tcsetpgrp, scm_uname, scm_setlocale, scm_mknod, scm_nice,
scm_sync),
simpos.c (scm_system),
stime.c (scm_times, scm_strptime):
move the HAVE_XXX feature tests out of the procedure bodies.
don't use SCM_SYSMISSING.
scm_validate.h (SCM_SYSMISSING): removed.
error.h, error.c (scm_sysmissing): comment that this is deprecated.
see ChangeLog entry for 1999-12-28.
Diffstat (limited to 'libguile/eval.c')
-rw-r--r-- | libguile/eval.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libguile/eval.c b/libguile/eval.c index 59481e4a6..bf9cda4e1 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -254,6 +254,8 @@ scm_ilookup (SCM iloc, SCM env) */ static scm_cell undef_cell = { SCM_UNDEFINED, SCM_UNDEFINED }; +SCM_SYMBOL (scm_unbound_variable_key, "unbound-variable"); + #ifdef USE_THREADS static SCM * scm_lookupcar1 (SCM vloc, SCM genv, int check) @@ -342,11 +344,14 @@ scm_lookupcar (SCM vloc, SCM genv, int check) errout: /* scm_everr (vloc, genv,...) */ if (check) - scm_misc_error (NULL, - SCM_NULLP (env) - ? "Unbound variable: %S" - : "Damaged environment: %S", - scm_listify (var, SCM_UNDEFINED)); + { + if (SCM_NULLP (env)) + scm_error (scm_unbound_variable_key, NULL, "Unbound variable: %S", + scm_cons (var, SCM_EOL), SCM_BOOL_F); + else + scm_misc_error (NULL, "Damaged environment: %S", + scm_cons (var, SCM_EOL)); + } else return SCM_CDRLOC (&undef_cell); } |