aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMartin Rudalics2018-11-08 20:20:13 +0100
committerMartin Rudalics2018-11-08 20:20:13 +0100
commitfa605f242eec680b2c7d1374d1405510818d9103 (patch)
tree651552b9fdaa85a52f5704ed32d1df60967ee885 /doc
parentaa556596fabe07af8ee33f59c6d3ec3b882f369e (diff)
downloademacs-fa605f242eec680b2c7d1374d1405510818d9103.tar.gz
emacs-fa605f242eec680b2c7d1374d1405510818d9103.zip
Rewrite buffer display related doc-strings and doc
* lisp/window.el (display-buffer-overriding-action) (display-buffer-alist, display-buffer-base-action) (display-buffer-fallback-action, display-buffer-assq-regexp) (display-buffer): Rewrite doc-strings using suggestions by Alan Mackenzie <acm@muc.de>. (display-buffer-use-some-frame): Adjust doc-string and reformat code. * doc/lispref/windows.texi (Buffer Display Action Alists): Make docs on 'window-height', 'window-width' and 'preserve-size' entries more accurate.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/windows.texi58
1 files changed, 41 insertions, 17 deletions
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 640c9923e99..106074e13d1 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -2747,8 +2747,8 @@ the buffer. This entry is used by
2747 2747
2748@vindex reusable-frames@r{, a buffer display action alist entry} 2748@vindex reusable-frames@r{, a buffer display action alist entry}
2749@item reusable-frames 2749@item reusable-frames
2750The value specifies the frame(s) to search for a window that can be 2750The value specifies the set of frames to search for a window that can
2751reused because it already displays the buffer. It can be set as 2751be reused because it already displays the buffer. It can be set as
2752follows: 2752follows:
2753 2753
2754@itemize @bullet 2754@itemize @bullet
@@ -2792,17 +2792,20 @@ entry.
2792@vindex window-height@r{, a buffer display action alist entry} 2792@vindex window-height@r{, a buffer display action alist entry}
2793@item window-height 2793@item window-height
2794The value specifies whether and how to adjust the height of the chosen 2794The value specifies whether and how to adjust the height of the chosen
2795window, and can have the following values: 2795window and can be one of the following:
2796 2796
2797@itemize @bullet 2797@itemize @bullet
2798@item 2798@item
2799@code{nil} means to leave the height of the chosen window alone. 2799@code{nil} means to leave the height of the chosen window alone.
2800 2800
2801@item 2801@item
2802A number specifies the desired height of the chosen window. An 2802An integer number specifies the desired total height of the chosen
2803integer specifies the number of lines of the window. A floating-point 2803window in lines.
2804number gives the fraction of the window's height with respect to the 2804
2805height of the frame's root window. 2805@item
2806A floating-point number specifies the fraction of the chosen window's
2807desired total height with respect to the total height of its frame's
2808root window.
2806 2809
2807@item 2810@item
2808If the value specifies a function, that function is called with one 2811If the value specifies a function, that function is called with one
@@ -2812,7 +2815,11 @@ are @code{shrink-window-if-larger-than-buffer} and
2812@code{fit-window-to-buffer}, see @ref{Resizing Windows}. 2815@code{fit-window-to-buffer}, see @ref{Resizing Windows}.
2813@end itemize 2816@end itemize
2814 2817
2815All action functions that choose a window should process this entry. 2818By convention, the height of the chosen window is adjusted only if the
2819window is part of a vertical combination (@pxref{Windows and Frames})
2820to avoid changing the height of other, unrelated windows. Also, this
2821entry should be processed only under certain conditions which are
2822specified right below this list.
2816 2823
2817@vindex window-width@r{, a buffer display action alist entry} 2824@vindex window-width@r{, a buffer display action alist entry}
2818@item window-width 2825@item window-width
@@ -2825,10 +2832,13 @@ value can be one of the following:
2825@code{nil} means to leave the width of the chosen window alone. 2832@code{nil} means to leave the width of the chosen window alone.
2826 2833
2827@item 2834@item
2828A number specifies the desired width of the chosen window. An integer 2835An integer specifies the desired total width of the chosen window in
2829specifies the number of columns of the window. A floating-point 2836columns.
2830number gives the fraction of the window's width with respect to the 2837
2831width of the frame's root window. 2838@item
2839A floating-point number specifies the fraction of the chosen window's
2840desired total width with respect to the total width of the frame's
2841root window.
2832 2842
2833@item 2843@item
2834If the value specifies a function, that function is called with one 2844If the value specifies a function, that function is called with one
@@ -2836,16 +2846,21 @@ argument---the chosen window. The function is supposed to adjust the
2836width of the window; its return value is ignored. 2846width of the window; its return value is ignored.
2837@end itemize 2847@end itemize
2838 2848
2839All action functions that choose a window should process this entry. 2849By convention, the width of the chosen window is adjusted only if the
2850window is part of a horizontal combination (@pxref{Windows and
2851Frames}) to avoid changing the width of other, unrelated windows.
2852Also, this entry should be processed under only certain conditions
2853which are specified right below this list.
2840 2854
2841@vindex preserve-size@r{, a buffer display action alist entry} 2855@vindex preserve-size@r{, a buffer display action alist entry}
2842@item preserve-size 2856@item preserve-size
2843If non-@code{nil} such an entry tells Emacs to preserve the size of 2857If non-@code{nil} such an entry tells Emacs to preserve the size of
2844the window chosen (@pxref{Preserving Window Sizes}). The value should 2858the window chosen (@pxref{Preserving Window Sizes}). The value should
2845be either @code{(t . nil)} to preserve the width of the window, 2859be either @w{@code{(t . nil)}} to preserve the width of the window,
2846@code{(nil . t)} to preserve its height or @code{(t . t)} to preserve 2860@w{@code{(nil . t)}} to preserve its height or @w{@code{(t . t)}} to
2847both its width and its height. All action functions that choose a 2861preserve both, its width and its height. This entry should be
2848window should process this entry. 2862processed only under certain conditions which are specified right
2863after this list.
2849 2864
2850@vindex pop-up-frame-parameters@r{, a buffer display action alist entry} 2865@vindex pop-up-frame-parameters@r{, a buffer display action alist entry}
2851@item pop-up-frame-parameters 2866@item pop-up-frame-parameters
@@ -2900,6 +2915,15 @@ will display the buffer. @code{display-buffer-no-window} is the only
2900action function that cares about this entry. 2915action function that cares about this entry.
2901@end table 2916@end table
2902 2917
2918By convention, the entries @code{window-height}, @code{window-width}
2919and @code{preserve-size} are applied after the chosen window's buffer
2920has been set up and if and only if that window never showed another
2921buffer before. More precisely, the latter means that the window must
2922have been either created by the current @code{display-buffer} call or
2923the window was created earlier by @code{display-buffer} to show the
2924buffer and never was used to show another buffer until it was reused
2925by the current invocation of @code{display-buffer}.
2926
2903 2927
2904@node Choosing Window Options 2928@node Choosing Window Options
2905@subsection Additional Options for Displaying Buffers 2929@subsection Additional Options for Displaying Buffers