aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorMartin Rudalics2014-08-08 11:52:59 +0200
committerMartin Rudalics2014-08-08 11:52:59 +0200
commit8faa5ee738c269d19071354b63cd64688f6ba101 (patch)
treead4c380ec3adb1cd4f704afaccc7afb5a084ace4 /src/window.c
parentf8ddedff72fc9bf7247d47d750bf7f63568e988a (diff)
downloademacs-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.c61
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,
311DEFUN ("window-valid-p", Fwindow_valid_p, Swindow_valid_p, 1, 1, 0, 311DEFUN ("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.
313A valid window is either a window that displays a buffer or an internal 313A valid window is either a window that displays a buffer or an internal
314window. Deleted windows are not live. */) 314window. 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
793DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0, 793DEFUN ("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.
795WINDOW must be a valid window and defaults to the selected one. */) 795WINDOW must be a valid window and defaults to the selected one.
796
797The new total size of WINDOW (see `window-total-size') is that set by
798the 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. */)
801DEFUN ("window-normal-size", Fwindow_normal_size, Swindow_normal_size, 0, 2, 0, 804DEFUN ("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.
803WINDOW must be a valid window and defaults to the selected one. 806WINDOW must be a valid window and defaults to the selected one.
804If HORIZONTAL is non-nil, return the normal width of WINDOW. */) 807If HORIZONTAL is non-nil, return the normal width of WINDOW.
808
809The normal height of a frame's root window or a window that is
810horizontally combined (a window that has a left or right sibling) is
8111.0. The normal height of a window that is vertically combined (has a
812sibling above or below) is the fraction of the window's height with
813respect to its parent. The sum of the normal heights of all windows in a
814vertical combination equals 1.0.
815
816Similarly, the normal width of a frame's root window or a window that is
817vertically combined equals 1.0. The normal width of a window that is
818horizontally combined is the fraction of the window's width with respect
819to its parent. The sum of the normal widths of all windows in a
820horizontal combination equals 1.0.
821
822The normal sizes of windows are used to restore the proportional sizes
823of windows after they have been shrunk to their minimum sizes; for
824example when a frame is temporarily made very small and afterwards gets
825re-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
812DEFUN ("window-new-normal", Fwindow_new_normal, Swindow_new_normal, 0, 1, 0, 833DEFUN ("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.
814WINDOW must be a valid window and defaults to the selected one. */) 835WINDOW must be a valid window and defaults to the selected one.
836
837The new normal size of WINDOW (see `window-normal-size') is that set by
838the 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
820DEFUN ("window-new-pixel", Fwindow_new_pixel, Swindow_new_pixel, 0, 1, 0, 844DEFUN ("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.
822WINDOW must be a valid window and defaults to the selected one. */) 846WINDOW must be a valid window and defaults to the selected one.
847
848The 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
850installed by the function `window-resize-apply' and will be returned by
851the 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.
3715Optional argument ADD non-nil means add SIZE to the new pixel size of 3744Optional argument ADD non-nil means add SIZE to the new pixel size of
3716WINDOW and return the sum. 3745WINDOW and return the sum.
3717 3746
3747The new pixel size of WINDOW is used by `window-resize-apply' and, if
3748that function succeeds, will be subsequently returned by the functions
3749`window-pixel-height' and `window-pixel-width'.
3750
3718Note: This function does not operate on any child windows of WINDOW. */) 3751Note: 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.
3739Optional argument ADD non-nil means add SIZE to the new total size of 3772Optional argument ADD non-nil means add SIZE to the new total size of
3740WINDOW and return the sum. 3773WINDOW and return the sum.
3741 3774
3775The new total size of WINDOW is used by `window-resize-apply-total' and,
3776after calling that function, will be returned by `window-total-size'.
3777
3742Note: This function does not operate on any child windows of WINDOW. */) 3778Note: 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,
3758WINDOW must be a valid window and defaults to the selected one. 3794WINDOW must be a valid window and defaults to the selected one.
3759Return SIZE. 3795Return SIZE.
3760 3796
3797The new normal size of WINDOW is used by `window-resize-apply' and, if
3798that function succeeds, will be subsequently returned by the function
3799`window-normal-size'.
3800
3761Note: This function does not operate on any child windows of WINDOW. */) 3801Note: 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.
4025Optional argument HORIZONTAL omitted or nil means apply requested 4065Optional argument HORIZONTAL omitted or nil means apply requested
4026height values. HORIZONTAL non-nil means apply requested width values. 4066height values. HORIZONTAL non-nil means apply requested width values.
4027 4067
4028This function checks whether the requested values sum up to a valid 4068The requested size values are those set by `set-window-new-pixel' and
4029window layout, recursively assigns the new sizes of all child windows 4069`set-window-new-normal'. This function checks whether the requested
4030and calculates and assigns the new start positions of these windows. 4070values sum up to a valid window layout, recursively assigns the new
4071sizes of all child windows and calculates and assigns the new start
4072positions of these windows.
4073
4074Return t if the requested values have been applied correctly, nil
4075otherwise.
4031 4076
4032Note: This function does not check any of `window-fixed-size-p', 4077Note: 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