Changeset 8684


Ignore:
Timestamp:
03/03/05 14:01:41 (16 years ago)
Author:
piso
Message:

*CURRENT-GLOBAL-MAP*
CURRENT-GLOBAL-MAP
USE-GLOBAL-MAP

File:
1 edited

Legend:

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

    r8675 r8684  
    33 *
    44 * Copyright (C) 2003-2005 Peter Graves
    5  * $Id: LispAPI.java,v 1.60 2005-03-01 20:25:23 piso Exp $
     5 * $Id: LispAPI.java,v 1.61 2005-03-03 14:01:41 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    964964    };
    965965
     966    public static final Symbol _CURRENT_GLOBAL_MAP_ =
     967        exportSpecial("*CURRENT-GLOBAL-MAP*", PACKAGE_J, NIL);
     968
     969    // ### current-global-map
     970    private static final Primitive CURRENT_GLOBAL_MAP =
     971        new Primitive("current-global-map", PACKAGE_J, true, "")
     972    {
     973        public LispObject execute() throws ConditionThrowable
     974        {
     975            return _CURRENT_GLOBAL_MAP_.symbolValue();
     976        }
     977    };
     978
    966979    // ### use-global-map keymap => NIL
    967     private static final Primitive SET_GLOBAL_KEYMAP =
     980    private static final Primitive USE_GLOBAL_MAP =
    968981        new Primitive("use-global-map", PACKAGE_J, true, "keymap")
    969982    {
     
    971984            throws ConditionThrowable
    972985        {
    973             KeyMap.setGlobalKeyMap(checkKeymap(arg));
    974             return T;
     986            if (arg != NIL)
     987                KeyMap.setGlobalKeyMap(checkKeymap(arg));
     988            LispThread.currentThread().setSpecialVariable(_CURRENT_GLOBAL_MAP_,
     989                                                          arg);
     990            return NIL; // emacs
    975991        }
    976992    };
Note: See TracChangeset for help on using the changeset viewer.