summaryrefslogtreecommitdiff
path: root/libguile/modules.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-04-26 13:10:30 +0200
committerAndy Wingo <wingo@pobox.com>2009-04-26 13:10:30 +0200
commit165a7596ee62a2871de8569e3d41ef7f7c925594 (patch)
tree328028a79be59b91a03d46e6bd66c9e6a7d8ad19 /libguile/modules.c
parent00bbb89e9694faac612ecf2e234291df086ebd11 (diff)
downloadguile-165a7596ee62a2871de8569e3d41ef7f7c925594.tar.gz
add module-{define-keyword!,undefine-keyword!,lookup-keyword}
* libguile/modules.c (scm_module_local_variable): Allow this to be called before modules are booted with #f as the module. * module/ice-9/boot-9.scm (module-define-keyword!) (module-lookup-keyword, module-undefine-keyword!): Well, if syncase forces us to allow the keyword bindings to be partitioned from value bindings, let's go ahead and do that in boot-9 instead of in psyntax. A step on the way to removing `install-global-transformer'. (sc-chi): Remove. * module/ice-9/psyntax.scm (put-global-definition-hook): (remove-global-definition-hook, get-global-definition-hook): Use our new module-* functions. (sc-chi): Remove, no longer needed. * module/ice-9/psyntax-pp.scm: Regenerated.
Diffstat (limited to 'libguile/modules.c')
-rw-r--r--libguile/modules.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/modules.c b/libguile/modules.c
index 2cb8a7620..689510ce6 100644
--- a/libguile/modules.c
+++ b/libguile/modules.c
@@ -412,13 +412,13 @@ SCM_DEFINE (scm_module_local_variable, "module-local-variable", 2, 0, 0,
register SCM b;
- /* SCM_MODULE_TAG is not initialized yet when `boot-9.scm' is being
- evaluated. */
if (scm_module_system_booted_p)
SCM_VALIDATE_MODULE (1, module);
SCM_VALIDATE_SYMBOL (2, sym);
+ if (scm_is_false (module))
+ return scm_hashq_ref (scm_pre_modules_obarray, sym, SCM_UNDEFINED);
/* 1. Check module obarray */
b = scm_hashq_ref (SCM_MODULE_OBARRAY (module), sym, SCM_UNDEFINED);