diff options
| author | Martin Rudalics | 2014-08-08 11:52:59 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2014-08-08 11:52:59 +0200 |
| commit | 8faa5ee738c269d19071354b63cd64688f6ba101 (patch) | |
| tree | ad4c380ec3adb1cd4f704afaccc7afb5a084ace4 /src/window.c | |
| parent | f8ddedff72fc9bf7247d47d750bf7f63568e988a (diff) | |
| download | emacs-8faa5ee738c269d19071354b63cd64688f6ba101.tar.gz emacs-8faa5ee738c269d19071354b63cd64688f6ba101.zip | |
Fix some doc-strings in window.c (Bug#18112) (Bug#18194).
* window.c (Fwindow_valid_p): Fix doc-string (Bug#18194).
(Fwindow_new_total, Fwindow_normal_size, Fwindow_new_normal)
(Fwindow_new_pixel, Fset_window_new_pixel)
(Fset_window_new_total, Fset_window_new_normal)
(Fwindow_resize_apply): Fix doc-strings (see Bug#18112).
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 61 |
1 files changed, 53 insertions, 8 deletions
diff --git a/src/window.c b/src/window.c index 5c4e2f97a3b..8502e7b022c 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -311,7 +311,7 @@ DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0, | |||
| 311 | DEFUN ("window-valid-p", Fwindow_valid_p, Swindow_valid_p, 1, 1, 0, | 311 | DEFUN ("window-valid-p", Fwindow_valid_p, Swindow_valid_p, 1, 1, 0, |
| 312 | doc: /* Return t if OBJECT is a valid window and nil otherwise. | 312 | doc: /* Return t if OBJECT is a valid window and nil otherwise. |
| 313 | A valid window is either a window that displays a buffer or an internal | 313 | A valid window is either a window that displays a buffer or an internal |
| 314 | window. Deleted windows are not live. */) | 314 | window. Windows that have been deleted are not valid. */) |
| 315 | (Lisp_Object object) | 315 | (Lisp_Object object) |
| 316 | { | 316 | { |
| 317 | return WINDOW_VALID_P (object) ? Qt : Qnil; | 317 | return WINDOW_VALID_P (object) ? Qt : Qnil; |
| @@ -792,7 +792,10 @@ total width of WINDOW. */) | |||
| 792 | 792 | ||
| 793 | DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0, | 793 | DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0, |
| 794 | doc: /* Return the new total size of window WINDOW. | 794 | doc: /* Return the new total size of window WINDOW. |
| 795 | WINDOW must be a valid window and defaults to the selected one. */) | 795 | WINDOW must be a valid window and defaults to the selected one. |
| 796 | |||
| 797 | The new total size of WINDOW (see `window-total-size') is that set by | ||
| 798 | the last call of `set-window-new-total' for WINDOW. */) | ||
| 796 | (Lisp_Object window) | 799 | (Lisp_Object window) |
| 797 | { | 800 | { |
| 798 | return decode_valid_window (window)->new_total; | 801 | return decode_valid_window (window)->new_total; |
| @@ -801,7 +804,25 @@ WINDOW must be a valid window and defaults to the selected one. */) | |||
| 801 | DEFUN ("window-normal-size", Fwindow_normal_size, Swindow_normal_size, 0, 2, 0, | 804 | DEFUN ("window-normal-size", Fwindow_normal_size, Swindow_normal_size, 0, 2, 0, |
| 802 | doc: /* Return the normal height of window WINDOW. | 805 | doc: /* Return the normal height of window WINDOW. |
| 803 | WINDOW must be a valid window and defaults to the selected one. | 806 | WINDOW must be a valid window and defaults to the selected one. |
| 804 | If HORIZONTAL is non-nil, return the normal width of WINDOW. */) | 807 | If HORIZONTAL is non-nil, return the normal width of WINDOW. |
| 808 | |||
| 809 | The normal height of a frame's root window or a window that is | ||
| 810 | horizontally combined (a window that has a left or right sibling) is | ||
| 811 | 1.0. The normal height of a window that is vertically combined (has a | ||
| 812 | sibling above or below) is the fraction of the window's height with | ||
| 813 | respect to its parent. The sum of the normal heights of all windows in a | ||
| 814 | vertical combination equals 1.0. | ||
| 815 | |||
| 816 | Similarly, the normal width of a frame's root window or a window that is | ||
| 817 | vertically combined equals 1.0. The normal width of a window that is | ||
| 818 | horizontally combined is the fraction of the window's width with respect | ||
| 819 | to its parent. The sum of the normal widths of all windows in a | ||
| 820 | horizontal combination equals 1.0. | ||
| 821 | |||
| 822 | The normal sizes of windows are used to restore the proportional sizes | ||
| 823 | of windows after they have been shrunk to their minimum sizes; for | ||
| 824 | example when a frame is temporarily made very small and afterwards gets | ||
| 825 | re-enlarged to its previous size. */) | ||
| 805 | (Lisp_Object window, Lisp_Object horizontal) | 826 | (Lisp_Object window, Lisp_Object horizontal) |
| 806 | { | 827 | { |
| 807 | struct window *w = decode_valid_window (window); | 828 | struct window *w = decode_valid_window (window); |
| @@ -811,7 +832,10 @@ If HORIZONTAL is non-nil, return the normal width of WINDOW. */) | |||
| 811 | 832 | ||
| 812 | DEFUN ("window-new-normal", Fwindow_new_normal, Swindow_new_normal, 0, 1, 0, | 833 | DEFUN ("window-new-normal", Fwindow_new_normal, Swindow_new_normal, 0, 1, 0, |
| 813 | doc: /* Return new normal size of window WINDOW. | 834 | doc: /* Return new normal size of window WINDOW. |
| 814 | WINDOW must be a valid window and defaults to the selected one. */) | 835 | WINDOW must be a valid window and defaults to the selected one. |
| 836 | |||
| 837 | The new normal size of WINDOW (see `window-normal-size') is that set by | ||
| 838 | the last call of `set-window-new-normal' for WINDOW. */) | ||
| 815 | (Lisp_Object window) | 839 | (Lisp_Object window) |
| 816 | { | 840 | { |
| 817 | return decode_valid_window (window)->new_normal; | 841 | return decode_valid_window (window)->new_normal; |
| @@ -819,7 +843,12 @@ WINDOW must be a valid window and defaults to the selected one. */) | |||
| 819 | 843 | ||
| 820 | DEFUN ("window-new-pixel", Fwindow_new_pixel, Swindow_new_pixel, 0, 1, 0, | 844 | DEFUN ("window-new-pixel", Fwindow_new_pixel, Swindow_new_pixel, 0, 1, 0, |
| 821 | doc: /* Return new pixel size of window WINDOW. | 845 | doc: /* Return new pixel size of window WINDOW. |
| 822 | WINDOW must be a valid window and defaults to the selected one. */) | 846 | WINDOW must be a valid window and defaults to the selected one. |
| 847 | |||
| 848 | The new pixel size of WINDOW is the value set by the last call of | ||
| 849 | `set-window-new-pixel' for WINDOW. If set correctly, it gets eventually | ||
| 850 | installed by the function `window-resize-apply' and will be returned by | ||
| 851 | the functions `window-pixel-height' or `window-pixel-width'. */) | ||
| 823 | (Lisp_Object window) | 852 | (Lisp_Object window) |
| 824 | { | 853 | { |
| 825 | return decode_valid_window (window)->new_pixel; | 854 | return decode_valid_window (window)->new_pixel; |
| @@ -3715,6 +3744,10 @@ Return SIZE. | |||
| 3715 | Optional argument ADD non-nil means add SIZE to the new pixel size of | 3744 | Optional argument ADD non-nil means add SIZE to the new pixel size of |
| 3716 | WINDOW and return the sum. | 3745 | WINDOW and return the sum. |
| 3717 | 3746 | ||
| 3747 | The new pixel size of WINDOW is used by `window-resize-apply' and, if | ||
| 3748 | that function succeeds, will be subsequently returned by the functions | ||
| 3749 | `window-pixel-height' and `window-pixel-width'. | ||
| 3750 | |||
| 3718 | Note: This function does not operate on any child windows of WINDOW. */) | 3751 | Note: This function does not operate on any child windows of WINDOW. */) |
| 3719 | (Lisp_Object window, Lisp_Object size, Lisp_Object add) | 3752 | (Lisp_Object window, Lisp_Object size, Lisp_Object add) |
| 3720 | { | 3753 | { |
| @@ -3739,6 +3772,9 @@ Return SIZE. | |||
| 3739 | Optional argument ADD non-nil means add SIZE to the new total size of | 3772 | Optional argument ADD non-nil means add SIZE to the new total size of |
| 3740 | WINDOW and return the sum. | 3773 | WINDOW and return the sum. |
| 3741 | 3774 | ||
| 3775 | The new total size of WINDOW is used by `window-resize-apply-total' and, | ||
| 3776 | after calling that function, will be returned by `window-total-size'. | ||
| 3777 | |||
| 3742 | Note: This function does not operate on any child windows of WINDOW. */) | 3778 | Note: This function does not operate on any child windows of WINDOW. */) |
| 3743 | (Lisp_Object window, Lisp_Object size, Lisp_Object add) | 3779 | (Lisp_Object window, Lisp_Object size, Lisp_Object add) |
| 3744 | { | 3780 | { |
| @@ -3758,6 +3794,10 @@ DEFUN ("set-window-new-normal", Fset_window_new_normal, Sset_window_new_normal, | |||
| 3758 | WINDOW must be a valid window and defaults to the selected one. | 3794 | WINDOW must be a valid window and defaults to the selected one. |
| 3759 | Return SIZE. | 3795 | Return SIZE. |
| 3760 | 3796 | ||
| 3797 | The new normal size of WINDOW is used by `window-resize-apply' and, if | ||
| 3798 | that function succeeds, will be subsequently returned by the function | ||
| 3799 | `window-normal-size'. | ||
| 3800 | |||
| 3761 | Note: This function does not operate on any child windows of WINDOW. */) | 3801 | Note: This function does not operate on any child windows of WINDOW. */) |
| 3762 | (Lisp_Object window, Lisp_Object size) | 3802 | (Lisp_Object window, Lisp_Object size) |
| 3763 | { | 3803 | { |
| @@ -4025,9 +4065,14 @@ If FRAME is omitted or nil, it defaults to the selected frame. | |||
| 4025 | Optional argument HORIZONTAL omitted or nil means apply requested | 4065 | Optional argument HORIZONTAL omitted or nil means apply requested |
| 4026 | height values. HORIZONTAL non-nil means apply requested width values. | 4066 | height values. HORIZONTAL non-nil means apply requested width values. |
| 4027 | 4067 | ||
| 4028 | This function checks whether the requested values sum up to a valid | 4068 | The requested size values are those set by `set-window-new-pixel' and |
| 4029 | window layout, recursively assigns the new sizes of all child windows | 4069 | `set-window-new-normal'. This function checks whether the requested |
| 4030 | and calculates and assigns the new start positions of these windows. | 4070 | values sum up to a valid window layout, recursively assigns the new |
| 4071 | sizes of all child windows and calculates and assigns the new start | ||
| 4072 | positions of these windows. | ||
| 4073 | |||
| 4074 | Return t if the requested values have been applied correctly, nil | ||
| 4075 | otherwise. | ||
| 4031 | 4076 | ||
| 4032 | Note: This function does not check any of `window-fixed-size-p', | 4077 | Note: This function does not check any of `window-fixed-size-p', |
| 4033 | `window-min-height' or `window-min-width'. All these checks have to | 4078 | `window-min-height' or `window-min-width'. All these checks have to |