Changeset 11491


Ignore:
Timestamp:
12/27/08 15:28:48 (13 years ago)
Author:
ehuelsmann
Message:

Cleanup: Add a way to add and initialize a special all at once.

Note: Even though this commit applies this principle only to CDR6,

a follow up commit should be created for this to be used in general.

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/Lisp.java

    r11490 r11491  
    25302530
    25312531
    2532   // Extentions
    2533   static {
    2534     Symbol._INSPECTOR_HOOK_.initializeSpecial(NIL);
    2535   }
    2536 
    25372532  private static final void loadClass(String className)
    25382533  {
  • trunk/abcl/src/org/armedbear/lisp/Package.java

    r11475 r11491  
    300300    }
    301301
     302    /** Initializes the symbol as a special variables and assigns it
     303        a value, just like DEFVAR would.
     304    */
     305    public synchronized Symbol addExternalSymbol(String symbolName,
     306                                                 LispObject specialValue)
     307    {
     308        final Symbol symbol = addExternalSymbol(symbolName);
     309        symbol.initializeSpecial(specialValue);
     310
     311        return symbol;
     312    }
     313
    302314    public synchronized Symbol intern(String symbolName)
    303315    {
  • trunk/abcl/src/org/armedbear/lisp/Symbol.java

    r11490 r11491  
    30143014  // CDR6
    30153015  public static final Symbol _INSPECTOR_HOOK_ =
    3016     PACKAGE_EXT.addExternalSymbol("*INSPECTOR-HOOK*");
     3016    PACKAGE_EXT.addExternalSymbol("*INSPECTOR-HOOK*", NIL);
    30173017
    30183018}
Note: See TracChangeset for help on using the changeset viewer.