summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MLKDynamicContext.h2
-rw-r--r--MLKDynamicContext.m5
-rw-r--r--MLKReader.m7
3 files changed, 11 insertions, 3 deletions
diff --git a/MLKDynamicContext.h b/MLKDynamicContext.h
index 0fbd5d4..b4c304c 100644
--- a/MLKDynamicContext.h
+++ b/MLKDynamicContext.h
@@ -39,6 +39,8 @@
catchTags:(NSDictionary *)catchTags
activeHandlerEnvironment:(MLKEnvironment *)handlerEnv;
++(MLKDynamicContext *) globalContext;
+
-(MLKDynamicContext *) pushContext;
+(MLKDynamicContext *) currentContext;
diff --git a/MLKDynamicContext.m b/MLKDynamicContext.m
index 6bfd03a..6d135a4 100644
--- a/MLKDynamicContext.m
+++ b/MLKDynamicContext.m
@@ -264,6 +264,11 @@ static MLKDynamicContext *global_context;
return self;
}
++(MLKDynamicContext *) globalContext
+{
+ return global_context;
+}
+
-(MLKDynamicContext *) pushContext
{
[[[NSThread currentThread] threadDictionary] setObject:self
diff --git a/MLKReader.m b/MLKReader.m
index 422fd8f..2341d32 100644
--- a/MLKReader.m
+++ b/MLKReader.m
@@ -107,7 +107,8 @@
if ([readtable isConstituentCharacter:ch])
{
token = [NSMutableString stringWithCapacity:8];
- [token appendFormat:@"%C", [stream readChar]];
+ [token appendFormat:@"%C", [readtable charWithReadtableCase:
+ [stream readChar]]];
}
while (![stream isEOF])
@@ -407,7 +408,7 @@
break;
}
}
-
+
// Extract the package and symbol name.
if (packageMarker == -1)
{
@@ -443,7 +444,7 @@
if (packageMarker == 0)
{
// Make keyword symbols self-evaluate.
- [[MLKDynamicContext currentContext] setValue:symbol forBinding:symbol];
+ [[MLKDynamicContext globalContext] addValue:symbol forBinding:symbol];
}
return symbol;