[armedbear-cvs] r11321 - trunk/j/src/org/armedbear/lisp
ehuelsmann at common-lisp.net
ehuelsmann at common-lisp.net
Wed Sep 17 20:46:01 UTC 2008
Author: ehuelsmann
Date: Wed Sep 17 16:45:50 2008
New Revision: 11321
Modified:
trunk/j/src/org/armedbear/lisp/SpecialOperators.java
Log:
Fix special declarations in SYMBOL-MACROLET, fixing symbol-macrolet.error.1.
Found by: Ville Vouitilainen
Modified: trunk/j/src/org/armedbear/lisp/SpecialOperators.java
==============================================================================
--- trunk/j/src/org/armedbear/lisp/SpecialOperators.java (original)
+++ trunk/j/src/org/armedbear/lisp/SpecialOperators.java Wed Sep 17 16:45:50 2008
@@ -210,6 +210,9 @@
try
{
Environment ext = new Environment(env);
+ // Declare our free specials, this will correctly raise
+ LispObject body = ext.processDeclarations(args.cdr());
+
for (int i = varList.length(); i-- > 0;)
{
LispObject obj = varList.car();
@@ -217,7 +220,8 @@
if (obj instanceof Cons && obj.length() == 2)
{
Symbol symbol = checkSymbol(obj.car());
- if (symbol.isSpecialVariable())
+ if (symbol.isSpecialVariable()
+ || ext.isDeclaredSpecial(symbol))
{
return error(new ProgramError(
"Attempt to bind the special variable " +
@@ -233,7 +237,7 @@
obj.writeToString()));
}
}
- return progn(args.cdr(), ext, thread);
+ return progn(body, ext, thread);
}
finally
{
@@ -242,7 +246,7 @@
}
else
{
- return progn(args.cdr(), ext, thread);
+ return progn(args.cdr(), env, thread);
}
}
};
More information about the armedbear-cvs
mailing list