Changeset 8750


Ignore:
Timestamp:
03/08/05 02:22:52 (16 years ago)
Author:
piso
Message:

Slime.

File:
1 edited

Legend:

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

    r8748 r8750  
    22;;;
    33;;; Copyright (C) 2005 Peter Graves
    4 ;;; $Id: emacs.lisp,v 1.12 2005-03-07 20:23:56 piso Exp $
     4;;; $Id: emacs.lisp,v 1.13 2005-03-08 02:22:52 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    2323          java-mode-map
    2424          lisp-mode-map
     25          lisp-shell-mode-map
    2526          directory-mode-map))
    2627
     
    354355;;; Java mode.
    355356
    356 (define-key *java-mode-map*
     357(define-keys *java-mode-map*
    357358  '(("{"                        "electricOpenBrace")
    358359    ("}"                        "electricCloseBrace")
     
    377378(defparameter *lisp-mode-map* (make-keymap))
    378379(defparameter *lisp-mode-control-c-map* (make-keymap))
     380(defparameter *lisp-mode-control-x-map* (make-keymap))
    379381(define-key *lisp-mode-map* "Ctrl C" *lisp-mode-control-c-map*)
     382(define-key *lisp-mode-map* "Ctrl X" *lisp-mode-control-x-map*)
    380383
    381384(define-keys *lisp-mode-map*
     
    399402  *lisp-mode-map*)
    400403
    401 ;;; Directory mode.
     404;;; Lisp shell mode
     405
     406(defparameter *lisp-shell-mode-map* (make-keymap))
     407(defparameter *lisp-shell-mode-esc-map* (make-keymap))
     408(defparameter *lisp-shell-mode-control-c-map* (make-keymap))
     409(define-key *lisp-shell-mode-map* "Escape" *lisp-shell-mode-esc-map*)
     410(define-key *lisp-shell-mode-map* "Ctrl C" *lisp-shell-mode-control-c-map*)
     411
     412(define-keys *lisp-shell-mode-map*
     413  '(("Home"                     "shellHome")
     414    ("Ctrl A"                   "shellHome")
     415    ("Backspace"                "shellbackspace")
     416    ("Alt P"                    "shellPreviousInput")
     417    ("Alt N"                    "shellNextInput")
     418    ("Enter"                    "LispShellMode.enter")
     419    ("Alt Enter"                "newlineandindent")
     420    ("Ctrl R"                   "resetLisp")
     421    ("Tab"                      "indentLineOrRegion")
     422    ("Alt F1"                   "hyperspec")))
     423
     424(define-keys *lisp-shell-mode-esc-map*
     425  '((#\p                        "shellPreviousInput")
     426    (#\n                        "shellNextInput")))
     427
     428(define-keys *lisp-shell-mode-control-c-map*
     429  '(("Ctrl C"                   "shellInterrupt")
     430    ("Ctrl P"                   "shellPreviousPrompt")
     431    ("Ctrl N"                   "shellNextPrompt")))
     432
     433(defun lisp-shell-mode-map ()
     434  *lisp-shell-mode-map*)
     435
     436;;; Slime
     437
     438(defun define-keys-for-slime ()
     439  (define-keys *lisp-mode-map*
     440    '(("Space"                  "(slime:slime-space)")
     441      ("Alt ."                  "(slime:slime-edit-definition)")
     442      ("Ctrl Alt I"             "(slime:slime-complete-symbol)")
     443      ("Ctrl Alt X"             "(slime:slime-eval-defun)")))
     444  (define-keys *lisp-mode-control-c-map*
     445    '(("Tab"                    "(slime:slime-complete-symbol)")
     446      ("Ctrl C"                 "(slime:slime-compile-defun)")
     447      ("Ctrl I"                 "(slime:slime-complete-symbol)")
     448      ("Ctrl K"                 "(slime:slime-compile-and-load-file)")
     449      ("Ctrl R"                 "(slime:slime-eval-region)")))
     450  (define-keys *lisp-mode-control-x-map*
     451    '(("Ctrl E"                 "(slime:slime-eval-last-expression)")))
     452  (define-keys *lisp-shell-mode-map*
     453    '(("Tab"                    "(slime:slime-complete-symbol)")
     454      ("Space"                  "(slime:slime-space)")
     455      ("Alt ."                  "(slime:slime-edit-definition)")
     456      ("Ctrl Alt I"             "(slime:slime-complete-symbol)")))
     457  (define-keys *lisp-shell-mode-esc-map*
     458    '(("Tab"                    "(slime:slime-complete-symbol)")))
     459  (define-keys *lisp-shell-mode-control-c-map*
     460    '(("Tab"                    "(slime:slime-complete-symbol)"))))
     461
     462;;; Directory mode
    402463
    403464(defparameter *directory-mode-map* (make-keymap))
Note: See TracChangeset for help on using the changeset viewer.