[slime-cvs] CVS slime

CVS User heller heller at common-lisp.net
Sun Dec 16 13:38:08 UTC 2012


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

Modified Files:
	ChangeLog slime.el 
Log Message:
* slime.el (slime-attempt-connection): Show the attempt counter.

--- /project/slime/cvsroot/slime/ChangeLog	2012/12/03 03:43:16	1.2373
+++ /project/slime/cvsroot/slime/ChangeLog	2012/12/16 13:38:07	1.2374
@@ -1,3 +1,7 @@
+2012-12-16  Helmut Eller  <heller at common-lisp.net>
+
+	* slime.el (slime-attempt-connection): Show the attempt counter.
+
 2012-12-03  Stas Boukarev  <stassats at gmail.com>
 
 	* swank-backend.lisp (deinit-log-output): Move from swank-sbcl,
--- /project/slime/cvsroot/slime/slime.el	2012/11/23 17:51:16	1.1424
+++ /project/slime/cvsroot/slime/slime.el	2012/12/16 13:38:07	1.1425
@@ -1383,12 +1383,13 @@
 (defun slime-attempt-connection (process retries attempt)
   ;; A small one-state machine to attempt a connection with
   ;; timer-based retries.
-  (let ((file (slime-swank-port-file))) 
+  (slime-cancel-connect-retry-timer)
+  (let ((file (slime-swank-port-file)))
     (unless (active-minibuffer-window)
-      (message "Polling %S.. (Abort with `M-x slime-abort-connection'.)" file))
+      (message "Polling %S .. %d (Abort with `M-x slime-abort-connection'.)"
+               file attempt))
     (cond ((and (file-exists-p file)
                 (> (nth 7 (file-attributes file)) 0)) ; file size
-           (slime-cancel-connect-retry-timer)
            (let ((port (slime-read-swank-port))
                  (args (slime-inferior-lisp-args process)))
              (slime-delete-swank-port-file 'message)
@@ -1396,24 +1397,22 @@
                                      (plist-get args :coding-system))))
                (slime-set-inferior-process c process))))
           ((and retries (zerop retries))
-           (slime-cancel-connect-retry-timer)
            (message "Gave up connecting to Swank after %d attempts." attempt))
           ((eq (process-status process) 'exit)
-           (slime-cancel-connect-retry-timer)
            (message "Failed to connect to Swank: inferior process exited."))
           (t
-           (when (and (file-exists-p file) 
+           (when (and (file-exists-p file)
                       (zerop (nth 7 (file-attributes file))))
              (message "(Zero length port file)")
              ;; the file may be in the filesystem but not yet written
              (unless retries (setq retries 3)))
-           (unless slime-connect-retry-timer
-             (setq slime-connect-retry-timer
-                   (run-with-timer
-                    0.3 0.3
-                    #'slime-timer-call #'slime-attempt-connection 
-                    process (and retries (1- retries)) 
-                    (1+ attempt))))))))
+           (assert (not slime-connect-retry-timer))
+           (setq slime-connect-retry-timer
+                 (run-with-timer
+                  0.3 0.3
+                  #'slime-timer-call #'slime-attempt-connection
+                  process (and retries (1- retries))
+                  (1+ attempt)))))))
 
 (defun slime-timer-call (fun &rest args)
   "Call function FUN with ARGS, reporting all errors.





More information about the slime-cvs mailing list