[slime-cvs] CVS slime

heller heller at common-lisp.net
Thu Mar 27 11:46:50 UTC 2008


Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv20050

Modified Files:
	ChangeLog slime.el swank.lisp 
Log Message:
By default, don't ask if SLIME should be started.

* slime.el (slime-auto-connect): New variable.
(slime-auto-connect): New function.
(slime-connection): Use it.

--- /project/slime/cvsroot/slime/ChangeLog	2008/03/27 11:46:41	1.1339
+++ /project/slime/cvsroot/slime/ChangeLog	2008/03/27 11:46:50	1.1340
@@ -25,6 +25,14 @@
 	(def-slime-test locally-bound-debugger-hook): New test case; tests
 	that a locally-bound *DEBUGGER-HOOK* is adhered, and not skipped.
 	
+2008-03-26  Helmut Eller  <heller at common-lisp.net>
+
+	By default, don't ask if SLIME should be started.
+
+	* slime.el (slime-auto-connect): New variable.
+	(slime-auto-connect): New function.
+	(slime-connection): Use it.
+
 2008-03-24  Helmut Eller  <heller at common-lisp.net>
 
 	* slime.el (slime-check-version): New function.  Make the
--- /project/slime/cvsroot/slime/slime.el	2008/03/27 11:46:34	1.934
+++ /project/slime/cvsroot/slime/slime.el	2008/03/27 11:46:50	1.935
@@ -1736,7 +1736,7 @@
   (or slime-dispatching-connection
       slime-buffer-connection
       slime-default-connection))
-  
+
 (defun slime-connection ()
   "Return the connection to use for Lisp interaction.
 Signal an error if there's no connection."
@@ -1744,17 +1744,25 @@
     (cond ((and (not conn) slime-net-processes)
            (error "No default connection selected."))
           ((not conn)
-           (cond ((y-or-n-p "No connection.  Start Slime? ")
-                  (save-window-excursion
-                    (slime)
-                    (while (not (slime-current-connection))
-                      (sleep-for 1))
-                    (slime-connection)))
-                 (t (error "Not connected."))))
+           (or (slime-auto-connect)
+               (error "Not connected.")))
           ((not (eq (process-status conn) 'open))
            (error "Connection closed."))
           (t conn))))
 
+(defvar slime-auto-connect 'never)
+
+(defun slime-auto-connect ()
+  (cond ((or (eq slime-auto-connect 'always)
+             (and (eq slime-auto-connect 'ask)
+                  (y-or-n-p "No connection.  Start Slime? ")))
+         (save-window-excursion
+           (slime)
+           (while (not (slime-current-connection))
+             (sleep-for 1))
+           (slime-connection)))
+        (t nil)))
+
 (defun slime-select-connection (process)
   "Make PROCESS the default connection."
   (setq slime-default-connection process))
--- /project/slime/cvsroot/slime/swank.lisp	2008/03/27 11:46:41	1.541
+++ /project/slime/cvsroot/slime/swank.lisp	2008/03/27 11:46:50	1.542
@@ -3076,7 +3076,7 @@
 
 (add-hook *pre-reply-hook* 'sync-indentation-to-emacs)
 
-(defun before-init (version init)
+(defun before-init (version load-path)
   (setq *swank-wire-protocol-version* version)
   (setq *load-path* load-path)
   (swank-backend::warn-unimplemented-interfaces))




More information about the slime-cvs mailing list