[slime-cvs] CVS slime/contrib

CVS User heller heller at common-lisp.net
Mon Jan 5 21:57:54 UTC 2009


Update of /project/slime/cvsroot/slime/contrib
In directory cl-net:/tmp/cvs-serv12675/contrib

Modified Files:
	inferior-slime.el slime-presentations.el slime-repl.el 
Log Message:
Use keymap inheritance to share bindings in various modes.

* slime.el (slime-parent-map): New keymap.
(slime-mode-map, slime-popup-buffer-mode-map, sldb-mode-map)
(slime-inspector-mode-map): Use it.
(slime-parent-bindings, slime-prefix-bindings): New variables.
(slime-prefix-key, slime-define-key): Deleted.

Update contribs accordinly.

--- /project/slime/cvsroot/slime/contrib/inferior-slime.el	2008/12/31 11:25:22	1.5
+++ /project/slime/cvsroot/slime/contrib/inferior-slime.el	2009/01/05 21:57:54	1.6
@@ -79,20 +79,13 @@
 
 (defun inferior-slime-init-keymap ()
   (let ((map inferior-slime-mode-map))
+    (set-keymap-parent map slime-parent-map)
     (slime-define-keys map
       ([return]			'inferior-slime-return)
       ([(control return)]	'inferior-slime-closing-return)
       ([(meta control ?m)]	'inferior-slime-closing-return)
       ("\t"			'slime-indent-and-complete-symbol)
-      (" "			'slime-space)
-      ("\C-c\C-d" slime-doc-map)
-      ("\C-c\C-w" slime-who-map))
-    (loop for (key command . keys) in slime-keys do
-	  (destructuring-bind (&key prefixed inferior &allow-other-keys) keys
-	    (when prefixed
-	      (setq key (concat slime-prefix-key key)))
-	    (when inferior
-	      (define-key map key command))))))
+      (" "			'slime-space))))
 
 (inferior-slime-init-keymap)
 
--- /project/slime/cvsroot/slime/contrib/slime-presentations.el	2008/09/24 09:14:02	1.20
+++ /project/slime/cvsroot/slime/contrib/slime-presentations.el	2009/01/05 21:57:54	1.21
@@ -698,10 +698,7 @@
 				  slime-presentation-bindings)
   (define-key slime-presentation-command-map "\M-o" 'slime-clear-presentations)
   ;; C-c C-v is the prefix for the presentation-command map.
-  (slime-define-key "\C-v" slime-presentation-command-map :prefixed t)
-  (define-key slime-repl-mode-map "\C-c\C-v" slime-presentation-command-map)
-  (define-key sldb-mode-map "\C-c\C-v" slime-presentation-command-map)
-  (define-key slime-inspector-mode-map "\C-c\C-v" slime-presentation-command-map))
+  (define-key slime-prefix-map "\C-v" slime-presentation-command-map))
 
 (defun slime-presentation-around-or-before-point-p ()
   (multiple-value-bind (presentation beg end) 
--- /project/slime/cvsroot/slime/contrib/slime-repl.el	2009/01/04 20:53:06	1.9
+++ /project/slime/cvsroot/slime/contrib/slime-repl.el	2009/01/05 21:57:54	1.10
@@ -413,18 +413,17 @@
 
 (defvar slime-repl-mode-map)
 
-(setq slime-repl-mode-map (make-sparse-keymap))
-(set-keymap-parent slime-repl-mode-map lisp-mode-map)
+(let ((map (copy-keymap slime-parent-map)))
+  (set-keymap-parent map lisp-mode-map)
+  (setq slime-repl-mode-map (make-sparse-keymap))
+  (set-keymap-parent slime-repl-mode-map map))
+
+(slime-define-keys slime-prefix-map
+  ("\C-z" 'slime-switch-to-output-buffer)
+  ("\M-p" 'slime-repl-set-package))
 
-(dolist (spec slime-keys)
-  (destructuring-bind (key command &key inferior prefixed 
-                           &allow-other-keys) spec
-    (when inferior
-      (let ((key (if prefixed (concat slime-prefix-key key) key)))
-        (define-key slime-repl-mode-map key command)))))
-
-(slime-define-keys slime-mode-map
-  ("\C-c\C-z" 'slime-switch-to-output-buffer))
+(slime-define-keys slime-mode-map 
+  ("~" 'slime-sync-package-and-default-directory))
 
 (slime-define-keys slime-connection-list-mode-map
   ((kbd "RET") 'slime-goto-connection)
@@ -444,8 +443,8 @@
   ((kbd "C-<down>") 'slime-repl-forward-input)
   ("\M-r" 'slime-repl-previous-matching-input)
   ("\M-s" 'slime-repl-next-matching-input)
-  ("\C-c\C-c" 'slime-interrupt)
   ("\C-c\C-b" 'slime-interrupt)
+  ("\C-c\C-c" 'slime-interrupt)
   ("\C-c:"    'slime-interactive-eval)
   ("\C-c\C-e" 'slime-interactive-eval)
   ("\C-cE"     'slime-edit-value)





More information about the slime-cvs mailing list