Changeset 3488


Ignore:
Timestamp:
08/24/03 18:27:01 (19 years ago)
Author:
piso
Message:

DEFCONSTANT => SYS::%DEFCONSTANT

File:
1 edited

Legend:

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

    r3485 r3488  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitives.java,v 1.344 2003-08-24 17:26:24 piso Exp $
     5 * $Id: Primitives.java,v 1.345 2003-08-24 18:27:01 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    14561456    };
    14571457
    1458     // ### defconstant
    1459     // defconstant name initial-value [documentation] => name
    1460     private static final SpecialOperator DEFCONSTANT =
    1461         new SpecialOperator("defconstant") {
    1462         public LispObject execute(LispObject args, Environment env)
    1463             throws Condition
    1464         {
    1465             if (args.length() > 3)
    1466                 throw new WrongNumberOfArgumentsException(this);
    1467             Symbol symbol = checkSymbol(args.car());
    1468             final LispThread thread = LispThread.currentThread();
    1469             symbol.setSymbolValue(eval(args.cadr(), env, thread));
     1458    // ### %defconstant
     1459    private static final Primitive3 _DEFCONSTANT =
     1460        new Primitive3("%defconstant", PACKAGE_SYS, false) {
     1461        public LispObject execute(LispObject first, LispObject second,
     1462                                  LispObject third)
     1463            throws LispError
     1464        {
     1465            Symbol symbol = checkSymbol(first);
     1466            if (third instanceof LispString) {
     1467                // Documentation.
     1468                symbol.setVariableDocumentation(third);
     1469            } else if (third != NIL)
     1470                throw new TypeError(third, "string");
     1471            symbol.setSymbolValue(second);
    14701472            symbol.setConstant(true);
    1471             thread.clearValues();
    14721473            return symbol;
    14731474        }
Note: See TracChangeset for help on using the changeset viewer.