[slime-cvs] CVS update: slime/ChangeLog slime/slime.el

Nikodemus Siivola nsiivola at common-lisp.net
Sun Dec 18 17:24:39 UTC 2005


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv1674

Modified Files:
	ChangeLog slime.el 
Log Message:
Be more careful when adding slime-self-insert-command bindings
Date: Sun Dec 18 18:24:37 2005
Author: nsiivola

Index: slime/ChangeLog
diff -u slime/ChangeLog:1.820 slime/ChangeLog:1.821
--- slime/ChangeLog:1.820	Fri Dec 16 14:35:14 2005
+++ slime/ChangeLog	Sun Dec 18 18:24:36 2005
@@ -1,3 +1,12 @@
+2005-12-18  Nikodemus Siivola <nikodemus at random-state.net>
+
+	* slime.el (slime-mode-hook): Bind simple characters to
+	slime-self-insert-command only if there was no previous local
+	binding, and the major mode is _not_ slime-repl-mode. This
+	restores keybindings of slime-xref-mode and prevents us from
+	stomping on user bindings. The hilighting also makes no sense in
+	the REPL.
+
 2005-12-16  Nikodemus Siivola <nikodemus at random-state.net>
 
 	* slime.el (slime-selector-method: ?r): If no connection offer to


Index: slime/slime.el
diff -u slime/slime.el:1.570 slime/slime.el:1.571
--- slime/slime.el:1.570	Fri Dec 16 14:35:13 2005
+++ slime/slime.el	Sun Dec 18 18:24:36 2005
@@ -239,7 +239,7 @@
       (((class color) (background dark))
        (:background "yellow"))
       (t (:background "yellow")))
-  "Face for displaying edit but not compilide code."
+  "Face for displaying edit but not compiled code."
   :group 'slime-mode-faces)
 
 ;;;;; slime-mode-faces
@@ -9889,7 +9889,7 @@
   (interactive)
   (self-insert-command 1)
   (when (and slime-display-edit-hilights (slime-connected-p))
-    (message "Settingup face.")
+    (message "Setting up face.")
     (let ((overlay (make-overlay (- (point) 1) (point))))
       (flet ((putp (name value) (overlay-put overlay name value)))
         (putp 'face 'slime-display-edit-face)
@@ -9897,9 +9897,12 @@
 
 (add-hook 'slime-mode-hook
           (lambda ()
-            (dotimes (i 127)
-              (when (> i 31)
-                (local-set-key (string i) 'slime-self-insert-command)))))
+            (unless (eq 'slime-repl-mode major-mode)
+              (dotimes (i 127)
+                (when (> i 31)                
+                  ;; Don't stomp on previous bindings!
+                  (when (null (local-key-binding (string i)))
+                    (local-set-key (string i) 'slime-self-insert-command)))))))
 
 
 ;;;; Finishing up




More information about the slime-cvs mailing list