[armedbear-cvs] r11322 - trunk/j/src/org/armedbear/lisp

ehuelsmann at common-lisp.net ehuelsmann at common-lisp.net
Wed Sep 17 21:27:57 UTC 2008


Author: ehuelsmann
Date: Wed Sep 17 17:27:52 2008
New Revision: 11322

Modified:
   trunk/j/src/org/armedbear/lisp/Primitives.java
Log:
Add declaration processing in MACROLET bodies.

Modified: trunk/j/src/org/armedbear/lisp/Primitives.java
==============================================================================
--- trunk/j/src/org/armedbear/lisp/Primitives.java	(original)
+++ trunk/j/src/org/armedbear/lisp/Primitives.java	Wed Sep 17 17:27:52 2008
@@ -3499,8 +3499,9 @@
       {
         LispObject defs = checkList(args.car());
         final LispThread thread = LispThread.currentThread();
-        LispObject result;
-        if (defs != NIL)
+        final SpecialBinding lastSpecialBinding = thread.lastSpecialBinding;
+
+        try
           {
             Environment ext = new Environment(env);
             while (defs != NIL)
@@ -3517,11 +3518,12 @@
                 ext.addFunctionBinding(symbol, macroObject);
                 defs = defs.cdr();
               }
-            result = progn(args.cdr(), ext, thread);
+            return progn(ext.processDeclarations(args.cdr()), ext, thread);
+          }
+        finally
+          {
+            thread.lastSpecialBinding = lastSpecialBinding;
           }
-        else
-          result = progn(args.cdr(), env, thread);
-        return result;
       }
     };
 



More information about the armedbear-cvs mailing list