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

Luke Gorrie lgorrie at common-lisp.net
Fri Jan 9 23:00:26 UTC 2004


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

Modified Files:
	slime.el 
Log Message:
(slime-next-connection): Fixed a bug where buffer-local connection
bindings could get in the way and prevent the connection from actually
changing.

(slime-complete-restore-window-configuration): Wrap
`set-window-configuration' in `save-excursion'. This fixes a problem
where the cursor would end up in the wrong place after completion in
XEmacs.

Date: Fri Jan  9 18:00:26 2004
Author: lgorrie

Index: slime/slime.el
diff -u slime/slime.el:1.169 slime/slime.el:1.170
--- slime/slime.el:1.169	Fri Jan  9 16:40:26 2004
+++ slime/slime.el	Fri Jan  9 18:00:25 2004
@@ -1160,14 +1160,14 @@
      , at body))
 
 (defun slime-select-connection (process)
-  (setq slime-default-connection process)
-  (unless (get-buffer-window (slime-output-buffer) t)
-    (message (format "Selected connection: %S" (slime-connection-number)))))
+  (setq slime-default-connection process))
 
 (defun slime-connection-close-hook (process)
   (when (eq process slime-default-connection)
     (when slime-net-processes
-      (slime-select-connection (car slime-net-processes)))))
+      (slime-select-connection (car slime-net-processes))
+      (message (format "Default connection closed; switched to #%S"
+                       (slime-connection-number))))))
 
 (defun slime-connection-number (&optional connection)
   (slime-with-connection-buffer (connection)
@@ -1181,10 +1181,12 @@
   (interactive)
   (when (null slime-net-processes)
     (error "Not connected."))
-  (let ((conn (nth (mod (1+ (or (position (slime-connection) slime-net-processes) 0))
+  (let ((conn (nth (mod (1+ (or (position slime-default-connection slime-net-processes)
+                                0))
                         (length slime-net-processes))
                    slime-net-processes)))
-    (slime-select-connection conn)))
+    (slime-select-connection conn)
+    (message (format "Selected connection #%S" (slime-connection-number)))))
 
 (put 'slime-with-connection-buffer 'lisp-indent-function 1)
 
@@ -2996,7 +2998,8 @@
   (remove-hook 'pre-command-hook
                'slime-complete-maybe-restore-window-confguration)
   (when slime-complete-saved-window-configuration
-    (set-window-configuration slime-complete-saved-window-configuration)
+    (save-excursion
+      (set-window-configuration slime-complete-saved-window-configuration))
     (setq slime-complete-saved-window-configuration nil))
   (when (get-buffer slime-completions-buffer-name)
     (bury-buffer slime-completions-buffer-name)))





More information about the slime-cvs mailing list