[MLton-commit] r5721

Vesa Karvonen vesak at mlton.org
Wed Jul 4 02:08:17 PDT 2007


Remove dead live builds.
----------------------------------------------------------------------

U   mlton/trunk/ide/emacs/bg-build-mode.el

----------------------------------------------------------------------

Modified: mlton/trunk/ide/emacs/bg-build-mode.el
===================================================================
--- mlton/trunk/ide/emacs/bg-build-mode.el	2007-07-03 19:52:58 UTC (rev 5720)
+++ mlton/trunk/ide/emacs/bg-build-mode.el	2007-07-04 09:08:16 UTC (rev 5721)
@@ -231,9 +231,19 @@
 
 (defun bg-build-interrupt-build (project)
   (let* ((file (car project))
-         (live (assoc file bg-build-live-builds)))
-    (if live
-        (interrupt-process (cdr live)))
+         (proc (bg-build-assoc-cdr file bg-build-live-builds)))
+    (cond
+     ((and proc (process-live-p proc))
+      ;; Ok.  We interrupt the build.
+      (interrupt-process proc))
+     (proc
+      ;; Hmm...  Shouldn't normally happen.  The sentinel is supposed
+      ;; to remove the build from the live list, so probably something
+      ;; unexpected occurred in the sentinel.
+      (setq bg-build-live-builds
+            (bg-build-remove-from-assoc
+             bg-build-live-builds
+             file))))
     (bg-build-check-build-queue)))
 
 (defvar bg-build-messages nil)




More information about the MLton-commit mailing list