Hello there, I think there is a small bug with quit-window / quit-restore-window : with emacs -Q ;; set some rules (setq display-buffer-alist '(("\\*\\(Backtrace\\|Messages\\)\\*" (display-buffer-in-side-window) (window-height . 0.2) (side . bottom)))) ;; trigger a logical error to display the *Backtrace* buffer (> vim emacs) ;; display the *Messages* buffer (view-echo-area-messages) ;; mess the `quit-restore' window parameter (kill-buffer (get-buffer "*Backtrace*")) ;; which looks now like that in the *Messages* window : ;; ((quit-restore) (window-slot . 0) (window-side . bottom)) ;; try to quit the *Messages* window (progn (select-window (view-echo-area-messages)) (quit-window)) ;; nothing happens : The first `cond' of quit-restore-window end up to 't, it calls (switch-to-prev-buffer window bury-or-kill) but there is no previous-window available. The first patch adress this, and a similar one : when there is a previous-buffer available, but it referes to the same buffer. (eg: try the recipe again but exchange the role of *Messages* and *Backtrace*, you will finish with a blank buffer for backtrace, that you can quit again to end up to the same point) The second patch is a proposition to clarify a little the code.