Changeset 5259


Ignore:
Timestamp:
12/27/03 04:57:00 (17 years ago)
Author:
piso
Message:

MACRO-FUNCTION

File:
1 edited

Legend:

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

    r5256 r5259  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitives.java,v 1.540 2003-12-27 03:08:19 piso Exp $
     5 * $Id: Primitives.java,v 1.541 2003-12-27 04:57:00 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    13901390    // ### macro-function
    13911391    // Need to support optional second argument specifying environment.
    1392     private static final Primitive MACRO_FUNCTION = new Primitive("macro-function","symbol &optional environment")
    1393     {
    1394         public LispObject execute(LispObject[] args) throws ConditionThrowable
    1395         {
    1396             if (args.length != 1)
    1397                 signal(new WrongNumberOfArgumentsException(this));
    1398             Symbol symbol = checkSymbol(args[0]);
    1399             LispObject obj = symbol.getSymbolFunction();
     1392    private static final Primitive MACRO_FUNCTION =
     1393        new Primitive("macro-function", "symbol &optional environment")
     1394    {
     1395        public LispObject execute(LispObject arg) throws ConditionThrowable
     1396        {
     1397            LispObject obj = arg.getSymbolFunction();
    14001398            if (obj instanceof MacroObject)
    14011399                return ((MacroObject)obj).getExpander();
    14021400            if (obj instanceof SpecialOperator) {
    14031401                LispObject macroObject =
    1404                     get(symbol, Symbol.MACROEXPAND_MACRO, NIL);
     1402                    get((Symbol)arg, Symbol.MACROEXPAND_MACRO, NIL);
    14051403                if (macroObject instanceof MacroObject)
    14061404                    return ((MacroObject)macroObject).getExpander();
Note: See TracChangeset for help on using the changeset viewer.