diff options
| author | Martin Rudalics | 2016-08-13 09:59:14 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2016-08-13 09:59:14 +0200 |
| commit | 6bb55a25fa77ce0f92401aa9945a506e9343aad5 (patch) | |
| tree | 2e4f15e6575c626c10674649b3370b7f367df3b6 | |
| parent | 50548fd9afe70c43b3a0c0869f8e889b307ee917 (diff) | |
| download | emacs-6bb55a25fa77ce0f92401aa9945a506e9343aad5.tar.gz emacs-6bb55a25fa77ce0f92401aa9945a506e9343aad5.zip | |
Fix docs on `display-buffer-below-selected' (Bug#24213)
* lisp/window.el (display-buffer-below-selected): Fix
doc-string (Bug#24213).
* doc/lispref/windows.texi (Display Action Functions): Fix
documentation of `display-buffer-below-selected'.
| -rw-r--r-- | doc/lispref/windows.texi | 13 | ||||
| -rw-r--r-- | lisp/window.el | 8 |
2 files changed, 15 insertions, 6 deletions
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index ad0c3237e69..7a5d1bbf166 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -2524,10 +2524,17 @@ parameter; @pxref{Buffer Parameters}). | |||
| 2524 | 2524 | ||
| 2525 | @defun display-buffer-below-selected buffer alist | 2525 | @defun display-buffer-below-selected buffer alist |
| 2526 | This function tries to display @var{buffer} in a window below the | 2526 | This function tries to display @var{buffer} in a window below the |
| 2527 | selected window. This means to either split the selected window or use | 2527 | selected window. If there is a window below the selected one and that |
| 2528 | the window below the selected one. If it does create a new window, it | 2528 | window already displays @var{buffer}, it reuses that window. |
| 2529 | will also adjust its size provided @var{alist} contains a suitable | 2529 | |
| 2530 | If there is no such window, this function tries to create a new window | ||
| 2531 | by splitting the selected one and display @var{buffer} there. It will | ||
| 2532 | also adjust that window's size provided @var{alist} contains a suitable | ||
| 2530 | @code{window-height} or @code{window-width} entry, see above. | 2533 | @code{window-height} or @code{window-width} entry, see above. |
| 2534 | |||
| 2535 | If splitting the selected window fails and there is a non-dedicated | ||
| 2536 | window below the selected one showing some other buffer, it uses that | ||
| 2537 | window for showing @var{buffer}. | ||
| 2531 | @end defun | 2538 | @end defun |
| 2532 | 2539 | ||
| 2533 | @defun display-buffer-in-previous-window buffer alist | 2540 | @defun display-buffer-in-previous-window buffer alist |
diff --git a/lisp/window.el b/lisp/window.el index bf1f13e7766..11d7a4e90d4 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -6879,7 +6879,6 @@ raising the frame." | |||
| 6879 | 6879 | ||
| 6880 | (defun display-buffer--maybe-pop-up-frame-or-window (buffer alist) | 6880 | (defun display-buffer--maybe-pop-up-frame-or-window (buffer alist) |
| 6881 | "Try displaying BUFFER based on `pop-up-frames' or `pop-up-windows'. | 6881 | "Try displaying BUFFER based on `pop-up-frames' or `pop-up-windows'. |
| 6882 | |||
| 6883 | If `pop-up-frames' is non-nil (and not `graphic-only' on a | 6882 | If `pop-up-frames' is non-nil (and not `graphic-only' on a |
| 6884 | text-only terminal), try with `display-buffer-pop-up-frame'. | 6883 | text-only terminal), try with `display-buffer-pop-up-frame'. |
| 6885 | 6884 | ||
| @@ -6894,8 +6893,11 @@ again with `display-buffer-pop-up-window'." | |||
| 6894 | 6893 | ||
| 6895 | (defun display-buffer-below-selected (buffer alist) | 6894 | (defun display-buffer-below-selected (buffer alist) |
| 6896 | "Try displaying BUFFER in a window below the selected window. | 6895 | "Try displaying BUFFER in a window below the selected window. |
| 6897 | This either splits the selected window or reuses the window below | 6896 | If there is a window below the selected one and that window |
| 6898 | the selected one." | 6897 | already displays BUFFER, use that window. Otherwise, try to |
| 6898 | create a new window below the selected one and show BUFFER there. | ||
| 6899 | If that attempt fails as well and there is a non-dedicated window | ||
| 6900 | below the selected one, use that window." | ||
| 6899 | (let (window) | 6901 | (let (window) |
| 6900 | (or (and (setq window (window-in-direction 'below)) | 6902 | (or (and (setq window (window-in-direction 'below)) |
| 6901 | (eq buffer (window-buffer window)) | 6903 | (eq buffer (window-buffer window)) |