[armedbear-cvs] r11551 - trunk/abcl/src/org/armedbear/lisp

Erik Huelsmann ehuelsmann at common-lisp.net
Thu Jan 8 20:24:45 UTC 2009


Author: ehuelsmann
Date: Thu Jan  8 20:24:45 2009
New Revision: 11551

Log:
Change the return value of Environment.isDeclaredSpecial() to include the
dynamic environment in case there's no record of the symbol in the lexical environment.

... And add a /little/ bit of JavaDoc.

Modified:
   trunk/abcl/src/org/armedbear/lisp/Environment.java

Modified: trunk/abcl/src/org/armedbear/lisp/Environment.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Environment.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Environment.java	Thu Jan  8 20:24:45 2009
@@ -244,10 +244,16 @@
     vars.specialp = true;
   }
 
+    /** Return true if a symbol is declared special.
+     *
+     * If there is no binding in the current (lexical) environment,
+     * the current dynamic environment (thread) is checked.
+     */
   public boolean isDeclaredSpecial(LispObject var)
   {
     Binding binding = getBinding(var);
-    return binding != null ? binding.specialp : false;
+    return (binding != null) ? binding.specialp :
+        (LispThread.currentThread().getSpecialBinding(var) != null);
   }
 
   @Override




More information about the armedbear-cvs mailing list