Changeset 8712


Ignore:
Timestamp:
03/05/05 04:22:06 (16 years ago)
Author:
piso
Message:

Work in progress.

File:
1 edited

Legend:

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

    r8698 r8712  
    22;;;
    33;;; Copyright (C) 2005 Peter Graves
    4 ;;; $Id: emacs.lisp,v 1.4 2005-03-03 19:50:06 piso Exp $
     4;;; $Id: emacs.lisp,v 1.5 2005-03-05 04:22:06 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    3636
    3737(defparameter *global-map* (make-keymap))
     38(defparameter *esc-map* (make-keymap))
    3839(defparameter *control-x-map* (make-keymap))
    3940(defparameter *help-map* (make-keymap))
    4041(defparameter *java-mode-map* (make-keymap))
    4142
     43(define-key *global-map* "Escape" *esc-map*)
    4244(define-key *global-map* "Ctrl X" *control-x-map*)
    4345(define-key *global-map* "Ctrl H" *help-map*)
     
    6163;; mapKey(KeyEvent.VK_N, CTRL_MASK | SHIFT_MASK, "newFrame");
    6264;; mapKey(KeyEvent.VK_X, ALT_MASK, "executeCommand");
    63 (define-key *global-map* "Alt X" "executeCommand");
     65(define-key *global-map* "Alt X" "executeCommand")
     66(define-key *esc-map* #\x "executecommand")
    6467;; mapKey(KeyEvent.VK_P, CTRL_MASK, "print");
    6568;; mapKey(KeyEvent.VK_Q, CTRL_MASK | SHIFT_MASK, "saveAllExit");
     
    8487;; mapKey(KeyEvent.VK_V, CTRL_MASK | SHIFT_MASK, "cyclePaste");
    8588(define-key *global-map* "Alt Y" "cyclePaste")
     89(define-key *esc-map* #\y "cyclePaste")
    8690;; mapKey(KeyEvent.VK_T, ALT_MASK, "cycleTabWidth");
    8791
     
    181185    ("Page Down"                "pageDown")))
    182186
     187(define-keys *esc-map*
     188  '((#\< "bob")
     189    (#\> "eob")
     190    (#\. "findTagAtDot")
     191    (#\% "replace")
     192    ))
     193
    183194;; Emacs uses Ctrl Up for backward-paragraph, which j doesn't have.
    184195(define-keys *global-map*
     
    216227;; mapKey(KeyEvent.VK_ENTER, 0, "newline");
    217228(define-key *global-map* "Enter" "newline")
     229(define-key *global-map* "Ctrl M" "newline")
    218230(define-key *global-map* "Ctrl J" "newlineAndIndent")
    219231
     
    283295;; mapKey(KeyEvent.VK_T, CTRL_MASK | ALT_MASK, "visibleTabs");
    284296
    285 ;; // Help menu.
    286 ;; mapKey(KeyEvent.VK_F1, 0, "help");
    287 ;; mapKey(KeyEvent.VK_K, ALT_MASK, "describeKey");
    288 
    289297;; mapKey(KeyEvent.VK_SLASH, ALT_MASK, "expand");
    290298(define-key *global-map* "Alt /" "expand")
     
    365373  '(("a"                        "apropos")
    366374    ("b"                        "listBindings")
     375    ("i"                        "help")
    367376    ("k"                        "describeKey")))
    368377
     
    377386;; km.mapKey(KeyEvent.VK_ENTER, 0, "newlineAndIndent");
    378387;; km.mapKey(';', "electricSemi");
     388(define-key *java-mode-map* "';'" "electricSemi")
    379389;;                km.mapKey(':', "electricColon");
    380390;;                km.mapKey('*', "electricStar");
Note: See TracChangeset for help on using the changeset viewer.