diff options
| author | Karoly Lorentey | 2004-07-22 22:01:29 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-07-22 22:01:29 +0000 |
| commit | 407e382d35ede779a23b974d7ac40a7d3d0fa5ff (patch) | |
| tree | 4a9e97dd58011b0ce2d6223626554765860fd6db /src/window.c | |
| parent | 31d7e9bc5a474c2da8c40f4812ea3e09cd5fb82c (diff) | |
| parent | bb6a9650da7971581f2ddf625c172b58a6806e7a (diff) | |
| download | emacs-407e382d35ede779a23b974d7ac40a7d3d0fa5ff.tar.gz emacs-407e382d35ede779a23b974d7ac40a7d3d0fa5ff.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-461
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-462
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-463
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-220
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 54 |
1 files changed, 36 insertions, 18 deletions
diff --git a/src/window.c b/src/window.c index 0e318b039a4..2ab9957153f 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -262,6 +262,7 @@ make_window () | |||
| 262 | bzero (&p->last_cursor, sizeof (p->last_cursor)); | 262 | bzero (&p->last_cursor, sizeof (p->last_cursor)); |
| 263 | bzero (&p->phys_cursor, sizeof (p->phys_cursor)); | 263 | bzero (&p->phys_cursor, sizeof (p->phys_cursor)); |
| 264 | p->desired_matrix = p->current_matrix = 0; | 264 | p->desired_matrix = p->current_matrix = 0; |
| 265 | p->nrows_scale_factor = p->ncols_scale_factor = 1; | ||
| 265 | p->phys_cursor_type = -1; | 266 | p->phys_cursor_type = -1; |
| 266 | p->phys_cursor_width = -1; | 267 | p->phys_cursor_width = -1; |
| 267 | p->must_be_updated_p = 0; | 268 | p->must_be_updated_p = 0; |
| @@ -320,15 +321,17 @@ WINDOW defaults to the selected window. */) | |||
| 320 | 321 | ||
| 321 | DEFUN ("pos-visible-in-window-p", Fpos_visible_in_window_p, | 322 | DEFUN ("pos-visible-in-window-p", Fpos_visible_in_window_p, |
| 322 | Spos_visible_in_window_p, 0, 3, 0, | 323 | Spos_visible_in_window_p, 0, 3, 0, |
| 323 | doc: /* Return t if position POS is currently on the frame in WINDOW. | 324 | doc: /* Return non-nil if position POS is currently on the frame in WINDOW. |
| 324 | Return nil if that position is scrolled vertically out of view. | 325 | Return nil if that position is scrolled vertically out of view. |
| 325 | If a character is only partially visible, nil is returned, unless the | 326 | If a character is only partially visible, nil is returned, unless the |
| 326 | optional argument PARTIALLY is non-nil. | 327 | optional argument PARTIALLY is non-nil. |
| 328 | If POS is only out of view because of horizontal scrolling, return non-nil. | ||
| 327 | POS defaults to point in WINDOW; WINDOW defaults to the selected window. | 329 | POS defaults to point in WINDOW; WINDOW defaults to the selected window. |
| 328 | 330 | ||
| 329 | If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil, | 331 | If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil, |
| 330 | return value is a list (X Y PARTIAL) where X and Y are the pixel relative | 332 | return value is a list (X Y FULLY) where X and Y are the pixel coordinates |
| 331 | coordinate */) | 333 | relative to the top left corner of the window, and FULLY is t if the |
| 334 | character after POS is fully visible and nil otherwise. */) | ||
| 332 | (pos, window, partially) | 335 | (pos, window, partially) |
| 333 | Lisp_Object pos, window, partially; | 336 | Lisp_Object pos, window, partially; |
| 334 | { | 337 | { |
| @@ -432,7 +435,7 @@ DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, | |||
| 432 | 435 | ||
| 433 | DEFUN ("set-window-hscroll", Fset_window_hscroll, Sset_window_hscroll, 2, 2, 0, | 436 | DEFUN ("set-window-hscroll", Fset_window_hscroll, Sset_window_hscroll, 2, 2, 0, |
| 434 | doc: /* Set number of columns WINDOW is scrolled from left margin to NCOL. | 437 | doc: /* Set number of columns WINDOW is scrolled from left margin to NCOL. |
| 435 | NCOL should be zero or positive. | 438 | Return NCOL. NCOL should be zero or positive. |
| 436 | 439 | ||
| 437 | Note that if `automatic-hscrolling' is non-nil, you cannot scroll the | 440 | Note that if `automatic-hscrolling' is non-nil, you cannot scroll the |
| 438 | window so that the location of point becomes invisible. */) | 441 | window so that the location of point becomes invisible. */) |
| @@ -546,7 +549,7 @@ display margins, fringes, header line, and/or mode line. */) | |||
| 546 | } | 549 | } |
| 547 | 550 | ||
| 548 | DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, | 551 | DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, |
| 549 | doc: /* Return a list of the edge coordinates of WINDOW. | 552 | doc: /* Return a list of the edge pixel coordinates of WINDOW. |
| 550 | \(LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at top left corner of frame. | 553 | \(LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at top left corner of frame. |
| 551 | RIGHT is one more than the rightmost x position used by text in WINDOW, | 554 | RIGHT is one more than the rightmost x position used by text in WINDOW, |
| 552 | and BOTTOM is one more than the bottommost y position used by text in WINDOW. | 555 | and BOTTOM is one more than the bottommost y position used by text in WINDOW. |
| @@ -988,6 +991,8 @@ DEFUN ("window-end", Fwindow_end, Swindow_end, 0, 2, 0, | |||
| 988 | This is updated by redisplay, when it runs to completion. | 991 | This is updated by redisplay, when it runs to completion. |
| 989 | Simply changing the buffer text or setting `window-start' | 992 | Simply changing the buffer text or setting `window-start' |
| 990 | does not update this value. | 993 | does not update this value. |
| 994 | Return nil if there is no recorded value. \(This can happen if the | ||
| 995 | last redisplay of WINDOW was preempted, and did not finish.) | ||
| 991 | If UPDATE is non-nil, compute the up-to-date position | 996 | If UPDATE is non-nil, compute the up-to-date position |
| 992 | if it isn't already recorded. */) | 997 | if it isn't already recorded. */) |
| 993 | (window, update) | 998 | (window, update) |
| @@ -1053,7 +1058,8 @@ if it isn't already recorded. */) | |||
| 1053 | } | 1058 | } |
| 1054 | 1059 | ||
| 1055 | DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0, | 1060 | DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0, |
| 1056 | doc: /* Make point value in WINDOW be at position POS in WINDOW's buffer. */) | 1061 | doc: /* Make point value in WINDOW be at position POS in WINDOW's buffer. |
| 1062 | Return POS. */) | ||
| 1057 | (window, pos) | 1063 | (window, pos) |
| 1058 | Lisp_Object window, pos; | 1064 | Lisp_Object window, pos; |
| 1059 | { | 1065 | { |
| @@ -1076,6 +1082,7 @@ DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0, | |||
| 1076 | 1082 | ||
| 1077 | DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0, | 1083 | DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0, |
| 1078 | doc: /* Make display in WINDOW start at position POS in WINDOW's buffer. | 1084 | doc: /* Make display in WINDOW start at position POS in WINDOW's buffer. |
| 1085 | Return POS. | ||
| 1079 | Optional third arg NOFORCE non-nil inhibits next redisplay | 1086 | Optional third arg NOFORCE non-nil inhibits next redisplay |
| 1080 | from overriding motion of point in order to display at this exact start. */) | 1087 | from overriding motion of point in order to display at this exact start. */) |
| 1081 | (window, pos, noforce) | 1088 | (window, pos, noforce) |
| @@ -4850,7 +4857,8 @@ scroll_command (n, direction) | |||
| 4850 | } | 4857 | } |
| 4851 | 4858 | ||
| 4852 | DEFUN ("scroll-up", Fscroll_up, Sscroll_up, 0, 1, "P", | 4859 | DEFUN ("scroll-up", Fscroll_up, Sscroll_up, 0, 1, "P", |
| 4853 | doc: /* Scroll text of current window upward ARG lines; or near full screen if no ARG. | 4860 | doc: /* Scroll text of current window upward ARG lines. |
| 4861 | If ARG is omitted or nil, scroll upward by a near full screen. | ||
| 4854 | A near full screen is `next-screen-context-lines' less than a full screen. | 4862 | A near full screen is `next-screen-context-lines' less than a full screen. |
| 4855 | Negative ARG means scroll downward. | 4863 | Negative ARG means scroll downward. |
| 4856 | If ARG is the atom `-', scroll downward by nearly full screen. | 4864 | If ARG is the atom `-', scroll downward by nearly full screen. |
| @@ -4863,7 +4871,8 @@ When calling from a program, supply as argument a number, nil, or `-'. */) | |||
| 4863 | } | 4871 | } |
| 4864 | 4872 | ||
| 4865 | DEFUN ("scroll-down", Fscroll_down, Sscroll_down, 0, 1, "P", | 4873 | DEFUN ("scroll-down", Fscroll_down, Sscroll_down, 0, 1, "P", |
| 4866 | doc: /* Scroll text of current window down ARG lines; or near full screen if no ARG. | 4874 | doc: /* Scroll text of current window down ARG lines. |
| 4875 | If ARG is omitted or nil, scroll down by a near full screen. | ||
| 4867 | A near full screen is `next-screen-context-lines' less than a full screen. | 4876 | A near full screen is `next-screen-context-lines' less than a full screen. |
| 4868 | Negative ARG means scroll upward. | 4877 | Negative ARG means scroll upward. |
| 4869 | If ARG is the atom `-', scroll upward by nearly full screen. | 4878 | If ARG is the atom `-', scroll upward by nearly full screen. |
| @@ -4877,10 +4886,11 @@ When calling from a program, supply as argument a number, nil, or `-'. */) | |||
| 4877 | 4886 | ||
| 4878 | DEFUN ("other-window-for-scrolling", Fother_window_for_scrolling, Sother_window_for_scrolling, 0, 0, 0, | 4887 | DEFUN ("other-window-for-scrolling", Fother_window_for_scrolling, Sother_window_for_scrolling, 0, 0, 0, |
| 4879 | doc: /* Return the other window for \"other window scroll\" commands. | 4888 | doc: /* Return the other window for \"other window scroll\" commands. |
| 4880 | If in the minibuffer, `minibuffer-scroll-window' if non-nil | ||
| 4881 | specifies the window. | ||
| 4882 | If `other-window-scroll-buffer' is non-nil, a window | 4889 | If `other-window-scroll-buffer' is non-nil, a window |
| 4883 | showing that buffer is used. */) | 4890 | showing that buffer is used. |
| 4891 | If in the minibuffer, `minibuffer-scroll-window' if non-nil | ||
| 4892 | specifies the window. This takes precedence over | ||
| 4893 | `other-window-scroll-buffer'. */) | ||
| 4884 | () | 4894 | () |
| 4885 | { | 4895 | { |
| 4886 | Lisp_Object window; | 4896 | Lisp_Object window; |
| @@ -4926,10 +4936,11 @@ if the current one is at the bottom. Negative ARG means scroll downward. | |||
| 4926 | If ARG is the atom `-', scroll downward by nearly full screen. | 4936 | If ARG is the atom `-', scroll downward by nearly full screen. |
| 4927 | When calling from a program, supply as argument a number, nil, or `-'. | 4937 | When calling from a program, supply as argument a number, nil, or `-'. |
| 4928 | 4938 | ||
| 4929 | If in the minibuffer, `minibuffer-scroll-window' if non-nil | ||
| 4930 | specifies the window to scroll. | ||
| 4931 | If `other-window-scroll-buffer' is non-nil, scroll the window | 4939 | If `other-window-scroll-buffer' is non-nil, scroll the window |
| 4932 | showing that buffer, popping the buffer up if necessary. */) | 4940 | showing that buffer, popping the buffer up if necessary. |
| 4941 | If in the minibuffer, `minibuffer-scroll-window' if non-nil | ||
| 4942 | specifies the window to scroll. This takes precedence over | ||
| 4943 | `other-window-scroll-buffer'. */) | ||
| 4933 | (arg) | 4944 | (arg) |
| 4934 | Lisp_Object arg; | 4945 | Lisp_Object arg; |
| 4935 | { | 4946 | { |
| @@ -5905,7 +5916,8 @@ redirection (see `redirect-frame-focus'). */) | |||
| 5905 | 5916 | ||
| 5906 | DEFUN ("save-window-excursion", Fsave_window_excursion, Ssave_window_excursion, | 5917 | DEFUN ("save-window-excursion", Fsave_window_excursion, Ssave_window_excursion, |
| 5907 | 0, UNEVALLED, 0, | 5918 | 0, UNEVALLED, 0, |
| 5908 | doc: /* Execute body, preserving window sizes and contents. | 5919 | doc: /* Execute BODY, preserving window sizes and contents. |
| 5920 | Return the value of the last form in BODY. | ||
| 5909 | Restore which buffer appears in which window, where display starts, | 5921 | Restore which buffer appears in which window, where display starts, |
| 5910 | and the value of point and mark for each window. | 5922 | and the value of point and mark for each window. |
| 5911 | Also restore the choice of selected window. | 5923 | Also restore the choice of selected window. |
| @@ -6165,7 +6177,11 @@ DEFUN ("set-window-vscroll", Fset_window_vscroll, Sset_window_vscroll, | |||
| 6165 | doc: /* Set amount by which WINDOW should be scrolled vertically to VSCROLL. | 6177 | doc: /* Set amount by which WINDOW should be scrolled vertically to VSCROLL. |
| 6166 | WINDOW nil means use the selected window. Normally, VSCROLL is a | 6178 | WINDOW nil means use the selected window. Normally, VSCROLL is a |
| 6167 | non-negative multiple of the canonical character height of WINDOW; | 6179 | non-negative multiple of the canonical character height of WINDOW; |
| 6168 | optional third arg PIXELS_P non-nil means that VSCROLL is in pixels. */) | 6180 | optional third arg PIXELS_P non-nil means that VSCROLL is in pixels. |
| 6181 | If PIXELS-P is nil, VSCROLL may have to be rounded so that it | ||
| 6182 | corresponds to an integral number of pixels. The return value is the | ||
| 6183 | result of this rounding. | ||
| 6184 | If PIXELS-P is non-nil, the return value is VSCROLL. */) | ||
| 6169 | (window, vscroll, pixels_p) | 6185 | (window, vscroll, pixels_p) |
| 6170 | Lisp_Object window, vscroll, pixels_p; | 6186 | Lisp_Object window, vscroll, pixels_p; |
| 6171 | { | 6187 | { |
| @@ -6649,9 +6665,11 @@ The selected frame is the one whose configuration has changed. */); | |||
| 6649 | 6665 | ||
| 6650 | DEFVAR_BOOL ("window-size-fixed", &window_size_fixed, | 6666 | DEFVAR_BOOL ("window-size-fixed", &window_size_fixed, |
| 6651 | doc: /* Non-nil in a buffer means windows displaying the buffer are fixed-size. | 6667 | doc: /* Non-nil in a buffer means windows displaying the buffer are fixed-size. |
| 6668 | If the value is`height', then only the window's height is fixed. | ||
| 6669 | If the value is `width', then only the window's width is fixed. | ||
| 6670 | Any other non-nil value fixes both the width and the height. | ||
| 6652 | Emacs won't change the size of any window displaying that buffer, | 6671 | Emacs won't change the size of any window displaying that buffer, |
| 6653 | unless you explicitly change the size, or Emacs has no other choice. | 6672 | unless you explicitly change the size, or Emacs has no other choice. */); |
| 6654 | This variable automatically becomes buffer-local when set. */); | ||
| 6655 | Fmake_variable_buffer_local (Qwindow_size_fixed); | 6673 | Fmake_variable_buffer_local (Qwindow_size_fixed); |
| 6656 | window_size_fixed = 0; | 6674 | window_size_fixed = 0; |
| 6657 | 6675 | ||