diff options
| author | Martin Rudalics | 2018-11-08 20:20:13 +0100 |
|---|---|---|
| committer | Martin Rudalics | 2018-11-08 20:20:13 +0100 |
| commit | fa605f242eec680b2c7d1374d1405510818d9103 (patch) | |
| tree | 651552b9fdaa85a52f5704ed32d1df60967ee885 /doc | |
| parent | aa556596fabe07af8ee33f59c6d3ec3b882f369e (diff) | |
| download | emacs-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.texi | 58 |
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 |
| 2750 | The value specifies the frame(s) to search for a window that can be | 2750 | The value specifies the set of frames to search for a window that can |
| 2751 | reused because it already displays the buffer. It can be set as | 2751 | be reused because it already displays the buffer. It can be set as |
| 2752 | follows: | 2752 | follows: |
| 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 |
| 2794 | The value specifies whether and how to adjust the height of the chosen | 2794 | The value specifies whether and how to adjust the height of the chosen |
| 2795 | window, and can have the following values: | 2795 | window 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 |
| 2802 | A number specifies the desired height of the chosen window. An | 2802 | An integer number specifies the desired total height of the chosen |
| 2803 | integer specifies the number of lines of the window. A floating-point | 2803 | window in lines. |
| 2804 | number gives the fraction of the window's height with respect to the | 2804 | |
| 2805 | height of the frame's root window. | 2805 | @item |
| 2806 | A floating-point number specifies the fraction of the chosen window's | ||
| 2807 | desired total height with respect to the total height of its frame's | ||
| 2808 | root window. | ||
| 2806 | 2809 | ||
| 2807 | @item | 2810 | @item |
| 2808 | If the value specifies a function, that function is called with one | 2811 | If 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 | ||
| 2815 | All action functions that choose a window should process this entry. | 2818 | By convention, the height of the chosen window is adjusted only if the |
| 2819 | window is part of a vertical combination (@pxref{Windows and Frames}) | ||
| 2820 | to avoid changing the height of other, unrelated windows. Also, this | ||
| 2821 | entry should be processed only under certain conditions which are | ||
| 2822 | specified 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 |
| 2828 | A number specifies the desired width of the chosen window. An integer | 2835 | An integer specifies the desired total width of the chosen window in |
| 2829 | specifies the number of columns of the window. A floating-point | 2836 | columns. |
| 2830 | number gives the fraction of the window's width with respect to the | 2837 | |
| 2831 | width of the frame's root window. | 2838 | @item |
| 2839 | A floating-point number specifies the fraction of the chosen window's | ||
| 2840 | desired total width with respect to the total width of the frame's | ||
| 2841 | root window. | ||
| 2832 | 2842 | ||
| 2833 | @item | 2843 | @item |
| 2834 | If the value specifies a function, that function is called with one | 2844 | If 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 | |||
| 2836 | width of the window; its return value is ignored. | 2846 | width of the window; its return value is ignored. |
| 2837 | @end itemize | 2847 | @end itemize |
| 2838 | 2848 | ||
| 2839 | All action functions that choose a window should process this entry. | 2849 | By convention, the width of the chosen window is adjusted only if the |
| 2850 | window is part of a horizontal combination (@pxref{Windows and | ||
| 2851 | Frames}) to avoid changing the width of other, unrelated windows. | ||
| 2852 | Also, this entry should be processed under only certain conditions | ||
| 2853 | which 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 |
| 2843 | If non-@code{nil} such an entry tells Emacs to preserve the size of | 2857 | If non-@code{nil} such an entry tells Emacs to preserve the size of |
| 2844 | the window chosen (@pxref{Preserving Window Sizes}). The value should | 2858 | the window chosen (@pxref{Preserving Window Sizes}). The value should |
| 2845 | be either @code{(t . nil)} to preserve the width of the window, | 2859 | be 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 |
| 2847 | both its width and its height. All action functions that choose a | 2861 | preserve both, its width and its height. This entry should be |
| 2848 | window should process this entry. | 2862 | processed only under certain conditions which are specified right |
| 2863 | after 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 | |||
| 2900 | action function that cares about this entry. | 2915 | action function that cares about this entry. |
| 2901 | @end table | 2916 | @end table |
| 2902 | 2917 | ||
| 2918 | By convention, the entries @code{window-height}, @code{window-width} | ||
| 2919 | and @code{preserve-size} are applied after the chosen window's buffer | ||
| 2920 | has been set up and if and only if that window never showed another | ||
| 2921 | buffer before. More precisely, the latter means that the window must | ||
| 2922 | have been either created by the current @code{display-buffer} call or | ||
| 2923 | the window was created earlier by @code{display-buffer} to show the | ||
| 2924 | buffer and never was used to show another buffer until it was reused | ||
| 2925 | by 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 |