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

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

[nongnu] elpa/sweeprolog c22703ff36 07/13: ; Don't refuse to kill top-le


From: ELPA Syncer
Subject: [nongnu] elpa/sweeprolog c22703ff36 07/13: ; Don't refuse to kill top-level buffer with deleted process
Date: Sun, 17 Sep 2023 04:00:42 -0400 (EDT)

branch: elpa/sweeprolog
commit c22703ff3661e52fffa3836f7788a3e87aa200a8
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>

    ; Don't refuse to kill top-level buffer with deleted process
---
 sweeprolog.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sweeprolog.el b/sweeprolog.el
index 9adaab8bf9..ada99c51bf 100644
--- a/sweeprolog.el
+++ b/sweeprolog.el
@@ -3281,10 +3281,11 @@ GOAL.  Otherwise, GOAL is set to a default value 
specified by
   (setq sweeprolog-top-level-timer (run-with-idle-timer 0.2 t 
#'sweeprolog-colourise-query (current-buffer)))
   (add-hook 'kill-buffer-hook
             (lambda ()
-              (condition-case _
-                  (sweeprolog-top-level-signal (current-buffer)
-                                               "thread_exit(0)")
-                (prolog-exception nil)))
+              (when (process-live-p (get-buffer-process (current-buffer)))
+                (condition-case _
+                    (sweeprolog-top-level-signal (current-buffer)
+                                                 "thread_exit(0)")
+                  (prolog-exception nil))))
             nil t)
   (add-hook 'kill-buffer-hook
             (lambda ()



reply via email to

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