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

Luke Gorrie lgorrie at common-lisp.net
Fri Jul 23 16:35:37 UTC 2004


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

Modified Files:
	slime.el 
Log Message:
(slime-set-state): Show the message in the modeline in the case where
we aren't connected. Otherwise the "not connected" status is ignored.

(slime-net-sentinel): Close the connection before changing the status
message. The old behaviour of this combined with the old behaviour of
`slime-set-state' could generally cause spurious errors after a
connection was closed.

Date: Fri Jul 23 09:35:37 2004
Author: lgorrie

Index: slime/slime.el
diff -u slime/slime.el:1.377 slime/slime.el:1.378
--- slime/slime.el:1.377	Thu Jul 22 02:38:43 2004
+++ slime/slime.el	Fri Jul 23 09:35:37 2004
@@ -1370,8 +1370,8 @@
 (defun slime-net-sentinel (process message)
   (when (ignore-errors (eq (process-status (inferior-lisp-proc)) 'open))
     (message "Lisp connection closed unexpectedly: %s" message))
-  (slime-set-state "[not connected]")
-  (slime-net-close process))
+  (slime-net-close process)
+  (slime-set-state "[not connected]"))
 
 ;;; Socket input is handled by `slime-net-filter', which decodes any
 ;;; complete messages and hands them off to the event dispatcher.
@@ -1540,8 +1540,8 @@
   "Set the current connection's informational state name.
 If this is the default connection then the state will be displayed in
 the modeline."
-  (when (and (slime-connected-p)
-             (eq (slime-connection) slime-default-connection))
+  (when (or (not (slime-connected-p))
+            (eq (slime-connection) slime-default-connection))
     (setq slime-state-name name)
     (force-mode-line-update)))
 





More information about the slime-cvs mailing list