Don't show other windows in bottom window

If possible.
This commit is contained in:
Tom Willemsen 2012-09-18 20:22:58 +02:00
parent 5857c61382
commit 36ebaafbc8

11
bw.el
View file

@ -66,8 +66,19 @@
(local-set-key (kbd "C-c C-q") 'delete-window) (local-set-key (kbd "C-c C-q") 'delete-window)
win)) win))
(defun bw-display-in-other-window (buffer alist)
"Show BUFFER in any window that is not the bottom window.
Discard ALIST."
(let ((win (get-buffer-window buffer)))
(when (window-parameter win 'bw-bottom)
(setq win (next-window win 'no)))
(set-window-buffer win buffer)))
(add-to-list 'display-buffer-alist (add-to-list 'display-buffer-alist
'("^\\*.*\\*$" . ((bw-display-in-bottom-window . nil)))) '("^\\*.*\\*$" . ((bw-display-in-bottom-window . nil))))
(add-to-list 'display-buffer-alist
'(".*" . ((bw-display-in-other-window . nil))) t)
(add-to-list 'window-persistent-parameters (cons 'bw-bottom t)) (add-to-list 'window-persistent-parameters (cons 'bw-bottom t))
(defun bw-find-appropriate-buffer () (defun bw-find-appropriate-buffer ()