From c22703ff3661e52fffa3836f7788a3e87aa200a8 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Thu, 14 Sep 2023 22:48:30 +0200 Subject: [PATCH] ; 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 9adaab8..ada99c5 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 () -- 2.39.2