Changeset 4072


Ignore:
Timestamp:
09/26/03 16:52:56 (20 years ago)
Author:
piso
Message:

SYS::%DEFUN: don't allow special operators to be redefined.

File:
1 edited

Legend:

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

    r4069 r4072  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitives.java,v 1.441 2003-09-26 14:21:22 piso Exp $
     5 * $Id: Primitives.java,v 1.442 2003-09-26 16:52:56 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    13111311    // %defun name arglist body => name
    13121312    private static final Primitive3 _DEFUN =
    1313         new Primitive3("%defun", PACKAGE_SYS, false) {
     1313        new Primitive3("%defun", PACKAGE_SYS, false)
     1314    {
    13141315        public LispObject execute(LispObject first, LispObject second,
    1315             LispObject third) throws ConditionThrowable
     1316                                  LispObject third)
     1317            throws ConditionThrowable
    13161318        {
    13171319            Symbol symbol = checkSymbol(first);
     1320            if (symbol.getSymbolFunction() instanceof SpecialOperator) {
     1321                String message =
     1322                    symbol.getName() + " is a special operator and may not be redefined";
     1323                throw new ConditionThrowable(new ProgramError(message));
     1324            }
    13181325            LispObject arglist = checkList(second);
    13191326            LispObject body = checkList(third);
Note: See TracChangeset for help on using the changeset viewer.