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

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


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

Modified Files:
	slime.el 
Log Message:
(slime-activate-state): Only update state name when
`slime-default-connection' activates. This fixes an annoying
"Selecting deleted buffer" bug that prevented SLIME from being
restarted.

Date: Fri Jan  9 16:40:26 2004
Author: lgorrie

Index: slime/slime.el
diff -u slime/slime.el:1.168 slime/slime.el:1.169
--- slime/slime.el:1.168	Fri Jan  9 15:43:59 2004
+++ slime/slime.el	Fri Jan  9 16:40:26 2004
@@ -307,10 +307,6 @@
   ;; Fake binding to coax `define-minor-mode' to create the keymap
   '((" " 'undefined)))
 
-(defvar slime-state-name "[??]"
-  "Name of the current state of `slime-default-connection'.
-For display in the mode-line.")
-
 ;; Setup the mode-line to say when we're in slime-mode, and which CL
 ;; package we think the current buffer belongs to.
 (add-to-list 'minor-mode-alist
@@ -1152,6 +1148,10 @@
         (setq slime-buffer-connection nil)
       (error "Buffer's connection closed."))))
 
+(defvar slime-state-name "[??]"
+  "Name of the current state of `slime-default-connection'.
+For display in the mode-line.")
+
 (defmacro* slime-with-connection-buffer ((&optional process) &rest body)
   "Execute BODY in the process-buffer of PROCESS.
 If PROCESS is not specified, `slime-connection' is used."
@@ -1159,10 +1159,6 @@
        (process-buffer (or ,process (slime-connection) (error "No connection")))
      , at body))
 
-(defun slime-connection-number (&optional connection)
-  (slime-with-connection-buffer (connection)
-    slime-connection-number))
-
 (defun slime-select-connection (process)
   (setq slime-default-connection process)
   (unless (get-buffer-window (slime-output-buffer) t)
@@ -1173,6 +1169,10 @@
     (when slime-net-processes
       (slime-select-connection (car slime-net-processes)))))
 
+(defun slime-connection-number (&optional connection)
+  (slime-with-connection-buffer (connection)
+    slime-connection-number))
+
 (add-hook 'slime-net-process-close-hooks 'slime-connection-close-hook)
 
 (defun slime-next-connection ()
@@ -1339,7 +1339,8 @@
 This delivers an (activate) event to the state function, and updates
 the state name for the modeline."
   (let ((state (slime-current-state)))
-    (slime-update-state-name)
+    (when (eq (slime-connection) slime-default-connection)
+      (slime-update-state-name))
     (slime-dispatch-event '(activate))))
 
 (defun slime-update-state-name ()





More information about the slime-cvs mailing list