diff options
| author | Juri Linkov | 2020-04-03 00:50:19 +0300 |
|---|---|---|
| committer | Juri Linkov | 2020-04-03 00:50:19 +0300 |
| commit | bb729496f9b699896fed8d65bf499a193a7c4886 (patch) | |
| tree | 5528fa9ee9942682e29c75a863c6be95536de66e | |
| parent | 7e243a87904a036473c6ac87229d4ed652d1e49b (diff) | |
| download | emacs-bb729496f9b699896fed8d65bf499a193a7c4886.tar.gz emacs-bb729496f9b699896fed8d65bf499a193a7c4886.zip | |
* lisp/window.el (display-buffer): Extend doc with body-function (bug#39822)
| -rw-r--r-- | doc/lispref/windows.texi | 9 | ||||
| -rw-r--r-- | lisp/window.el | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 00142d87dcc..af2f3acd467 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -3053,10 +3053,11 @@ action function that cares about this entry. | |||
| 3053 | @item body-function | 3053 | @item body-function |
| 3054 | The value must be a function taking one argument (a displayed window). | 3054 | The value must be a function taking one argument (a displayed window). |
| 3055 | This function can be used to fill the displayed window's body with | 3055 | This function can be used to fill the displayed window's body with |
| 3056 | some contents. It is called @emph{after} the buffer is displayed, and | 3056 | some contents that might depend on dimensions of the displayed window. |
| 3057 | @emph{before} the entries @code{window-height}, @code{window-width} | 3057 | It is called @emph{after} the buffer is displayed, and @emph{before} |
| 3058 | and @code{preserve-size} are applied that could resize the window | 3058 | the entries @code{window-height}, @code{window-width} and |
| 3059 | to fit it to the inserted contents. | 3059 | @code{preserve-size} are applied that could resize the window to fit |
| 3060 | it to the inserted contents. | ||
| 3060 | @end table | 3061 | @end table |
| 3061 | 3062 | ||
| 3062 | By convention, the entries @code{window-height}, @code{window-width} | 3063 | By convention, the entries @code{window-height}, @code{window-width} |
diff --git a/lisp/window.el b/lisp/window.el index 0121a78191a..8512a0e2f97 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -7405,6 +7405,12 @@ Action alist entries are: | |||
| 7405 | parameters to give the chosen window. | 7405 | parameters to give the chosen window. |
| 7406 | `allow-no-window' -- A non-nil value means that `display-buffer' | 7406 | `allow-no-window' -- A non-nil value means that `display-buffer' |
| 7407 | may not display the buffer and return nil immediately. | 7407 | may not display the buffer and return nil immediately. |
| 7408 | `body-function' -- A function called with one argument - the | ||
| 7409 | displayed window. It is called after the buffer is | ||
| 7410 | displayed, and before `window-height', `window-width' | ||
| 7411 | and `preserve-size' are applied. The function is supposed | ||
| 7412 | to fill the window body with some contents that might depend | ||
| 7413 | on dimensions of the displayed window. | ||
| 7408 | 7414 | ||
| 7409 | The entries `window-height', `window-width' and `preserve-size' | 7415 | The entries `window-height', `window-width' and `preserve-size' |
| 7410 | are applied only when the window used for displaying the buffer | 7416 | are applied only when the window used for displaying the buffer |