aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rudalics2019-08-05 10:23:01 +0200
committerMartin Rudalics2019-08-05 10:23:01 +0200
commit88be35e1ae05a50b9291153fed4cf5911564db0a (patch)
treebbb4f275ed34b4ebdd6df333a35e2ade31316f09
parent543568b602bcf2f3496d0a340317682c48a9a923 (diff)
downloademacs-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.el310
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'
666or `delete-window', when applied to a constituent of an atomic 666or `delete-window', when applied to a constituent of an atomic
667window, are applied atomically to the root of that atomic window. 667window, are applied atomically to the root of that atomic window.
668 668
669ALIST is an association list of action symbols and values. 669ALIST is an association list of action symbols and values. See
670See Info node `(elisp) Buffer Display Action Alists' for 670Info node `(elisp) Buffer Display Action Alists' for details of
671details of such alists. The following symbols can be used: 671such 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
687The return value is the new window, nil when creating that window 687The return value is the new window, nil when creating that window
688failed." 688failed.
689
690This is an action function for buffer display, see Info
691node `(elisp) Buffer Display Action Functions'. It should be
692called only by `display-buffer' or a function directly or
693indirectly 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.
1004ALIST is an association list of action symbols and values. 1009ALIST is an association list of action symbols and values. See
1005See Info node `(elisp) Buffer Display Action Alists' for 1010Info node `(elisp) Buffer Display Action Alists' for details of
1006details of such alists. 1011such alists. The following two symbols, when used in ALIST, have
1007The following special symbols can be used in ALIST: 1012a 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.
1030This function installs the `window-side' and `window-slot' 1035This function installs the `window-side' and `window-slot'
1031parameters and makes them persistent. It neither modifies ALIST 1036parameters and makes them persistent. It neither modifies ALIST
1032nor installs any other window parameters unless they have been 1037nor installs any other window parameters unless they have been
1033explicitly provided via a `window-parameters' entry in ALIST." 1038explicitly provided via a `window-parameters' entry in ALIST.
1039
1040This is an action function for buffer display, see Info
1041node `(elisp) Buffer Display Action Functions'. It should be
1042called only by `display-buffer' or a function directly or
1043indirectly 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
6166WINDOW's buffer (although WINDOW may show BUFFER already). 6176WINDOW's buffer (although WINDOW may show BUFFER already).
6167 6177
6168TYPE specifies the type of the calling operation and must be one 6178TYPE specifies the type of the calling operation and must be one
6169of the symbols 'reuse' (meaning that WINDOW exists already and 6179of the symbols `reuse' (meaning that WINDOW exists already and
6170will be used for displaying BUFFER), 'window' (WINDOW was created 6180will be used for displaying BUFFER), `window' (WINDOW was created
6171on an already existing frame) or 'frame' (WINDOW was created on a 6181on an already existing frame) or `frame' (WINDOW was created on a
6172new frame). 6182new frame).
6173 6183
6174This function installs or updates the 'quit-restore' parameter of 6184This function installs or updates the `quit-restore' parameter of
6175WINDOW. The 'quit-restore' parameter is a list of four elements: 6185WINDOW. The `quit-restore' parameter is a list of four elements:
6176The first element is one of the symbols 'window', 'frame', 'same' 6186The first element is one of the symbols `window', `frame', `same'
6177or 'other'. The second element is either one of the symbols 6187or `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
6179previously shown in the window, that buffer's window start and 6189previously shown in the window, that buffer's window start and
6180window point, and the window's height. The third element is the 6190window point, and the window's height. The third element is the
6181window selected at the time the parameter was created. The 6191window 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
7288frame. If successful, return the window used; otherwise return 7298frame. If successful, return the window used; otherwise return
7289nil. 7299nil.
7290 7300
7291ALIST is an association list of action symbols and values. 7301ALIST is an association list of action symbols and values. See
7292See Info node `(elisp) Buffer Display Action Alists' for 7302Info node `(elisp) Buffer Display Action Alists' for details of
7293details of such alists. 7303such alists.
7294 7304
7295If ALIST has a non-nil `inhibit-switch-frame' entry, avoid 7305If ALIST has a non-nil `inhibit-switch-frame' entry, avoid
7296raising the frame. 7306raising the frame. If it has a non-nil `frame-predicate' entry,
7297 7307its value is a function taking one argument (a frame), returning
7298If ALIST has a non-nil `frame-predicate' entry, its value is a 7308non-nil if the frame is a candidate; this function replaces the
7299function taking one argument (a frame), returning non-nil if the 7309default predicate. If ALIST has a non-nil `inhibit-same-window'
7300frame is a candidate; this function replaces the default 7310entry, avoid using the currently selected window (only useful
7301predicate. 7311with a frame-predicate that allows using the selected frame).
7302 7312
7303If ALIST has a non-nil `inhibit-same-window' entry, avoid using 7313This is an action function for buffer display, see Info
7304the currently selected window (only useful with a frame-predicate 7314node `(elisp) Buffer Display Action Functions'. It should be
7305that allows the selected frame)." 7315called only by `display-buffer' or a function directly or
7316indirectly 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 7335ALIST is an association list of action symbols and values. See
7325ALIST is an association list of action symbols and values. 7336Info node `(elisp) Buffer Display Action Alists' for details of
7326See Info node `(elisp) Buffer Display Action Alists' for 7337such alists.
7327details of such alists.
7328 7338
7329This function fails if ALIST has an `inhibit-same-window' 7339This function fails if ALIST has an `inhibit-same-window'
7330element whose value is non-nil, or if the selected window is a 7340element whose value is non-nil, or if the selected window is a
7331minibuffer window or is dedicated to another buffer; in that case, 7341minibuffer window or is dedicated to another buffer; in that case,
7332return nil. Otherwise, return the selected window." 7342return nil. Otherwise, return the selected window.
7343
7344This is an action function for buffer display, see Info
7345node `(elisp) Buffer Display Action Functions'. It should be
7346called only by `display-buffer' or a function directly or
7347indirectly 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 7355ALIST is an association list of action symbols and values. See
7341ALIST is an association list of action symbols and values. 7356Info node `(elisp) Buffer Display Action Alists' for details of
7342See Info node `(elisp) Buffer Display Action Alists' for 7357such alists.
7343details of such alists.
7344 7358
7345If `same-window-p' returns non-nil for BUFFER's name, call 7359If `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."
7353Preferably use a window on the selected frame if such a window 7367Preferably use a window on the selected frame if such a window
7354exists. Return nil if no usable window is found. 7368exists. Return nil if no usable window is found.
7355 7369
7356ALIST is an association list of action symbols and values. 7370ALIST is an association list of action symbols and values. See
7357See Info node `(elisp) Buffer Display Action Alists' for 7371Info node `(elisp) Buffer Display Action Alists' for details of
7358details of such alists. 7372such alists.
7359 7373
7360If ALIST has a non-nil 'inhibit-same-window' entry, the selected 7374If ALIST has a non-nil `inhibit-same-window' entry, the selected
7361window is not eligible for reuse. 7375window is not eligible for reuse.
7362 7376
7363If ALIST contains a 'reusable-frames' entry, its value determines 7377If ALIST contains a `reusable-frames' entry, its value determines
7364which frames to search for a reusable window: 7378which 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
7371If ALIST contains no 'reusable-frames' entry, search just the 7385If ALIST contains no `reusable-frames' entry, search just the
7372selected frame if `display-buffer-reuse-frames' and 7386selected 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
7374terminal if either of those variables is non-nil. 7388terminal if either of those variables is non-nil.
7375 7389
7376If ALIST has a non-nil 'inhibit-switch-frame' entry, then in the 7390If ALIST has a non-nil `inhibit-switch-frame' entry, then in the
7377event that a window on another frame is chosen, avoid raising 7391event that a window on another frame is chosen, avoid raising
7378that frame." 7392that frame.
7393
7394This is an action function for buffer display, see Info
7395node `(elisp) Buffer Display Action Functions'. It should be
7396called only by `display-buffer' or a function directly or
7397indirectly 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."
7412Display BUFFER in the returned window. Return nil if no usable 7431Display BUFFER in the returned window. Return nil if no usable
7413window is found. 7432window is found.
7414 7433
7415ALIST is an association list of action symbols and values. 7434ALIST is an association list of action symbols and values. See
7416See Info node `(elisp) Buffer Display Action Alists' for 7435Info node `(elisp) Buffer Display Action Alists' for details of
7417details of such alists. 7436such alists.
7418 7437
7419If ALIST contains a `mode' entry, its value is a major mode (a 7438If ALIST contains a `mode' entry, its value is a major mode (a
7420symbol) or a list of modes. A window is a candidate if it 7439symbol) or a list of modes. A window is a candidate if it
@@ -7425,7 +7444,12 @@ is used.
7425The behavior is also controlled by entries for 7444The 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
7449This is an action function for buffer display, see Info
7450node `(elisp) Buffer Display Action Functions'. It should be
7451called only by `display-buffer' or a function directly or
7452indirectly 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."
7495This works by calling `pop-up-frame-function'. If successful, 7519This works by calling `pop-up-frame-function'. If successful,
7496return the window used; otherwise return nil. 7520return the window used; otherwise return nil.
7497 7521
7498ALIST is an association list of action symbols and values. 7522ALIST is an association list of action symbols and values. See
7499See Info node `(elisp) Buffer Display Action Alists' for 7523Info node `(elisp) Buffer Display Action Alists' for details of
7500details of such alists. 7524such alists.
7501 7525
7502If ALIST has a non-nil `inhibit-switch-frame' entry, avoid 7526If ALIST has a non-nil `inhibit-switch-frame' entry, avoid
7503raising the new frame. 7527raising the new frame. A non-nil `pop-up-frame-parameters' entry
7528specifies an alist of frame parameters to give the new frame.
7504 7529
7505If ALIST has a non-nil `pop-up-frame-parameters' entry, the 7530This is an action function for buffer display, see Info
7506corresponding value is an alist of frame parameters to give the 7531node `(elisp) Buffer Display Action Functions'. It should be
7507new frame." 7532called only by `display-buffer' or a function directly or
7533indirectly 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.
7526If successful, return the new window; otherwise return nil. 7552If successful, return the new window; otherwise return nil.
7527 7553
7528ALIST is an association list of action symbols and values. 7554ALIST is an association list of action symbols and values. See
7529See Info node `(elisp) Buffer Display Action Alists' for 7555Info node `(elisp) Buffer Display Action Alists' for details of
7530details of such alists. 7556such alists.
7531 7557
7532If ALIST has a non-nil `inhibit-switch-frame' entry, then in the 7558If ALIST has a non-nil `inhibit-switch-frame' entry, then in the
7533event that the new window is created on another frame, avoid 7559event that the new window is created on another frame, avoid
7534raising the frame." 7560raising the frame.
7561
7562This is an action function for buffer display, see Info
7563node `(elisp) Buffer Display Action Functions'. It should be
7564called only by `display-buffer' or a function directly or
7565indirectly 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'.
7557If `pop-up-frames' is non-nil (and not `graphic-only' on a 7588ALIST is an association list of action symbols and values. See
7558text-only terminal), try with `display-buffer-pop-up-frame'. 7589Info node `(elisp) Buffer Display Action Alists' for details of
7559 7590such alists.
7560ALIST is an association list of action symbols and values.
7561See Info node `(elisp) Buffer Display Action Alists' for
7562details of such alists.
7563 7591
7564If that cannot be done, and `pop-up-windows' is non-nil, try 7592If `pop-up-frames' is non-nil (and not `graphic-only' on a
7565again with `display-buffer-pop-up-window'." 7593text-only terminal), try with `display-buffer-pop-up-frame'. If
7594that cannot be done, and `pop-up-windows' is non-nil, try again
7595with `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'."
7571If `pop-up-frames' is non-nil (and not `graphic-only' on a 7601If `pop-up-frames' is non-nil (and not `graphic-only' on a
7572text-only terminal), try with `display-buffer-pop-up-frame'. 7602text-only terminal), try with `display-buffer-pop-up-frame'.
7573 7603
7574ALIST is an association list of action symbols and values. 7604ALIST is an association list of action symbols and values. See
7575See Info node `(elisp) Buffer Display Action Alists' for 7605Info node `(elisp) Buffer Display Action Alists' for details of
7576details of such alists." 7606such 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
7591frame or makes a new child frame of the selected frame. If 7621frame or makes a new child frame of the selected frame. If
7592successful, return the window used; otherwise return nil. 7622successful, return the window used; otherwise return nil.
7593 7623
7594ALIST is an association list of action symbols and values. 7624ALIST is an association list of action symbols and values. See
7595See Info node `(elisp) Buffer Display Action Alists' for 7625Info node `(elisp) Buffer Display Action Alists' for details of
7596details of such alists. 7626such alists.
7597 7627
7598If ALIST has a non-nil 'child-frame-parameters' entry, the 7628If ALIST has a non-nil `child-frame-parameters' entry, the
7599corresponding value is an alist of frame parameters to give the 7629corresponding value is an alist of frame parameters to give the
7600new frame. A 'parent-frame' parameter specifying the selected 7630new frame. A `parent-frame' parameter specifying the selected
7601frame is provided by default. If the child frame should be or 7631frame is provided by default. If the child frame shall be or
7602become the child of any other frame, a corresponding entry must 7632become the child of any other frame, a corresponding entry must
7603be added to ALIST." 7633be added to ALIST.
7634
7635This is an action function for buffer display, see Info
7636node `(elisp) Buffer Display Action Functions'. It should be
7637called only by `display-buffer' or a function directly or
7638indirectly 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.
7736ALIST is an association list of action symbols and values. See
7737Info node `(elisp) Buffer Display Action Alists' for details of
7738such alists.
7701 7739
7702ALIST is an association list of action symbols and values. 7740ALIST has to contain a `direction' entry whose value should be
7703See Info node `(elisp) Buffer Display Action Alists' for 7741one of `left', `above' (or `up'), `right' and `below' (or
7704details of such alists. 7742'down'). Other values are usually interpreted as `below'.
7705 7743
7706ALIST has to contain a 'direction' entry whose value should be 7744If ALIST also contains a `window' entry, its value specifies a
7707one of 'left', 'above' (or 'up'), 'right', and 'below' (or
7708'down'). Other values are usually interpreted as 'below'.
7709
7710If ALIST also contains a 'window' entry, its value specifies a
7711reference window. That value can be a special symbol like 7745reference 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
7718This function tries to reuse or split a window such that the 7752This function tries to reuse or split a window such that the
7719window produced this way is on the side of the reference window 7753window produced this way is on the side of the reference window
7720specified by the 'direction' entry. 7754specified by the `direction' entry.
7721 7755
7722Four special values for 'direction' entries allow to implicitly 7756Four special values for `direction' entries allow to implicitly
7723specify the selected frame's main window as reference window: 7757specify 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
7762This is an action function for buffer display, see Info
7763node `(elisp) Buffer Display Action Functions'. It should be
7764called only by `display-buffer' or a function directly or
7765indirectly 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.
7791If that attempt fails as well and there is a non-dedicated window 7830If that attempt fails as well and there is a non-dedicated window
7792below the selected one, use that window. 7831below the selected one, use that window.
7793 7832
7794ALIST is an association list of action symbols and values. 7833ALIST is an association list of action symbols and values. See
7795See Info node `(elisp) Buffer Display Action Alists' for 7834Info node `(elisp) Buffer Display Action Alists' for details of
7796details of such alists. 7835such alists.
7797 7836
7798If ALIST contains a 'window-min-height' entry, this function 7837If ALIST contains a `window-min-height' entry, this function
7799ensures that the window used is or can become at least as high as 7838ensures that the window used is or can become at least as high as
7800specified by that entry's value. Note that such an entry alone 7839specified by that entry's value. Note that such an entry alone
7801will not resize the window per se. In order to do that, ALIST 7840will not resize the window per se. In order to do that, ALIST
7802must also contain a 'window-height' entry with the same value." 7841must also contain a `window-height' entry with the same value.
7842
7843This is an action function for buffer display, see Info
7844node `(elisp) Buffer Display Action Functions'. It should be
7845called only by `display-buffer' or a function directly or
7846indirectly 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
7851frame's root window, or reuses some window at the bottom of the 7895frame's root window, or reuses some window at the bottom of the
7852selected frame. 7896selected frame.
7853 7897
7854ALIST is an association list of action symbols and values. 7898ALIST is an association list of action symbols and values. See
7855See Info node `(elisp) Buffer Display Action Alists' for 7899Info node `(elisp) Buffer Display Action Alists' for details of
7856details of such alists." 7900such alists.
7901
7902This is an action function for buffer display, see Info
7903node `(elisp) Buffer Display Action Functions'. It should be
7904called only by `display-buffer' or a function directly or
7905indirectly 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 7929ALIST is an association list of action symbols and values. See
7881ALIST is an association list of action symbols and values. 7930Info node `(elisp) Buffer Display Action Alists' for details of
7882See Info node `(elisp) Buffer Display Action Alists' for 7931such alists.
7883details of such alists.
7884 7932
7885If ALIST has a non-nil `inhibit-same-window' entry, the selected 7933If ALIST has a non-nil `inhibit-same-window' entry, the selected
7886window is not usable. A dedicated window is usable only if it 7934window is not usable. A dedicated window is usable only if it
@@ -7904,14 +7952,19 @@ terminal if either of those variables is non-nil.
7904If more than one window is usable according to these rules, 7952If more than one window is usable according to these rules,
7905apply the following order of preference: 7953apply 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
7964This is an action function for buffer display, see Info
7965node `(elisp) Buffer Display Action Functions'. It should be
7966called only by `display-buffer' or a function directly or
7967indirectly 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:
7953Search for a usable window, set that window to the buffer, and 8006Search for a usable window, set that window to the buffer, and
7954return the window. If no suitable window is found, return nil. 8007return the window. If no suitable window is found, return nil.
7955 8008
7956ALIST is an association list of action symbols and values. 8009ALIST is an association list of action symbols and values. See
7957See Info node `(elisp) Buffer Display Action Alists' for 8010Info node `(elisp) Buffer Display Action Alists' for details of
7958details of such alists. 8011such alists.
7959 8012
7960If ALIST has a non-nil `inhibit-switch-frame' entry, then in the 8013If ALIST has a non-nil `inhibit-switch-frame' entry, then in the
7961event that a window in another frame is chosen, avoid raising 8014event that a window on another frame is chosen, avoid raising
7962that frame." 8015that frame.
8016
8017This is an action function for buffer display, see Info
8018node `(elisp) Buffer Display Action Functions'. It should be
8019called only by `display-buffer' or a function directly or
8020indirectly 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 8058ALIST is an association list of action symbols and values. See
8001ALIST is an association list of action symbols and values. 8059Info node `(elisp) Buffer Display Action Alists' for details of
8002See Info node `(elisp) Buffer Display Action Alists' for 8060such alists.
8003details of such alists. 8061
8004 8062If ALIST contains a non-nil `allow-no-window' entry, do nothing
8005If ALIST has a non-nil `allow-no-window' entry, then don't display 8063and return `fail'. This allows `display-buffer' to override the
8006a window at all. This makes possible to override the default action 8064default action and avoid displaying the buffer. It is assumed
8007and avoid displaying the buffer. It is assumed that when the caller 8065that when the caller specifies a non-nil `allow-no-window' ALIST
8008specifies a non-nil `allow-no-window' then it can handle a nil value 8066entry, it can handle a nil value returned by `display-buffer'.
8009returned from `display-buffer' in this case." 8067
8068This is an action function for buffer display, see Info
8069node `(elisp) Buffer Display Action Functions'. It should be
8070called only by `display-buffer' or a function directly or
8071indirectly 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