Changeset 8806


Ignore:
Timestamp:
03/21/05 17:17:06 (16 years ago)
Author:
piso
Message:

ENVIRONMENT-ADD-FUNCTION-DEFINITION

File:
1 edited

Legend:

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

    r8775 r8806  
    33 *
    44 * Copyright (C) 2002-2005 Peter Graves
    5  * $Id: Environment.java,v 1.23 2005-03-15 03:58:06 piso Exp $
     5 * $Id: Environment.java,v 1.24 2005-03-21 17:17:06 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    224224    }
    225225
     226    // ### make-environment
    226227    public static final Primitive MAKE_ENVIRONMENT =
    227228        new Primitive("make-environment", PACKAGE_SYS, true,
     
    240241    };
    241242
     243    // ### environment-add-macro-definition
    242244    public static final Primitive ENVIRONMENT_ADD_MACRO_DEFINITION =
    243245        new Primitive("environment-add-macro-definition", PACKAGE_SYS, true,
     
    253255            env.addFunctionBinding(name, expander);
    254256            return env;
     257        }
     258    };
     259
     260    // ### environment-add-function-definition
     261    public static final Primitive ENVIRONMENT_ADD_FUNCTION_DEFINITION =
     262        new Primitive("environment-add-function-definition", PACKAGE_SYS, true,
     263                      "environment name lambda-expression")
     264    {
     265        public LispObject execute(LispObject first, LispObject second,
     266                                  LispObject third)
     267            throws ConditionThrowable
     268        {
     269            checkEnvironment(first).addFunctionBinding(second, third);
     270            return first;
    255271        }
    256272    };
Note: See TracChangeset for help on using the changeset viewer.