Don't show other windows in bottom window
If possible.
This commit is contained in:
parent
5857c61382
commit
36ebaafbc8
1 changed files with 11 additions and 0 deletions
11
bw.el
11
bw.el
|
@ -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 ()
|
||||||
|
|
Loading…
Reference in a new issue