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

Helmut Eller heller at common-lisp.net
Wed Jun 1 14:28:27 UTC 2005


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

Modified Files:
	slime.el 
Log Message:
(slime-background-activities-enabled-p): Return nil instead of
signalling an error if there is a open but no default connection.
(slime-current-connection): New helper function.
(slime-connection): Use it.

Date: Wed Jun  1 16:28:26 2005
Author: heller

Index: slime/slime.el
diff -u slime/slime.el:1.502 slime/slime.el:1.503
--- slime/slime.el:1.502	Wed Jun  1 15:48:38 2005
+++ slime/slime.el	Wed Jun  1 16:28:26 2005
@@ -1776,11 +1776,17 @@
 Used for all Lisp communication, except when overridden by
 `slime-dispatching-connection' or `slime-buffer-connection'.")
 
+(defun slime-current-connection ()
+  "Return the connection to use for Lisp interaction.
+Return nil if there's no connection."
+  (or slime-dispatching-connection
+      slime-buffer-connection
+      slime-default-connection))
+  
 (defun slime-connection ()
-  "Return the connection to use for Lisp interaction."
-  (let ((conn (or slime-dispatching-connection
-                  slime-buffer-connection
-                  slime-default-connection)))
+  "Return the connection to use for Lisp interaction.
+Signal an error if there's no connection."
+  (let ((conn (slime-current-connection)))
     (cond ((and (not conn) slime-net-processes)
            (error "No default connection selected."))
           ((not conn)
@@ -2033,7 +2039,8 @@
   "*If true, don't send background requests if Lisp is already busy.")
 
 (defun slime-background-activities-enabled-p ()
-  (and (slime-connected-p)
+  (and slime-mode
+       (slime-current-connection)
        (or (not (slime-busy-p))
            (not slime-inhibit-pipelining))))
 




More information about the slime-cvs mailing list