emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 3492341: In 'bury-buffer' don't try to remove curre


From: Martin Rudalics
Subject: [Emacs-diffs] master 3492341: In 'bury-buffer' don't try to remove current buffer from minibuffer window
Date: Thu, 17 Oct 2019 13:36:20 -0400 (EDT)

branch: master
commit 34923412b5a5888f0f50b3009a6225670be4c026
Author: Martin Rudalics <address@hidden>
Commit: Martin Rudalics <address@hidden>

    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.
---
 lisp/window.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/window.el b/lisp/window.el
index 058e89d..bf21354 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))
 



reply via email to

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