diff -u --label /usr/share/emacs/28.0.50/lisp/window.el.gz --label /home/user/src/patches/window.el /tmp/jka-comHlW7wF /home/user/src/patches/window.el --- /usr/share/emacs/28.0.50/lisp/window.el.gz +++ /home/user/src/patches/window.el @@ -5151,7 +5151,9 @@ (set-window-parameter window 'quit-restore nil) ;; Make sure that WINDOW is no more dedicated. (set-window-dedicated-p window nil) - (switch-to-prev-buffer window bury-or-kill))) + (if prev-buffer + (switch-to-prev-buffer window bury-or-kill) + (window--delete window nil (eq bury-or-kill 'kill))))) ;; Deal with the buffer. (cond Diff finished. Tue May 11 21:26:38 2021