diff options
| author | Martin Rudalics | 2019-08-05 10:23:01 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2019-08-05 10:23:01 +0200 |
| commit | 88be35e1ae05a50b9291153fed4cf5911564db0a (patch) | |
| tree | bbb4f275ed34b4ebdd6df333a35e2ade31316f09 | |
| parent | 543568b602bcf2f3496d0a340317682c48a9a923 (diff) | |
| download | emacs-88be35e1ae05a50b9291153fed4cf5911564db0a.tar.gz emacs-88be35e1ae05a50b9291153fed4cf5911564db0a.zip | |
Fix doc-strings of 'display-buffer-*' functions (Bug#19461)
* lisp/window.el (display-buffer-in-atom-window)
(display-buffer-in-side-window, display-buffer-record-window)
(display-buffer-use-some-frame, display-buffer-same-window)
(display-buffer-reuse-window, display-buffer-pop-up-frame)
(display-buffer-pop-up-window, display-buffer-in-child-frame)
(display-buffer-in-direction, display-buffer-below-selected)
(display-buffer-at-bottom, display-buffer-in-previous-window)
(display-buffer-use-some-window)
(display-buffer--maybe-pop-up-frame-or-window)
(display-buffer--maybe-pop-up-frame): Fix doc-strings
(Bug#19461).
| -rw-r--r-- | lisp/window.el | 310 |
1 files changed, 186 insertions, 124 deletions
diff --git a/lisp/window.el b/lisp/window.el index 70e2bba7499..5af66a036d1 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -666,9 +666,9 @@ new window to that atomic window. Operations like `split-window' | |||
| 666 | or `delete-window', when applied to a constituent of an atomic | 666 | or `delete-window', when applied to a constituent of an atomic |
| 667 | window, are applied atomically to the root of that atomic window. | 667 | window, are applied atomically to the root of that atomic window. |
| 668 | 668 | ||
| 669 | ALIST is an association list of action symbols and values. | 669 | ALIST is an association list of action symbols and values. See |
| 670 | See Info node `(elisp) Buffer Display Action Alists' for | 670 | Info node `(elisp) Buffer Display Action Alists' for details of |
| 671 | details of such alists. The following symbols can be used: | 671 | such alists. The following two symbols have a special meaning: |
| 672 | 672 | ||
| 673 | `window' specifies the existing window the new window shall be | 673 | `window' specifies the existing window the new window shall be |
| 674 | combined with. Use `window-atom-root' to make the new window a | 674 | combined with. Use `window-atom-root' to make the new window a |
| @@ -677,7 +677,7 @@ details of such alists. The following symbols can be used: | |||
| 677 | atomic window too. If no window is specified, the new window | 677 | atomic window too. If no window is specified, the new window |
| 678 | becomes a sibling of the selected window. By default, the | 678 | becomes a sibling of the selected window. By default, the |
| 679 | `window-atom' parameter of the existing window is set to `main' | 679 | `window-atom' parameter of the existing window is set to `main' |
| 680 | provided it is live and was not set before. | 680 | provided the window is live and the parameter is not set yet. |
| 681 | 681 | ||
| 682 | `side' denotes the side of the existing window where the new | 682 | `side' denotes the side of the existing window where the new |
| 683 | window shall be located. Valid values are `below', `right', | 683 | window shall be located. Valid values are `below', `right', |
| @@ -685,7 +685,12 @@ details of such alists. The following symbols can be used: | |||
| 685 | `window-atom' parameter of the new window is set to this value. | 685 | `window-atom' parameter of the new window is set to this value. |
| 686 | 686 | ||
| 687 | The return value is the new window, nil when creating that window | 687 | The return value is the new window, nil when creating that window |
| 688 | failed." | 688 | failed. |
| 689 | |||
| 690 | This is an action function for buffer display, see Info | ||
| 691 | node `(elisp) Buffer Display Action Functions'. It should be | ||
| 692 | called only by `display-buffer' or a function directly or | ||
| 693 | indirectly called by the latter." | ||
| 689 | (let* ((ignore-window-parameters t) | 694 | (let* ((ignore-window-parameters t) |
| 690 | (window-combination-limit t) | 695 | (window-combination-limit t) |
| 691 | (window-combination-resize 'atom) | 696 | (window-combination-resize 'atom) |
| @@ -1001,10 +1006,10 @@ and may be called only if no window on SIDE exists yet." | |||
| 1001 | 1006 | ||
| 1002 | (defun display-buffer-in-side-window (buffer alist) | 1007 | (defun display-buffer-in-side-window (buffer alist) |
| 1003 | "Display BUFFER in a side window of the selected frame. | 1008 | "Display BUFFER in a side window of the selected frame. |
| 1004 | ALIST is an association list of action symbols and values. | 1009 | ALIST is an association list of action symbols and values. See |
| 1005 | See Info node `(elisp) Buffer Display Action Alists' for | 1010 | Info node `(elisp) Buffer Display Action Alists' for details of |
| 1006 | details of such alists. | 1011 | such alists. The following two symbols, when used in ALIST, have |
| 1007 | The following special symbols can be used in ALIST: | 1012 | a special meaning: |
| 1008 | 1013 | ||
| 1009 | `side' denotes the side of the frame where the new window shall | 1014 | `side' denotes the side of the frame where the new window shall |
| 1010 | be located. Valid values are `bottom', `right', `top' and | 1015 | be located. Valid values are `bottom', `right', `top' and |
| @@ -1030,7 +1035,12 @@ for displaying BUFFER, nil if no suitable window can be found. | |||
| 1030 | This function installs the `window-side' and `window-slot' | 1035 | This function installs the `window-side' and `window-slot' |
| 1031 | parameters and makes them persistent. It neither modifies ALIST | 1036 | parameters and makes them persistent. It neither modifies ALIST |
| 1032 | nor installs any other window parameters unless they have been | 1037 | nor installs any other window parameters unless they have been |
| 1033 | explicitly provided via a `window-parameters' entry in ALIST." | 1038 | explicitly provided via a `window-parameters' entry in ALIST. |
| 1039 | |||
| 1040 | This is an action function for buffer display, see Info | ||
| 1041 | node `(elisp) Buffer Display Action Functions'. It should be | ||
| 1042 | called only by `display-buffer' or a function directly or | ||
| 1043 | indirectly called by the latter." | ||
| 1034 | (let* ((side (or (cdr (assq 'side alist)) 'bottom)) | 1044 | (let* ((side (or (cdr (assq 'side alist)) 'bottom)) |
| 1035 | (slot (or (cdr (assq 'slot alist)) 0)) | 1045 | (slot (or (cdr (assq 'slot alist)) 0)) |
| 1036 | (left-or-right (memq side '(left right)))) | 1046 | (left-or-right (memq side '(left right)))) |
| @@ -6166,16 +6176,16 @@ this function must be called before BUFFER is explicitly made | |||
| 6166 | WINDOW's buffer (although WINDOW may show BUFFER already). | 6176 | WINDOW's buffer (although WINDOW may show BUFFER already). |
| 6167 | 6177 | ||
| 6168 | TYPE specifies the type of the calling operation and must be one | 6178 | TYPE specifies the type of the calling operation and must be one |
| 6169 | of the symbols 'reuse' (meaning that WINDOW exists already and | 6179 | of the symbols `reuse' (meaning that WINDOW exists already and |
| 6170 | will be used for displaying BUFFER), 'window' (WINDOW was created | 6180 | will be used for displaying BUFFER), `window' (WINDOW was created |
| 6171 | on an already existing frame) or 'frame' (WINDOW was created on a | 6181 | on an already existing frame) or `frame' (WINDOW was created on a |
| 6172 | new frame). | 6182 | new frame). |
| 6173 | 6183 | ||
| 6174 | This function installs or updates the 'quit-restore' parameter of | 6184 | This function installs or updates the `quit-restore' parameter of |
| 6175 | WINDOW. The 'quit-restore' parameter is a list of four elements: | 6185 | WINDOW. The `quit-restore' parameter is a list of four elements: |
| 6176 | The first element is one of the symbols 'window', 'frame', 'same' | 6186 | The first element is one of the symbols `window', `frame', `same' |
| 6177 | or 'other'. The second element is either one of the symbols | 6187 | or `other'. The second element is either one of the symbols |
| 6178 | 'window' or 'frame' or a list whose elements are the buffer | 6188 | `window' or `frame' or a list whose elements are the buffer |
| 6179 | previously shown in the window, that buffer's window start and | 6189 | previously shown in the window, that buffer's window start and |
| 6180 | window point, and the window's height. The third element is the | 6190 | window point, and the window's height. The third element is the |
| 6181 | window selected at the time the parameter was created. The | 6191 | window selected at the time the parameter was created. The |
| @@ -7288,21 +7298,22 @@ The default predicate is to use any frame other than the selected | |||
| 7288 | frame. If successful, return the window used; otherwise return | 7298 | frame. If successful, return the window used; otherwise return |
| 7289 | nil. | 7299 | nil. |
| 7290 | 7300 | ||
| 7291 | ALIST is an association list of action symbols and values. | 7301 | ALIST is an association list of action symbols and values. See |
| 7292 | See Info node `(elisp) Buffer Display Action Alists' for | 7302 | Info node `(elisp) Buffer Display Action Alists' for details of |
| 7293 | details of such alists. | 7303 | such alists. |
| 7294 | 7304 | ||
| 7295 | If ALIST has a non-nil `inhibit-switch-frame' entry, avoid | 7305 | If ALIST has a non-nil `inhibit-switch-frame' entry, avoid |
| 7296 | raising the frame. | 7306 | raising the frame. If it has a non-nil `frame-predicate' entry, |
| 7297 | 7307 | its value is a function taking one argument (a frame), returning | |
| 7298 | If ALIST has a non-nil `frame-predicate' entry, its value is a | 7308 | non-nil if the frame is a candidate; this function replaces the |
| 7299 | function taking one argument (a frame), returning non-nil if the | 7309 | default predicate. If ALIST has a non-nil `inhibit-same-window' |
| 7300 | frame is a candidate; this function replaces the default | 7310 | entry, avoid using the currently selected window (only useful |
| 7301 | predicate. | 7311 | with a frame-predicate that allows using the selected frame). |
| 7302 | 7312 | ||
| 7303 | If ALIST has a non-nil `inhibit-same-window' entry, avoid using | 7313 | This is an action function for buffer display, see Info |
| 7304 | the currently selected window (only useful with a frame-predicate | 7314 | node `(elisp) Buffer Display Action Functions'. It should be |
| 7305 | that allows the selected frame)." | 7315 | called only by `display-buffer' or a function directly or |
| 7316 | indirectly called by the latter." | ||
| 7306 | (let* ((predicate | 7317 | (let* ((predicate |
| 7307 | (or (cdr (assq 'frame-predicate alist)) | 7318 | (or (cdr (assq 'frame-predicate alist)) |
| 7308 | (lambda (frame) | 7319 | (lambda (frame) |
| @@ -7321,15 +7332,19 @@ that allows the selected frame)." | |||
| 7321 | 7332 | ||
| 7322 | (defun display-buffer-same-window (buffer alist) | 7333 | (defun display-buffer-same-window (buffer alist) |
| 7323 | "Display BUFFER in the selected window. | 7334 | "Display BUFFER in the selected window. |
| 7324 | 7335 | ALIST is an association list of action symbols and values. See | |
| 7325 | ALIST is an association list of action symbols and values. | 7336 | Info node `(elisp) Buffer Display Action Alists' for details of |
| 7326 | See Info node `(elisp) Buffer Display Action Alists' for | 7337 | such alists. |
| 7327 | details of such alists. | ||
| 7328 | 7338 | ||
| 7329 | This function fails if ALIST has an `inhibit-same-window' | 7339 | This function fails if ALIST has an `inhibit-same-window' |
| 7330 | element whose value is non-nil, or if the selected window is a | 7340 | element whose value is non-nil, or if the selected window is a |
| 7331 | minibuffer window or is dedicated to another buffer; in that case, | 7341 | minibuffer window or is dedicated to another buffer; in that case, |
| 7332 | return nil. Otherwise, return the selected window." | 7342 | return nil. Otherwise, return the selected window. |
| 7343 | |||
| 7344 | This is an action function for buffer display, see Info | ||
| 7345 | node `(elisp) Buffer Display Action Functions'. It should be | ||
| 7346 | called only by `display-buffer' or a function directly or | ||
| 7347 | indirectly called by the latter." | ||
| 7333 | (unless (or (cdr (assq 'inhibit-same-window alist)) | 7348 | (unless (or (cdr (assq 'inhibit-same-window alist)) |
| 7334 | (window-minibuffer-p) | 7349 | (window-minibuffer-p) |
| 7335 | (window-dedicated-p)) | 7350 | (window-dedicated-p)) |
| @@ -7337,10 +7352,9 @@ return nil. Otherwise, return the selected window." | |||
| 7337 | 7352 | ||
| 7338 | (defun display-buffer--maybe-same-window (buffer alist) | 7353 | (defun display-buffer--maybe-same-window (buffer alist) |
| 7339 | "Conditionally display BUFFER in the selected window. | 7354 | "Conditionally display BUFFER in the selected window. |
| 7340 | 7355 | ALIST is an association list of action symbols and values. See | |
| 7341 | ALIST is an association list of action symbols and values. | 7356 | Info node `(elisp) Buffer Display Action Alists' for details of |
| 7342 | See Info node `(elisp) Buffer Display Action Alists' for | 7357 | such alists. |
| 7343 | details of such alists. | ||
| 7344 | 7358 | ||
| 7345 | If `same-window-p' returns non-nil for BUFFER's name, call | 7359 | If `same-window-p' returns non-nil for BUFFER's name, call |
| 7346 | `display-buffer-same-window' and return its value. Otherwise, | 7360 | `display-buffer-same-window' and return its value. Otherwise, |
| @@ -7353,29 +7367,34 @@ return nil." | |||
| 7353 | Preferably use a window on the selected frame if such a window | 7367 | Preferably use a window on the selected frame if such a window |
| 7354 | exists. Return nil if no usable window is found. | 7368 | exists. Return nil if no usable window is found. |
| 7355 | 7369 | ||
| 7356 | ALIST is an association list of action symbols and values. | 7370 | ALIST is an association list of action symbols and values. See |
| 7357 | See Info node `(elisp) Buffer Display Action Alists' for | 7371 | Info node `(elisp) Buffer Display Action Alists' for details of |
| 7358 | details of such alists. | 7372 | such alists. |
| 7359 | 7373 | ||
| 7360 | If ALIST has a non-nil 'inhibit-same-window' entry, the selected | 7374 | If ALIST has a non-nil `inhibit-same-window' entry, the selected |
| 7361 | window is not eligible for reuse. | 7375 | window is not eligible for reuse. |
| 7362 | 7376 | ||
| 7363 | If ALIST contains a 'reusable-frames' entry, its value determines | 7377 | If ALIST contains a `reusable-frames' entry, its value determines |
| 7364 | which frames to search for a reusable window: | 7378 | which frames to search for a reusable window: |
| 7365 | nil -- the selected frame (actually the last non-minibuffer frame) | 7379 | nil -- the selected frame (actually the last non-minibuffer frame) |
| 7366 | A frame -- just that frame | 7380 | A frame -- just that frame |
| 7367 | 'visible' -- all visible frames | 7381 | `visible' -- all visible frames |
| 7368 | 0 -- all frames on the current terminal | 7382 | 0 -- all frames on the current terminal |
| 7369 | t -- all frames. | 7383 | t -- all frames. |
| 7370 | 7384 | ||
| 7371 | If ALIST contains no 'reusable-frames' entry, search just the | 7385 | If ALIST contains no `reusable-frames' entry, search just the |
| 7372 | selected frame if `display-buffer-reuse-frames' and | 7386 | selected frame if `display-buffer-reuse-frames' and |
| 7373 | `pop-up-frames' are both nil; search all frames on the current | 7387 | `pop-up-frames' are both nil; search all frames on the current |
| 7374 | terminal if either of those variables is non-nil. | 7388 | terminal if either of those variables is non-nil. |
| 7375 | 7389 | ||
| 7376 | If ALIST has a non-nil 'inhibit-switch-frame' entry, then in the | 7390 | If ALIST has a non-nil `inhibit-switch-frame' entry, then in the |
| 7377 | event that a window on another frame is chosen, avoid raising | 7391 | event that a window on another frame is chosen, avoid raising |
| 7378 | that frame." | 7392 | that frame. |
| 7393 | |||
| 7394 | This is an action function for buffer display, see Info | ||
| 7395 | node `(elisp) Buffer Display Action Functions'. It should be | ||
| 7396 | called only by `display-buffer' or a function directly or | ||
| 7397 | indirectly called by the latter." | ||
| 7379 | (let* ((alist-entry (assq 'reusable-frames alist)) | 7398 | (let* ((alist-entry (assq 'reusable-frames alist)) |
| 7380 | (frames (cond (alist-entry (cdr alist-entry)) | 7399 | (frames (cond (alist-entry (cdr alist-entry)) |
| 7381 | ((if (eq pop-up-frames 'graphic-only) | 7400 | ((if (eq pop-up-frames 'graphic-only) |
| @@ -7412,9 +7431,9 @@ that frame." | |||
| 7412 | Display BUFFER in the returned window. Return nil if no usable | 7431 | Display BUFFER in the returned window. Return nil if no usable |
| 7413 | window is found. | 7432 | window is found. |
| 7414 | 7433 | ||
| 7415 | ALIST is an association list of action symbols and values. | 7434 | ALIST is an association list of action symbols and values. See |
| 7416 | See Info node `(elisp) Buffer Display Action Alists' for | 7435 | Info node `(elisp) Buffer Display Action Alists' for details of |
| 7417 | details of such alists. | 7436 | such alists. |
| 7418 | 7437 | ||
| 7419 | If ALIST contains a `mode' entry, its value is a major mode (a | 7438 | If ALIST contains a `mode' entry, its value is a major mode (a |
| 7420 | symbol) or a list of modes. A window is a candidate if it | 7439 | symbol) or a list of modes. A window is a candidate if it |
| @@ -7425,7 +7444,12 @@ is used. | |||
| 7425 | The behavior is also controlled by entries for | 7444 | The behavior is also controlled by entries for |
| 7426 | `inhibit-same-window', `reusable-frames' and | 7445 | `inhibit-same-window', `reusable-frames' and |
| 7427 | `inhibit-switch-frame' as is done in the function | 7446 | `inhibit-switch-frame' as is done in the function |
| 7428 | `display-buffer-reuse-window'." | 7447 | `display-buffer-reuse-window'. |
| 7448 | |||
| 7449 | This is an action function for buffer display, see Info | ||
| 7450 | node `(elisp) Buffer Display Action Functions'. It should be | ||
| 7451 | called only by `display-buffer' or a function directly or | ||
| 7452 | indirectly called by the latter." | ||
| 7429 | (let* ((alist-entry (assq 'reusable-frames alist)) | 7453 | (let* ((alist-entry (assq 'reusable-frames alist)) |
| 7430 | (alist-mode-entry (assq 'mode alist)) | 7454 | (alist-mode-entry (assq 'mode alist)) |
| 7431 | (frames (cond (alist-entry (cdr alist-entry)) | 7455 | (frames (cond (alist-entry (cdr alist-entry)) |
| @@ -7495,16 +7519,18 @@ See `display-buffer' for the format of display actions." | |||
| 7495 | This works by calling `pop-up-frame-function'. If successful, | 7519 | This works by calling `pop-up-frame-function'. If successful, |
| 7496 | return the window used; otherwise return nil. | 7520 | return the window used; otherwise return nil. |
| 7497 | 7521 | ||
| 7498 | ALIST is an association list of action symbols and values. | 7522 | ALIST is an association list of action symbols and values. See |
| 7499 | See Info node `(elisp) Buffer Display Action Alists' for | 7523 | Info node `(elisp) Buffer Display Action Alists' for details of |
| 7500 | details of such alists. | 7524 | such alists. |
| 7501 | 7525 | ||
| 7502 | If ALIST has a non-nil `inhibit-switch-frame' entry, avoid | 7526 | If ALIST has a non-nil `inhibit-switch-frame' entry, avoid |
| 7503 | raising the new frame. | 7527 | raising the new frame. A non-nil `pop-up-frame-parameters' entry |
| 7528 | specifies an alist of frame parameters to give the new frame. | ||
| 7504 | 7529 | ||
| 7505 | If ALIST has a non-nil `pop-up-frame-parameters' entry, the | 7530 | This is an action function for buffer display, see Info |
| 7506 | corresponding value is an alist of frame parameters to give the | 7531 | node `(elisp) Buffer Display Action Functions'. It should be |
| 7507 | new frame." | 7532 | called only by `display-buffer' or a function directly or |
| 7533 | indirectly called by the latter." | ||
| 7508 | (let* ((params (cdr (assq 'pop-up-frame-parameters alist))) | 7534 | (let* ((params (cdr (assq 'pop-up-frame-parameters alist))) |
| 7509 | (pop-up-frame-alist (append params pop-up-frame-alist)) | 7535 | (pop-up-frame-alist (append params pop-up-frame-alist)) |
| 7510 | (fun pop-up-frame-function) | 7536 | (fun pop-up-frame-function) |
| @@ -7525,13 +7551,18 @@ The new window is created on the selected frame, or in | |||
| 7525 | `last-nonminibuffer-frame' if no windows can be created there. | 7551 | `last-nonminibuffer-frame' if no windows can be created there. |
| 7526 | If successful, return the new window; otherwise return nil. | 7552 | If successful, return the new window; otherwise return nil. |
| 7527 | 7553 | ||
| 7528 | ALIST is an association list of action symbols and values. | 7554 | ALIST is an association list of action symbols and values. See |
| 7529 | See Info node `(elisp) Buffer Display Action Alists' for | 7555 | Info node `(elisp) Buffer Display Action Alists' for details of |
| 7530 | details of such alists. | 7556 | such alists. |
| 7531 | 7557 | ||
| 7532 | If ALIST has a non-nil `inhibit-switch-frame' entry, then in the | 7558 | If ALIST has a non-nil `inhibit-switch-frame' entry, then in the |
| 7533 | event that the new window is created on another frame, avoid | 7559 | event that the new window is created on another frame, avoid |
| 7534 | raising the frame." | 7560 | raising the frame. |
| 7561 | |||
| 7562 | This is an action function for buffer display, see Info | ||
| 7563 | node `(elisp) Buffer Display Action Functions'. It should be | ||
| 7564 | called only by `display-buffer' or a function directly or | ||
| 7565 | indirectly called by the latter." | ||
| 7535 | (let ((frame (or (window--frame-usable-p (selected-frame)) | 7566 | (let ((frame (or (window--frame-usable-p (selected-frame)) |
| 7536 | (window--frame-usable-p (last-nonminibuffer-frame)))) | 7567 | (window--frame-usable-p (last-nonminibuffer-frame)))) |
| 7537 | window) | 7568 | window) |
| @@ -7554,15 +7585,14 @@ raising the frame." | |||
| 7554 | 7585 | ||
| 7555 | (defun display-buffer--maybe-pop-up-frame-or-window (buffer alist) | 7586 | (defun display-buffer--maybe-pop-up-frame-or-window (buffer alist) |
| 7556 | "Try displaying BUFFER based on `pop-up-frames' or `pop-up-windows'. | 7587 | "Try displaying BUFFER based on `pop-up-frames' or `pop-up-windows'. |
| 7557 | If `pop-up-frames' is non-nil (and not `graphic-only' on a | 7588 | ALIST is an association list of action symbols and values. See |
| 7558 | text-only terminal), try with `display-buffer-pop-up-frame'. | 7589 | Info node `(elisp) Buffer Display Action Alists' for details of |
| 7559 | 7590 | such alists. | |
| 7560 | ALIST is an association list of action symbols and values. | ||
| 7561 | See Info node `(elisp) Buffer Display Action Alists' for | ||
| 7562 | details of such alists. | ||
| 7563 | 7591 | ||
| 7564 | If that cannot be done, and `pop-up-windows' is non-nil, try | 7592 | If `pop-up-frames' is non-nil (and not `graphic-only' on a |
| 7565 | again with `display-buffer-pop-up-window'." | 7593 | text-only terminal), try with `display-buffer-pop-up-frame'. If |
| 7594 | that cannot be done, and `pop-up-windows' is non-nil, try again | ||
| 7595 | with `display-buffer-pop-up-window'." | ||
| 7566 | (or (display-buffer--maybe-pop-up-frame buffer alist) | 7596 | (or (display-buffer--maybe-pop-up-frame buffer alist) |
| 7567 | (display-buffer--maybe-pop-up-window buffer alist))) | 7597 | (display-buffer--maybe-pop-up-window buffer alist))) |
| 7568 | 7598 | ||
| @@ -7571,9 +7601,9 @@ again with `display-buffer-pop-up-window'." | |||
| 7571 | If `pop-up-frames' is non-nil (and not `graphic-only' on a | 7601 | If `pop-up-frames' is non-nil (and not `graphic-only' on a |
| 7572 | text-only terminal), try with `display-buffer-pop-up-frame'. | 7602 | text-only terminal), try with `display-buffer-pop-up-frame'. |
| 7573 | 7603 | ||
| 7574 | ALIST is an association list of action symbols and values. | 7604 | ALIST is an association list of action symbols and values. See |
| 7575 | See Info node `(elisp) Buffer Display Action Alists' for | 7605 | Info node `(elisp) Buffer Display Action Alists' for details of |
| 7576 | details of such alists." | 7606 | such alists." |
| 7577 | (and (if (eq pop-up-frames 'graphic-only) | 7607 | (and (if (eq pop-up-frames 'graphic-only) |
| 7578 | (display-graphic-p) | 7608 | (display-graphic-p) |
| 7579 | pop-up-frames) | 7609 | pop-up-frames) |
| @@ -7591,16 +7621,21 @@ By default, this either reuses a child frame of the selected | |||
| 7591 | frame or makes a new child frame of the selected frame. If | 7621 | frame or makes a new child frame of the selected frame. If |
| 7592 | successful, return the window used; otherwise return nil. | 7622 | successful, return the window used; otherwise return nil. |
| 7593 | 7623 | ||
| 7594 | ALIST is an association list of action symbols and values. | 7624 | ALIST is an association list of action symbols and values. See |
| 7595 | See Info node `(elisp) Buffer Display Action Alists' for | 7625 | Info node `(elisp) Buffer Display Action Alists' for details of |
| 7596 | details of such alists. | 7626 | such alists. |
| 7597 | 7627 | ||
| 7598 | If ALIST has a non-nil 'child-frame-parameters' entry, the | 7628 | If ALIST has a non-nil `child-frame-parameters' entry, the |
| 7599 | corresponding value is an alist of frame parameters to give the | 7629 | corresponding value is an alist of frame parameters to give the |
| 7600 | new frame. A 'parent-frame' parameter specifying the selected | 7630 | new frame. A `parent-frame' parameter specifying the selected |
| 7601 | frame is provided by default. If the child frame should be or | 7631 | frame is provided by default. If the child frame shall be or |
| 7602 | become the child of any other frame, a corresponding entry must | 7632 | become the child of any other frame, a corresponding entry must |
| 7603 | be added to ALIST." | 7633 | be added to ALIST. |
| 7634 | |||
| 7635 | This is an action function for buffer display, see Info | ||
| 7636 | node `(elisp) Buffer Display Action Functions'. It should be | ||
| 7637 | called only by `display-buffer' or a function directly or | ||
| 7638 | indirectly called by the latter." | ||
| 7604 | (let* ((parameters | 7639 | (let* ((parameters |
| 7605 | (append | 7640 | (append |
| 7606 | (cdr (assq 'child-frame-parameters alist)) | 7641 | (cdr (assq 'child-frame-parameters alist)) |
| @@ -7698,16 +7733,15 @@ ALIST is a buffer display alist." | |||
| 7698 | 7733 | ||
| 7699 | (defun display-buffer-in-direction (buffer alist) | 7734 | (defun display-buffer-in-direction (buffer alist) |
| 7700 | "Try to display BUFFER in a direction specified by ALIST. | 7735 | "Try to display BUFFER in a direction specified by ALIST. |
| 7736 | ALIST is an association list of action symbols and values. See | ||
| 7737 | Info node `(elisp) Buffer Display Action Alists' for details of | ||
| 7738 | such alists. | ||
| 7701 | 7739 | ||
| 7702 | ALIST is an association list of action symbols and values. | 7740 | ALIST has to contain a `direction' entry whose value should be |
| 7703 | See Info node `(elisp) Buffer Display Action Alists' for | 7741 | one of `left', `above' (or `up'), `right' and `below' (or |
| 7704 | details of such alists. | 7742 | 'down'). Other values are usually interpreted as `below'. |
| 7705 | 7743 | ||
| 7706 | ALIST has to contain a 'direction' entry whose value should be | 7744 | If ALIST also contains a `window' entry, its value specifies a |
| 7707 | one of 'left', 'above' (or 'up'), 'right', and 'below' (or | ||
| 7708 | 'down'). Other values are usually interpreted as 'below'. | ||
| 7709 | |||
| 7710 | If ALIST also contains a 'window' entry, its value specifies a | ||
| 7711 | reference window. That value can be a special symbol like | 7745 | reference window. That value can be a special symbol like |
| 7712 | 'main' (which stands for the selected frame's main window) or | 7746 | 'main' (which stands for the selected frame's main window) or |
| 7713 | 'root' (standings for the selected frame's root window) or an | 7747 | 'root' (standings for the selected frame's root window) or an |
| @@ -7717,13 +7751,18 @@ window. | |||
| 7717 | 7751 | ||
| 7718 | This function tries to reuse or split a window such that the | 7752 | This function tries to reuse or split a window such that the |
| 7719 | window produced this way is on the side of the reference window | 7753 | window produced this way is on the side of the reference window |
| 7720 | specified by the 'direction' entry. | 7754 | specified by the `direction' entry. |
| 7721 | 7755 | ||
| 7722 | Four special values for 'direction' entries allow to implicitly | 7756 | Four special values for `direction' entries allow to implicitly |
| 7723 | specify the selected frame's main window as reference window: | 7757 | specify the selected frame's main window as reference window: |
| 7724 | 'leftmost', 'top', 'rightmost' and 'bottom'. Hence, instead of | 7758 | `leftmost', `top', `rightmost' and `bottom'. Hence, instead of |
| 7725 | '(direction . left) (window . main)' one can simply write | 7759 | `(direction . left) (window . main)' one can simply write |
| 7726 | '(direction . leftmost)'." | 7760 | `(direction . leftmost)'. |
| 7761 | |||
| 7762 | This is an action function for buffer display, see Info | ||
| 7763 | node `(elisp) Buffer Display Action Functions'. It should be | ||
| 7764 | called only by `display-buffer' or a function directly or | ||
| 7765 | indirectly called by the latter." | ||
| 7727 | (let ((direction (cdr (assq 'direction alist)))) | 7766 | (let ((direction (cdr (assq 'direction alist)))) |
| 7728 | (when direction | 7767 | (when direction |
| 7729 | (let ((window (cdr (assq 'window alist))) | 7768 | (let ((window (cdr (assq 'window alist))) |
| @@ -7791,15 +7830,20 @@ create a new window below the selected one and show BUFFER there. | |||
| 7791 | If that attempt fails as well and there is a non-dedicated window | 7830 | If that attempt fails as well and there is a non-dedicated window |
| 7792 | below the selected one, use that window. | 7831 | below the selected one, use that window. |
| 7793 | 7832 | ||
| 7794 | ALIST is an association list of action symbols and values. | 7833 | ALIST is an association list of action symbols and values. See |
| 7795 | See Info node `(elisp) Buffer Display Action Alists' for | 7834 | Info node `(elisp) Buffer Display Action Alists' for details of |
| 7796 | details of such alists. | 7835 | such alists. |
| 7797 | 7836 | ||
| 7798 | If ALIST contains a 'window-min-height' entry, this function | 7837 | If ALIST contains a `window-min-height' entry, this function |
| 7799 | ensures that the window used is or can become at least as high as | 7838 | ensures that the window used is or can become at least as high as |
| 7800 | specified by that entry's value. Note that such an entry alone | 7839 | specified by that entry's value. Note that such an entry alone |
| 7801 | will not resize the window per se. In order to do that, ALIST | 7840 | will not resize the window per se. In order to do that, ALIST |
| 7802 | must also contain a 'window-height' entry with the same value." | 7841 | must also contain a `window-height' entry with the same value. |
| 7842 | |||
| 7843 | This is an action function for buffer display, see Info | ||
| 7844 | node `(elisp) Buffer Display Action Functions'. It should be | ||
| 7845 | called only by `display-buffer' or a function directly or | ||
| 7846 | indirectly called by the latter." | ||
| 7803 | (let ((min-height (cdr (assq 'window-min-height alist))) | 7847 | (let ((min-height (cdr (assq 'window-min-height alist))) |
| 7804 | window) | 7848 | window) |
| 7805 | (or (and (setq window (window-in-direction 'below)) | 7849 | (or (and (setq window (window-in-direction 'below)) |
| @@ -7851,9 +7895,14 @@ already, splits a window at the bottom of the frame or the | |||
| 7851 | frame's root window, or reuses some window at the bottom of the | 7895 | frame's root window, or reuses some window at the bottom of the |
| 7852 | selected frame. | 7896 | selected frame. |
| 7853 | 7897 | ||
| 7854 | ALIST is an association list of action symbols and values. | 7898 | ALIST is an association list of action symbols and values. See |
| 7855 | See Info node `(elisp) Buffer Display Action Alists' for | 7899 | Info node `(elisp) Buffer Display Action Alists' for details of |
| 7856 | details of such alists." | 7900 | such alists. |
| 7901 | |||
| 7902 | This is an action function for buffer display, see Info | ||
| 7903 | node `(elisp) Buffer Display Action Functions'. It should be | ||
| 7904 | called only by `display-buffer' or a function directly or | ||
| 7905 | indirectly called by the latter." | ||
| 7857 | (let (bottom-window bottom-window-shows-buffer window) | 7906 | (let (bottom-window bottom-window-shows-buffer window) |
| 7858 | (walk-window-tree | 7907 | (walk-window-tree |
| 7859 | (lambda (window) | 7908 | (lambda (window) |
| @@ -7877,10 +7926,9 @@ details of such alists." | |||
| 7877 | 7926 | ||
| 7878 | (defun display-buffer-in-previous-window (buffer alist) | 7927 | (defun display-buffer-in-previous-window (buffer alist) |
| 7879 | "Display BUFFER in a window previously showing it. | 7928 | "Display BUFFER in a window previously showing it. |
| 7880 | 7929 | ALIST is an association list of action symbols and values. See | |
| 7881 | ALIST is an association list of action symbols and values. | 7930 | Info node `(elisp) Buffer Display Action Alists' for details of |
| 7882 | See Info node `(elisp) Buffer Display Action Alists' for | 7931 | such alists. |
| 7883 | details of such alists. | ||
| 7884 | 7932 | ||
| 7885 | If ALIST has a non-nil `inhibit-same-window' entry, the selected | 7933 | If ALIST has a non-nil `inhibit-same-window' entry, the selected |
| 7886 | window is not usable. A dedicated window is usable only if it | 7934 | window is not usable. A dedicated window is usable only if it |
| @@ -7904,14 +7952,19 @@ terminal if either of those variables is non-nil. | |||
| 7904 | If more than one window is usable according to these rules, | 7952 | If more than one window is usable according to these rules, |
| 7905 | apply the following order of preference: | 7953 | apply the following order of preference: |
| 7906 | 7954 | ||
| 7907 | - Use the window specified by any 'previous-window' ALIST entry, | 7955 | - Use the window specified by any `previous-window' ALIST entry, |
| 7908 | provided it is not the selected window. | 7956 | provided it is not the selected window. |
| 7909 | 7957 | ||
| 7910 | - Use a window that showed BUFFER before, provided it is not the | 7958 | - Use a window that showed BUFFER before, provided it is not the |
| 7911 | selected window. | 7959 | selected window. |
| 7912 | 7960 | ||
| 7913 | - Use the selected window if it is either specified by a | 7961 | - Use the selected window if it is either specified by a |
| 7914 | 'previous-window' ALIST entry or showed BUFFER before." | 7962 | `previous-window' ALIST entry or showed BUFFER before. |
| 7963 | |||
| 7964 | This is an action function for buffer display, see Info | ||
| 7965 | node `(elisp) Buffer Display Action Functions'. It should be | ||
| 7966 | called only by `display-buffer' or a function directly or | ||
| 7967 | indirectly called by the latter." | ||
| 7915 | (let* ((alist-entry (assq 'reusable-frames alist)) | 7968 | (let* ((alist-entry (assq 'reusable-frames alist)) |
| 7916 | (inhibit-same-window | 7969 | (inhibit-same-window |
| 7917 | (cdr (assq 'inhibit-same-window alist))) | 7970 | (cdr (assq 'inhibit-same-window alist))) |
| @@ -7953,13 +8006,18 @@ apply the following order of preference: | |||
| 7953 | Search for a usable window, set that window to the buffer, and | 8006 | Search for a usable window, set that window to the buffer, and |
| 7954 | return the window. If no suitable window is found, return nil. | 8007 | return the window. If no suitable window is found, return nil. |
| 7955 | 8008 | ||
| 7956 | ALIST is an association list of action symbols and values. | 8009 | ALIST is an association list of action symbols and values. See |
| 7957 | See Info node `(elisp) Buffer Display Action Alists' for | 8010 | Info node `(elisp) Buffer Display Action Alists' for details of |
| 7958 | details of such alists. | 8011 | such alists. |
| 7959 | 8012 | ||
| 7960 | If ALIST has a non-nil `inhibit-switch-frame' entry, then in the | 8013 | If ALIST has a non-nil `inhibit-switch-frame' entry, then in the |
| 7961 | event that a window in another frame is chosen, avoid raising | 8014 | event that a window on another frame is chosen, avoid raising |
| 7962 | that frame." | 8015 | that frame. |
| 8016 | |||
| 8017 | This is an action function for buffer display, see Info | ||
| 8018 | node `(elisp) Buffer Display Action Functions'. It should be | ||
| 8019 | called only by `display-buffer' or a function directly or | ||
| 8020 | indirectly called by the latter." | ||
| 7963 | (let* ((not-this-window (cdr (assq 'inhibit-same-window alist))) | 8021 | (let* ((not-this-window (cdr (assq 'inhibit-same-window alist))) |
| 7964 | (frame (or (window--frame-usable-p (selected-frame)) | 8022 | (frame (or (window--frame-usable-p (selected-frame)) |
| 7965 | (window--frame-usable-p (last-nonminibuffer-frame)))) | 8023 | (window--frame-usable-p (last-nonminibuffer-frame)))) |
| @@ -7997,16 +8055,20 @@ that frame." | |||
| 7997 | 8055 | ||
| 7998 | (defun display-buffer-no-window (_buffer alist) | 8056 | (defun display-buffer-no-window (_buffer alist) |
| 7999 | "Display BUFFER in no window. | 8057 | "Display BUFFER in no window. |
| 8000 | 8058 | ALIST is an association list of action symbols and values. See | |
| 8001 | ALIST is an association list of action symbols and values. | 8059 | Info node `(elisp) Buffer Display Action Alists' for details of |
| 8002 | See Info node `(elisp) Buffer Display Action Alists' for | 8060 | such alists. |
| 8003 | details of such alists. | 8061 | |
| 8004 | 8062 | If ALIST contains a non-nil `allow-no-window' entry, do nothing | |
| 8005 | If ALIST has a non-nil `allow-no-window' entry, then don't display | 8063 | and return `fail'. This allows `display-buffer' to override the |
| 8006 | a window at all. This makes possible to override the default action | 8064 | default action and avoid displaying the buffer. It is assumed |
| 8007 | and avoid displaying the buffer. It is assumed that when the caller | 8065 | that when the caller specifies a non-nil `allow-no-window' ALIST |
| 8008 | specifies a non-nil `allow-no-window' then it can handle a nil value | 8066 | entry, it can handle a nil value returned by `display-buffer'. |
| 8009 | returned from `display-buffer' in this case." | 8067 | |
| 8068 | This is an action function for buffer display, see Info | ||
| 8069 | node `(elisp) Buffer Display Action Functions'. It should be | ||
| 8070 | called only by `display-buffer' or a function directly or | ||
| 8071 | indirectly called by the latter." | ||
| 8010 | (when (cdr (assq 'allow-no-window alist)) | 8072 | (when (cdr (assq 'allow-no-window alist)) |
| 8011 | 'fail)) | 8073 | 'fail)) |
| 8012 | 8074 | ||