branch: externals/el-job
commit 4377f11db548f7cf2eeba7352ca0420d98cabe86
Author: Martin Edström <meedstro...@gmail.com>
Commit: Martin Edström <meedstro...@gmail.com>

    Add a debug message
---
 el-job.el | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/el-job.el b/el-job.el
index 33a1f3095d..da4b038896 100644
--- a/el-job.el
+++ b/el-job.el
@@ -666,13 +666,12 @@ same ID still has the benchmarks table and possibly 
queued input."
     (dolist (proc (append .busy .ready))
       (let ((buf (process-buffer proc)))
         (delete-process proc)
-        (and (= 0 el-job--debug-level)
-             ;; Why can BUF be nil?
-             ;; And why is `kill-buffer' so unsafe?
-             ;; Can we upstream a `kill-buffer-safe' or `kill-buffer-assert'
-             ;; or `kill-live-buffer' that errors when argument is nil?
-             (buffer-live-p buf)
-             (kill-buffer buf))))
+        ;; Why can BUF be nil?  And why is `kill-buffer' so unsafe? can we
+        ;; upstream a `kill-buffer-safe' that errors when given nil argument?
+        (if (buffer-live-p buf)
+            (when (= 0 el-job--debug-level)
+              (kill-buffer buf))
+          (el-job--dbg 1 "Process had no buffer: %s" proc))))
     (and (= 0 el-job--debug-level)
          (buffer-live-p .stderr)
          (kill-buffer .stderr))

Reply via email to