[slime-cvs] CVS slime

heller heller at common-lisp.net
Wed Sep 24 09:12:07 UTC 2008


Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv13564

Modified Files:
	ChangeLog slime.el 
Log Message:
* slime.el (slime-prefix-map): New keymap.
(slime-define-key): Use it.  Also drop unused :inferior arg.
(slime-inspector-mode-map): Bind C-c to slime-prefix-map.

--- /project/slime/cvsroot/slime/ChangeLog	2008/09/23 04:57:51	1.1540
+++ /project/slime/cvsroot/slime/ChangeLog	2008/09/24 09:10:34	1.1541
@@ -1,3 +1,9 @@
+2008-09-24  Helmut Eller  <heller at common-lisp.net>
+
+	* slime.el (slime-prefix-map): New keymap.
+	(slime-define-key): Use it.  Also drop unused :inferior arg.
+	(slime-inspector-mode-map): Bind C-c to slime-prefix-map.
+
 2008-09-23  Douglas Crosher <dcrosher at common-lisp.net>
 
 	* swank-scl.lisp: update for Scieneer CL 1.3.8.
--- /project/slime/cvsroot/slime/slime.el	2008/09/22 17:49:45	1.1039
+++ /project/slime/cvsroot/slime/slime.el	2008/09/24 09:11:02	1.1040
@@ -612,16 +612,20 @@
 (defvar slime-prefix-key "\C-c"
   "The prefix key to use in SLIME keybinding sequences.")
 
-(defun* slime-define-key (key command &key prefixed inferior)
+(defvar slime-prefix-map (make-sparse-keymap)
+  "Keymap for prefixed with `slime-prefix-key'.")
+
+(defun* slime-define-key (key command &key prefixed)
   "Define a keybinding of KEY for COMMAND.
 If PREFIXED is non-nil, `slime-prefix-key' is prepended to KEY."
-  (when prefixed
-    (setq key (concat slime-prefix-key key)))
-  (define-key slime-mode-map key command))
+  (cond (prefixed (define-key slime-prefix-map key command))
+        (t (define-key slime-mode-map key command))))
 
 (defun slime-init-keymaps ()
   "(Re)initialize the keymaps for `slime-mode'."
   (interactive)
+  (setq slime-prefix-map (make-sparse-keymap))
+  (define-key slime-mode-map slime-prefix-key slime-prefix-map)
   (loop for (key command . keys) in slime-keys
         do (apply #'slime-define-key key command :allow-other-keys t keys))
   ;; Documentation
@@ -634,7 +638,7 @@
                (let ((modified (slime-control-modified-char key)))
                  (define-key slime-doc-map (vector modified) command)))))
   ;; C-c C-d is the prefix for the doc map.
-  (slime-define-key "\C-d" slime-doc-map :prefixed t :inferior t)
+  (slime-define-key "\C-d" slime-doc-map :prefixed t)
   ;; Who-xref
   (setq slime-who-map (make-sparse-keymap))
   (loop for (key command) in slime-who-bindings
@@ -644,7 +648,7 @@
              (let ((modified (slime-control-modified-char key)))
                  (define-key slime-who-map (vector modified) command))))
   ;; C-c C-w is the prefix for the who-xref map.
-  (slime-define-key "\C-w" slime-who-map :prefixed t :inferior t))
+  (slime-define-key "\C-w" slime-who-map :prefixed t))
 
 (defun slime-control-modified-char (char)
   "Return the control-modified version of CHAR."
@@ -7988,7 +7992,8 @@
   ([(shift tab)] 'slime-inspector-previous-inspectable-object) ; Emacs translates S-TAB
   ([backtab]     'slime-inspector-previous-inspectable-object) ; to BACKTAB on X.
   ("\M-." 'slime-edit-definition)
-  ("." 'slime-inspector-show-source))
+  ("." 'slime-inspector-show-source)
+  (slime-prefix-key slime-prefix-map))
 
 
 ;;;; Buffer selector




More information about the slime-cvs mailing list