From: Martin Rudalics Date: Thu, 17 Oct 2019 17:35:29 +0000 (+0200) Subject: In 'bury-buffer' don't try to remove current buffer from minibuffer window X-Git-Tag: emacs-27.0.90~1012 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=34923412b5a5888f0f50b3009a6225670be4c026;p=emacs.git In 'bury-buffer' don't try to remove current buffer from minibuffer window * lisp/window.el (bury-buffer): Don't try to remove current buffer from minibuffer window. --- diff --git a/lisp/window.el b/lisp/window.el index 058e89df7c7..bf213547039 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -4732,13 +4732,16 @@ displayed there." ;; Handle case where `buffer-or-name' is nil and the current buffer ;; is shown in the selected window. (cond - ((or buffer-or-name (not (eq buffer (window-buffer))))) + ((or buffer-or-name + (not (eq buffer (window-buffer))) + ;; Don't try to delete the minibuffer window, undedicate it + ;; or switch to a previous buffer in it. + (window-minibuffer-p))) ((window--delete nil t)) (t ;; Switch to another buffer in window. (set-window-dedicated-p nil nil) (switch-to-prev-buffer nil 'bury))) - ;; Always return nil. nil))