From c967f55a01c54c60802d1f5dff47f54541d6157a Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 4 Apr 2021 21:35:56 +0200 Subject: [PATCH] Work around issue with (setq Man-notify-method 'aggressive) * lisp/man.el (Man-bgproc-sentinel): Check that the window still exists before trying to select it (bug#38164). --- lisp/man.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/man.el b/lisp/man.el index abb9bbad8fd..9b941a2b3d2 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -1503,7 +1503,9 @@ manpage command." (quit-restore-window (get-buffer-window Man-buffer t) 'kill) ;; Ensure that we end up in the correct window. - (select-window (old-selected-window))) + (let ((old-window (old-selected-window))) + (when (window-live-p old-window) + (select-window old-window)))) (kill-buffer Man-buffer))) (when message -- 2.39.5