[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117766: Adjust display-buffer-at-bottom.
From: |
Martin Rudalics |
Subject: |
[Emacs-diffs] trunk r117766: Adjust display-buffer-at-bottom. |
Date: |
Fri, 29 Aug 2014 10:39:38 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117766
revision-id: address@hidden
parent: address@hidden
committer: martin rudalics <address@hidden>
branch nick: trunk
timestamp: Fri 2014-08-29 12:39:17 +0200
message:
Adjust display-buffer-at-bottom.
* window.el (display-buffer-at-bottom): Prefer bottom-left
window to other bottom windows. Reuse a bottom window if it
shows the buffer already. Suggested by Juri Linkov
<address@hidden> in discussion of (Bug#18181).
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/window.el window.el-20091113204419-o5vbwnq5f7feedwu-94
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-08-29 07:05:23 +0000
+++ b/lisp/ChangeLog 2014-08-29 10:39:17 +0000
@@ -1,3 +1,10 @@
+2014-08-29 Martin Rudalics <address@hidden>
+
+ * window.el (display-buffer-at-bottom): Prefer bottom-left
+ window to other bottom windows. Reuse a bottom window if it
+ shows the buffer already. Suggested by Juri Linkov
+ <address@hidden> in discussion of (Bug#18181).
+
2014-08-29 Leo Liu <address@hidden>
* files.el (minibuffer-with-setup-hook): Allow (:append FUN) to
=== modified file 'lisp/window.el'
--- a/lisp/window.el 2014-08-21 08:40:29 +0000
+++ b/lisp/window.el 2014-08-29 10:39:17 +0000
@@ -6469,13 +6469,26 @@
(defun display-buffer-at-bottom (buffer alist)
"Try displaying BUFFER in a window at the bottom of the selected frame.
-This either splits the window at the bottom of the frame or the
-frame's root window, or reuses an existing window at the bottom
-of the selected frame."
- (let (bottom-window window)
+This either reuses such a window provided it shows BUFFER
+already, splits a window at the bottom of the frame or the
+frame's root window, or reuses some window at the bottom of the
+selected frame."
+ (let (bottom-window bottom-window-shows-buffer window)
(walk-window-tree
- (lambda (window) (setq bottom-window window)) nil nil 'nomini)
- (or (and (not (frame-parameter nil 'unsplittable))
+ (lambda (window)
+ (cond
+ ((window-in-direction 'below window))
+ ((and (not bottom-window-shows-buffer)
+ (eq buffer (window-buffer window)))
+ (setq bottom-window-shows-buffer t)
+ (setq bottom-window window))
+ ((not bottom-window)
+ (setq bottom-window window)))
+ nil nil 'nomini))
+ (or (and bottom-window-shows-buffer
+ (window--display-buffer
+ buffer bottom-window 'reuse alist display-buffer-mark-dedicated))
+ (and (not (frame-parameter nil 'unsplittable))
(let (split-width-threshold)
(setq window (window--try-to-split-window bottom-window alist)))
(window--display-buffer
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117766: Adjust display-buffer-at-bottom.,
Martin Rudalics <=