Changeset 8749


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

Support emacs emulation.

File:
1 edited

Legend:

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

    r8461 r8749  
    22;;;
    33;;; Copyright (C) 2004-2005 Peter Graves
    4 ;;; $Id: slime.lisp,v 1.28 2005-02-04 04:28:47 piso Exp $
     4;;; $Id: slime.lisp,v 1.29 2005-03-08 02:22:31 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    443443     `(swank:swank-compile-file ,pathname t) 'display-eval-result)))
    444444
    445 (map-key-for-mode "Tab" "(slime:slime-complete-symbol)" "Lisp Shell")
    446 (map-key-for-mode "Ctrl Alt I" "(slime:slime-complete-symbol)" "Lisp")
    447 (map-key-for-mode "Space" "(slime:slime-space)" "Lisp Shell")
    448 (map-key-for-mode "Space" "(slime:slime-space)" "Lisp")
    449 (map-key-for-mode "Alt ." "(slime:slime-edit-definition)" "Lisp Shell")
    450 (map-key-for-mode "Alt ." "(slime:slime-edit-definition)" "Lisp")
    451 (map-key-for-mode "Ctrl Alt R" "(slime:slime-eval-region)" "Lisp")
    452 (map-key-for-mode "Ctrl Alt E" "(slime:slime-eval-last-expression)" "Lisp")
    453 (map-key-for-mode "Ctrl Alt K" "(slime:slime-compile-and-load-file)" "Lisp")
    454 (map-key-for-mode "Ctrl Alt X" "(slime:slime-eval-defun)" "Lisp")
    455 (map-key-for-mode "Ctrl Alt C" "(slime:slime-compile-defun)" "Lisp")
     445(unless (find-package '#:emacs)
     446  (defpackage #:emacs
     447    (:use #:cl #:ext #:j)))
     448
     449(let ((emulation (variable-value 'emulation)))
     450  (cond ((null emulation)
     451         (map-key-for-mode "Tab" "(slime:slime-complete-symbol)" "Lisp Shell")
     452         (map-key-for-mode "Ctrl Alt I" "(slime:slime-complete-symbol)" "Lisp")
     453         (map-key-for-mode "Space" "(slime:slime-space)" "Lisp Shell")
     454         (map-key-for-mode "Space" "(slime:slime-space)" "Lisp")
     455         (map-key-for-mode "Alt ." "(slime:slime-edit-definition)" "Lisp Shell")
     456         (map-key-for-mode "Alt ." "(slime:slime-edit-definition)" "Lisp")
     457         (map-key-for-mode "Ctrl Alt R" "(slime:slime-eval-region)" "Lisp")
     458         (map-key-for-mode "Ctrl Alt E" "(slime:slime-eval-last-expression)" "Lisp")
     459         (map-key-for-mode "Ctrl Alt K" "(slime:slime-compile-and-load-file)" "Lisp")
     460         (map-key-for-mode "Ctrl Alt X" "(slime:slime-eval-defun)" "Lisp")
     461         (map-key-for-mode "Ctrl Alt C" "(slime:slime-compile-defun)" "Lisp"))
     462        ((and (stringp emulation)
     463              (string-equal emulation "emacs")
     464              (fboundp 'emacs::define-keys-for-slime))
     465         (emacs::define-keys-for-slime))))
    456466
    457467(pushnew :slime *features*)
Note: See TracChangeset for help on using the changeset viewer.