[slime-cvs] CVS slime

CVS User trittweiler trittweiler at common-lisp.net
Tue Dec 2 22:00:41 UTC 2008


Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv16430

Modified Files:
	slime.el ChangeLog 
Log Message:

* slime.el (slime-compute-modeline-connection-state): Fix
  computation of debugged requests.


--- /project/slime/cvsroot/slime/slime.el	2008/12/02 21:41:05	1.1067
+++ /project/slime/cvsroot/slime/slime.el	2008/12/02 22:00:41	1.1068
@@ -482,14 +482,17 @@
   (let* ((conn (slime-current-connection))
          (new-state (slime-compute-connection-state conn)))
     (if (eq new-state :connected)
-        (let ((n (length (slime-rex-continuations)))
-              (m (length (sldb-debugged-continuations conn))))
-          (cond ((= n 0)
-                 nil)
-                ((= m 0)
-                 n)
-                (t
-                 (format "%s/%s" (- n m) m))))
+        (let ((rex-cs  (length (slime-rex-continuations)))
+              (sldb-cs (length (sldb-debugged-continuations conn)))
+              ;; There can be SLDB buffers which have no continuations
+              ;; attached to it, e.g. the one resulting from
+              ;; `slime-interrupt'.
+              (sldbs   (length (sldb-buffers conn))))
+          (if (= sldbs 0)
+              (format "%s" rex-cs)
+              (format "%s/%s"
+                      (if (= rex-cs 0) 0 (- rex-cs sldb-cs)) 
+                      sldbs)))
       (slime-connection-state-as-string new-state))))
 
 (defun slime-compute-modeline-string (conn state pkg)
@@ -2352,6 +2355,7 @@
 (defun slime-stale-connection-p (conn)
   (not (memq conn slime-net-processes)))
 
+;; UNUSED
 (defun slime-debugged-connection-p (conn)
   ;; This previously was (AND (SLDB-DEBUGGED-CONTINUATIONS CONN) T),
   ;; but an SLDB buffer may exist without having continuations
@@ -6759,9 +6763,13 @@
 
 ;;;;; SLDB buffer creation & update
 
-(defun sldb-buffers ()
-  "Return a list of all sldb buffers."
-  (slime-filter-buffers (lambda () (eq major-mode 'sldb-mode))))
+(defun sldb-buffers (&optional connection)
+  "Return a list of all sldb buffers (belonging to CONNECITON.)"
+  (if connection
+      (slime-filter-buffers (lambda ()
+                              (and (eq slime-buffer-connection connection)
+                                   (eq major-mode 'sldb-mode))))
+      (slime-filter-buffers (lambda () (eq major-mode 'sldb-mode)))))
 
 (defun sldb-find-buffer (thread &optional connection)
   (let ((connection (or connection (slime-connection))))
--- /project/slime/cvsroot/slime/ChangeLog	2008/12/02 21:41:05	1.1589
+++ /project/slime/cvsroot/slime/ChangeLog	2008/12/02 22:00:41	1.1590
@@ -1,10 +1,15 @@
+2008-12-02  Tobias C. Rittweiler  <tcr at freebits.de>
+
+	* slime.el (slime-compute-modeline-connection-state): Fix
+	computation of debugged requests.
+
 2008-11-30  Gábor Melis  <mega at retes.hu>
 
-      * slime.el (slime-compute-modeline-connection-state): Print the
-      number of debugged requests if non-zero.
-      (slime-connection-state-as-string): Removed unused branches.
-      (slime-compute-connection-state): Removed :debugged branch making
-      most likely return :connected instead.
+	* slime.el (slime-compute-modeline-connection-state): Print the
+	number of debugged requests if non-zero.
+	(slime-connection-state-as-string): Removed unused branches.
+	(slime-compute-connection-state): Removed :debugged branch making
+	most likely return :connected instead.
 
 2008-12-02  Tobias C. Rittweiler  <tcr at freebits.de>
 





More information about the slime-cvs mailing list