emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/async 6707395c1a 1/6: fix: do not kill process buffer i


From: ELPA Syncer
Subject: [elpa] externals/async 6707395c1a 1/6: fix: do not kill process buffer if it was already killed
Date: Mon, 13 Mar 2023 11:57:20 -0400 (EDT)

branch: externals/async
commit 6707395c1aa988ba923dcb2967f4095eaf1abeba
Author: Matus Goljer <matus.goljer@gmail.com>
Commit: Matus Goljer <matus.goljer@gmail.com>

    fix: do not kill process buffer if it was already killed
    
    Fixes #132
---
 async.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/async.el b/async.el
index beb4375efd..e4a2854590 100644
--- a/async.el
+++ b/async.el
@@ -171,7 +171,10 @@ It is intended to be used as follows:
                     (prog1
                         (funcall async-callback proc)
                       (unless async-debug
-                        (kill-buffer (current-buffer))))
+                        ;; we need to check this because theoretically
+                        ;; `async-callback' could've killed it already
+                        (when (buffer-live-p (process-buffer proc))
+                          (kill-buffer (process-buffer proc)))))
                   (set (make-local-variable 'async-callback-value) proc)
                   (set (make-local-variable 'async-callback-value-set) t))
               ;; Maybe strip out unreadable "#"; They are replaced by



reply via email to

[Prev in Thread] Current Thread [Next in Thread]