From f25f761dacad24cee09213793f0debae0bafeeb6 Mon Sep 17 00:00:00 2001 From: Gary Houston Date: Sun, 9 Jan 2000 13:41:53 +0000 Subject: * 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. --- libguile/eval.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'libguile/eval.c') 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); } -- cgit v1.2.3