diff options
| author | Luc Teirlinck | 2004-07-19 21:57:05 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2004-07-19 21:57:05 +0000 |
| commit | a0a37a6f545f6e88a8cead4573712931b122a1a8 (patch) | |
| tree | 6f85e08f4082ee35cbffd41395be7fbfaa8b6c6c /src | |
| parent | eab4e895a509fd818f252892665b2ce775d439f4 (diff) | |
| download | emacs-a0a37a6f545f6e88a8cead4573712931b122a1a8.tar.gz emacs-a0a37a6f545f6e88a8cead4573712931b122a1a8.zip | |
(Fpos_visible_in_window_p, Fset_window_hscroll)
(Fwindow_inside_pixel_edges, Fwindow_end, Fset_window_point)
(Fset_window_start, Fscroll_up, Fscroll_down)
(Fother_window_for_scrolling, Fscroll_other_window)
(Fsave_window_excursion, Fset_window_vscroll)
(syms_of_window) <window-size-fixed>: Doc fixes.
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 53 |
1 files changed, 35 insertions, 18 deletions
diff --git a/src/window.c b/src/window.c index 907cc113916..98efddd446e 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -318,15 +318,17 @@ WINDOW defaults to the selected window. */) | |||
| 318 | 318 | ||
| 319 | DEFUN ("pos-visible-in-window-p", Fpos_visible_in_window_p, | 319 | DEFUN ("pos-visible-in-window-p", Fpos_visible_in_window_p, |
| 320 | Spos_visible_in_window_p, 0, 3, 0, | 320 | Spos_visible_in_window_p, 0, 3, 0, |
| 321 | doc: /* Return t if position POS is currently on the frame in WINDOW. | 321 | doc: /* Return non-nil if position POS is currently on the frame in WINDOW. |
| 322 | Return nil if that position is scrolled vertically out of view. | 322 | Return nil if that position is scrolled vertically out of view. |
| 323 | If a character is only partially visible, nil is returned, unless the | 323 | If a character is only partially visible, nil is returned, unless the |
| 324 | optional argument PARTIALLY is non-nil. | 324 | optional argument PARTIALLY is non-nil. |
| 325 | If POS is only out of view because of horizontal scrolling, return non-nil. | ||
| 325 | POS defaults to point in WINDOW; WINDOW defaults to the selected window. | 326 | POS defaults to point in WINDOW; WINDOW defaults to the selected window. |
| 326 | 327 | ||
| 327 | If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil, | 328 | If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil, |
| 328 | return value is a list (X Y PARTIAL) where X and Y are the pixel relative | 329 | return value is a list (X Y FULLY) where X and Y are the pixel coordinates |
| 329 | coordinate */) | 330 | relative to the top left corner of the window, and FULLY is t if the |
| 331 | character after POS is fully visible and nil otherwise. */) | ||
| 330 | (pos, window, partially) | 332 | (pos, window, partially) |
| 331 | Lisp_Object pos, window, partially; | 333 | Lisp_Object pos, window, partially; |
| 332 | { | 334 | { |
| @@ -430,7 +432,7 @@ DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, | |||
| 430 | 432 | ||
| 431 | DEFUN ("set-window-hscroll", Fset_window_hscroll, Sset_window_hscroll, 2, 2, 0, | 433 | DEFUN ("set-window-hscroll", Fset_window_hscroll, Sset_window_hscroll, 2, 2, 0, |
| 432 | doc: /* Set number of columns WINDOW is scrolled from left margin to NCOL. | 434 | doc: /* Set number of columns WINDOW is scrolled from left margin to NCOL. |
| 433 | NCOL should be zero or positive. | 435 | Return NCOL. NCOL should be zero or positive. |
| 434 | 436 | ||
| 435 | Note that if `automatic-hscrolling' is non-nil, you cannot scroll the | 437 | Note that if `automatic-hscrolling' is non-nil, you cannot scroll the |
| 436 | window so that the location of point becomes invisible. */) | 438 | window so that the location of point becomes invisible. */) |
| @@ -544,7 +546,7 @@ display margins, fringes, header line, and/or mode line. */) | |||
| 544 | } | 546 | } |
| 545 | 547 | ||
| 546 | DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, | 548 | DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, |
| 547 | doc: /* Return a list of the edge coordinates of WINDOW. | 549 | doc: /* Return a list of the edge pixel coordinates of WINDOW. |
| 548 | \(LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at top left corner of frame. | 550 | \(LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at top left corner of frame. |
| 549 | RIGHT is one more than the rightmost x position used by text in WINDOW, | 551 | RIGHT is one more than the rightmost x position used by text in WINDOW, |
| 550 | and BOTTOM is one more than the bottommost y position used by text in WINDOW. | 552 | and BOTTOM is one more than the bottommost y position used by text in WINDOW. |
| @@ -986,6 +988,8 @@ DEFUN ("window-end", Fwindow_end, Swindow_end, 0, 2, 0, | |||
| 986 | This is updated by redisplay, when it runs to completion. | 988 | This is updated by redisplay, when it runs to completion. |
| 987 | Simply changing the buffer text or setting `window-start' | 989 | Simply changing the buffer text or setting `window-start' |
| 988 | does not update this value. | 990 | does not update this value. |
| 991 | Return nil if there is no recorded value. \(This can happen if the | ||
| 992 | last redisplay of WINDOW was preempted, and did not finish.) | ||
| 989 | If UPDATE is non-nil, compute the up-to-date position | 993 | If UPDATE is non-nil, compute the up-to-date position |
| 990 | if it isn't already recorded. */) | 994 | if it isn't already recorded. */) |
| 991 | (window, update) | 995 | (window, update) |
| @@ -1051,7 +1055,8 @@ if it isn't already recorded. */) | |||
| 1051 | } | 1055 | } |
| 1052 | 1056 | ||
| 1053 | DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0, | 1057 | DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0, |
| 1054 | doc: /* Make point value in WINDOW be at position POS in WINDOW's buffer. */) | 1058 | doc: /* Make point value in WINDOW be at position POS in WINDOW's buffer. |
| 1059 | Return POS. */) | ||
| 1055 | (window, pos) | 1060 | (window, pos) |
| 1056 | Lisp_Object window, pos; | 1061 | Lisp_Object window, pos; |
| 1057 | { | 1062 | { |
| @@ -1074,6 +1079,7 @@ DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0, | |||
| 1074 | 1079 | ||
| 1075 | DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0, | 1080 | DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0, |
| 1076 | doc: /* Make display in WINDOW start at position POS in WINDOW's buffer. | 1081 | doc: /* Make display in WINDOW start at position POS in WINDOW's buffer. |
| 1082 | Return POS. | ||
| 1077 | Optional third arg NOFORCE non-nil inhibits next redisplay | 1083 | Optional third arg NOFORCE non-nil inhibits next redisplay |
| 1078 | from overriding motion of point in order to display at this exact start. */) | 1084 | from overriding motion of point in order to display at this exact start. */) |
| 1079 | (window, pos, noforce) | 1085 | (window, pos, noforce) |
| @@ -4848,7 +4854,8 @@ scroll_command (n, direction) | |||
| 4848 | } | 4854 | } |
| 4849 | 4855 | ||
| 4850 | DEFUN ("scroll-up", Fscroll_up, Sscroll_up, 0, 1, "P", | 4856 | DEFUN ("scroll-up", Fscroll_up, Sscroll_up, 0, 1, "P", |
| 4851 | doc: /* Scroll text of current window upward ARG lines; or near full screen if no ARG. | 4857 | doc: /* Scroll text of current window upward ARG lines. |
| 4858 | If ARG is omitted or nil, scroll upward by a near full screen. | ||
| 4852 | A near full screen is `next-screen-context-lines' less than a full screen. | 4859 | A near full screen is `next-screen-context-lines' less than a full screen. |
| 4853 | Negative ARG means scroll downward. | 4860 | Negative ARG means scroll downward. |
| 4854 | If ARG is the atom `-', scroll downward by nearly full screen. | 4861 | If ARG is the atom `-', scroll downward by nearly full screen. |
| @@ -4861,7 +4868,8 @@ When calling from a program, supply as argument a number, nil, or `-'. */) | |||
| 4861 | } | 4868 | } |
| 4862 | 4869 | ||
| 4863 | DEFUN ("scroll-down", Fscroll_down, Sscroll_down, 0, 1, "P", | 4870 | DEFUN ("scroll-down", Fscroll_down, Sscroll_down, 0, 1, "P", |
| 4864 | doc: /* Scroll text of current window down ARG lines; or near full screen if no ARG. | 4871 | doc: /* Scroll text of current window down ARG lines. |
| 4872 | If ARG is omitted or nil, scroll down by a near full screen. | ||
| 4865 | A near full screen is `next-screen-context-lines' less than a full screen. | 4873 | A near full screen is `next-screen-context-lines' less than a full screen. |
| 4866 | Negative ARG means scroll upward. | 4874 | Negative ARG means scroll upward. |
| 4867 | If ARG is the atom `-', scroll upward by nearly full screen. | 4875 | If ARG is the atom `-', scroll upward by nearly full screen. |
| @@ -4875,10 +4883,11 @@ When calling from a program, supply as argument a number, nil, or `-'. */) | |||
| 4875 | 4883 | ||
| 4876 | DEFUN ("other-window-for-scrolling", Fother_window_for_scrolling, Sother_window_for_scrolling, 0, 0, 0, | 4884 | DEFUN ("other-window-for-scrolling", Fother_window_for_scrolling, Sother_window_for_scrolling, 0, 0, 0, |
| 4877 | doc: /* Return the other window for \"other window scroll\" commands. | 4885 | doc: /* Return the other window for \"other window scroll\" commands. |
| 4878 | If in the minibuffer, `minibuffer-scroll-window' if non-nil | ||
| 4879 | specifies the window. | ||
| 4880 | If `other-window-scroll-buffer' is non-nil, a window | 4886 | If `other-window-scroll-buffer' is non-nil, a window |
| 4881 | showing that buffer is used. */) | 4887 | showing that buffer is used. |
| 4888 | If in the minibuffer, `minibuffer-scroll-window' if non-nil | ||
| 4889 | specifies the window. This takes precedence over | ||
| 4890 | `other-window-scroll-buffer'. */) | ||
| 4882 | () | 4891 | () |
| 4883 | { | 4892 | { |
| 4884 | Lisp_Object window; | 4893 | Lisp_Object window; |
| @@ -4924,10 +4933,11 @@ if the current one is at the bottom. Negative ARG means scroll downward. | |||
| 4924 | If ARG is the atom `-', scroll downward by nearly full screen. | 4933 | If ARG is the atom `-', scroll downward by nearly full screen. |
| 4925 | When calling from a program, supply as argument a number, nil, or `-'. | 4934 | When calling from a program, supply as argument a number, nil, or `-'. |
| 4926 | 4935 | ||
| 4927 | If in the minibuffer, `minibuffer-scroll-window' if non-nil | ||
| 4928 | specifies the window to scroll. | ||
| 4929 | If `other-window-scroll-buffer' is non-nil, scroll the window | 4936 | If `other-window-scroll-buffer' is non-nil, scroll the window |
| 4930 | showing that buffer, popping the buffer up if necessary. */) | 4937 | showing that buffer, popping the buffer up if necessary. |
| 4938 | If in the minibuffer, `minibuffer-scroll-window' if non-nil | ||
| 4939 | specifies the window to scroll. This takes precedence over | ||
| 4940 | `other-window-scroll-buffer'. */) | ||
| 4931 | (arg) | 4941 | (arg) |
| 4932 | Lisp_Object arg; | 4942 | Lisp_Object arg; |
| 4933 | { | 4943 | { |
| @@ -5903,7 +5913,8 @@ redirection (see `redirect-frame-focus'). */) | |||
| 5903 | 5913 | ||
| 5904 | DEFUN ("save-window-excursion", Fsave_window_excursion, Ssave_window_excursion, | 5914 | DEFUN ("save-window-excursion", Fsave_window_excursion, Ssave_window_excursion, |
| 5905 | 0, UNEVALLED, 0, | 5915 | 0, UNEVALLED, 0, |
| 5906 | doc: /* Execute body, preserving window sizes and contents. | 5916 | doc: /* Execute BODY, preserving window sizes and contents. |
| 5917 | Return the value of the last form in BODY. | ||
| 5907 | Restore which buffer appears in which window, where display starts, | 5918 | Restore which buffer appears in which window, where display starts, |
| 5908 | and the value of point and mark for each window. | 5919 | and the value of point and mark for each window. |
| 5909 | Also restore the choice of selected window. | 5920 | Also restore the choice of selected window. |
| @@ -6163,7 +6174,11 @@ DEFUN ("set-window-vscroll", Fset_window_vscroll, Sset_window_vscroll, | |||
| 6163 | doc: /* Set amount by which WINDOW should be scrolled vertically to VSCROLL. | 6174 | doc: /* Set amount by which WINDOW should be scrolled vertically to VSCROLL. |
| 6164 | WINDOW nil means use the selected window. Normally, VSCROLL is a | 6175 | WINDOW nil means use the selected window. Normally, VSCROLL is a |
| 6165 | non-negative multiple of the canonical character height of WINDOW; | 6176 | non-negative multiple of the canonical character height of WINDOW; |
| 6166 | optional third arg PIXELS_P non-nil means that VSCROLL is in pixels. */) | 6177 | optional third arg PIXELS_P non-nil means that VSCROLL is in pixels. |
| 6178 | If PIXELS-P is nil, VSCROLL may have to be rounded so that it | ||
| 6179 | corresponds to an integral number of pixels. The return value is the | ||
| 6180 | result of this rounding. | ||
| 6181 | If PIXELS-P is non-nil, the return value is VSCROLL. */) | ||
| 6167 | (window, vscroll, pixels_p) | 6182 | (window, vscroll, pixels_p) |
| 6168 | Lisp_Object window, vscroll, pixels_p; | 6183 | Lisp_Object window, vscroll, pixels_p; |
| 6169 | { | 6184 | { |
| @@ -6647,9 +6662,11 @@ The selected frame is the one whose configuration has changed. */); | |||
| 6647 | 6662 | ||
| 6648 | DEFVAR_BOOL ("window-size-fixed", &window_size_fixed, | 6663 | DEFVAR_BOOL ("window-size-fixed", &window_size_fixed, |
| 6649 | doc: /* Non-nil in a buffer means windows displaying the buffer are fixed-size. | 6664 | doc: /* Non-nil in a buffer means windows displaying the buffer are fixed-size. |
| 6665 | If the value is`height', then only the window's height is fixed. | ||
| 6666 | If the value is `width', then only the window's width is fixed. | ||
| 6667 | Any other non-nil value fixes both the width and the height. | ||
| 6650 | Emacs won't change the size of any window displaying that buffer, | 6668 | Emacs won't change the size of any window displaying that buffer, |
| 6651 | unless you explicitly change the size, or Emacs has no other choice. | 6669 | unless you explicitly change the size, or Emacs has no other choice. */); |
| 6652 | This variable automatically becomes buffer-local when set. */); | ||
| 6653 | Fmake_variable_buffer_local (Qwindow_size_fixed); | 6670 | Fmake_variable_buffer_local (Qwindow_size_fixed); |
| 6654 | window_size_fixed = 0; | 6671 | window_size_fixed = 0; |
| 6655 | 6672 | ||