Changeset 8457


Ignore:
Timestamp:
02/03/05 20:37:52 (17 years ago)
Author:
piso
Message:

SET

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Primitives.java

    r8424 r8457  
    33 *
    44 * Copyright (C) 2002-2005 Peter Graves
    5  * $Id: Primitives.java,v 1.728 2005-01-31 17:19:35 piso Exp $
     5 * $Id: Primitives.java,v 1.729 2005-02-03 20:37:52 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    527527            throws ConditionThrowable
    528528        {
    529             Symbol symbol = checkSymbol(first);
    530             Binding binding =
    531                 LispThread.currentThread().getSpecialBinding(symbol);
    532             if (binding != null) {
    533                 binding.value = second;
    534                 return second;
    535             }
    536             symbol.setSymbolValue(second);
    537             return second;
     529            try {
     530                return LispThread.currentThread().setSpecialVariable((Symbol)first,
     531                                                                     second);
     532            }
     533            catch (ClassCastException e) {
     534                return signal(new TypeError(first, Symbol.SYMBOL));
     535            }
    538536        }
    539537    };
Note: See TracChangeset for help on using the changeset viewer.