aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorKaroly Lorentey2004-07-22 22:01:29 +0000
committerKaroly Lorentey2004-07-22 22:01:29 +0000
commit407e382d35ede779a23b974d7ac40a7d3d0fa5ff (patch)
tree4a9e97dd58011b0ce2d6223626554765860fd6db /src/window.c
parent31d7e9bc5a474c2da8c40f4812ea3e09cd5fb82c (diff)
parentbb6a9650da7971581f2ddf625c172b58a6806e7a (diff)
downloademacs-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.c54
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
321DEFUN ("pos-visible-in-window-p", Fpos_visible_in_window_p, 322DEFUN ("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.
324Return nil if that position is scrolled vertically out of view. 325Return nil if that position is scrolled vertically out of view.
325If a character is only partially visible, nil is returned, unless the 326If a character is only partially visible, nil is returned, unless the
326optional argument PARTIALLY is non-nil. 327optional argument PARTIALLY is non-nil.
328If POS is only out of view because of horizontal scrolling, return non-nil.
327POS defaults to point in WINDOW; WINDOW defaults to the selected window. 329POS defaults to point in WINDOW; WINDOW defaults to the selected window.
328 330
329If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil, 331If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil,
330return value is a list (X Y PARTIAL) where X and Y are the pixel relative 332return value is a list (X Y FULLY) where X and Y are the pixel coordinates
331coordinate */) 333relative to the top left corner of the window, and FULLY is t if the
334character 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
433DEFUN ("set-window-hscroll", Fset_window_hscroll, Sset_window_hscroll, 2, 2, 0, 436DEFUN ("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.
435NCOL should be zero or positive. 438Return NCOL. NCOL should be zero or positive.
436 439
437Note that if `automatic-hscrolling' is non-nil, you cannot scroll the 440Note that if `automatic-hscrolling' is non-nil, you cannot scroll the
438window so that the location of point becomes invisible. */) 441window 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
548DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, 551DEFUN ("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.
551RIGHT is one more than the rightmost x position used by text in WINDOW, 554RIGHT is one more than the rightmost x position used by text in WINDOW,
552and BOTTOM is one more than the bottommost y position used by text in WINDOW. 555and 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,
988This is updated by redisplay, when it runs to completion. 991This is updated by redisplay, when it runs to completion.
989Simply changing the buffer text or setting `window-start' 992Simply changing the buffer text or setting `window-start'
990does not update this value. 993does not update this value.
994Return nil if there is no recorded value. \(This can happen if the
995last redisplay of WINDOW was preempted, and did not finish.)
991If UPDATE is non-nil, compute the up-to-date position 996If UPDATE is non-nil, compute the up-to-date position
992if it isn't already recorded. */) 997if 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
1055DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0, 1060DEFUN ("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.
1062Return 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
1077DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0, 1083DEFUN ("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.
1085Return POS.
1079Optional third arg NOFORCE non-nil inhibits next redisplay 1086Optional third arg NOFORCE non-nil inhibits next redisplay
1080from overriding motion of point in order to display at this exact start. */) 1087from 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
4852DEFUN ("scroll-up", Fscroll_up, Sscroll_up, 0, 1, "P", 4859DEFUN ("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.
4861If ARG is omitted or nil, scroll upward by a near full screen.
4854A near full screen is `next-screen-context-lines' less than a full screen. 4862A near full screen is `next-screen-context-lines' less than a full screen.
4855Negative ARG means scroll downward. 4863Negative ARG means scroll downward.
4856If ARG is the atom `-', scroll downward by nearly full screen. 4864If 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
4865DEFUN ("scroll-down", Fscroll_down, Sscroll_down, 0, 1, "P", 4873DEFUN ("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.
4875If ARG is omitted or nil, scroll down by a near full screen.
4867A near full screen is `next-screen-context-lines' less than a full screen. 4876A near full screen is `next-screen-context-lines' less than a full screen.
4868Negative ARG means scroll upward. 4877Negative ARG means scroll upward.
4869If ARG is the atom `-', scroll upward by nearly full screen. 4878If 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
4878DEFUN ("other-window-for-scrolling", Fother_window_for_scrolling, Sother_window_for_scrolling, 0, 0, 0, 4887DEFUN ("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.
4880If in the minibuffer, `minibuffer-scroll-window' if non-nil
4881specifies the window.
4882If `other-window-scroll-buffer' is non-nil, a window 4889If `other-window-scroll-buffer' is non-nil, a window
4883showing that buffer is used. */) 4890showing that buffer is used.
4891If in the minibuffer, `minibuffer-scroll-window' if non-nil
4892specifies 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.
4926If ARG is the atom `-', scroll downward by nearly full screen. 4936If ARG is the atom `-', scroll downward by nearly full screen.
4927When calling from a program, supply as argument a number, nil, or `-'. 4937When calling from a program, supply as argument a number, nil, or `-'.
4928 4938
4929If in the minibuffer, `minibuffer-scroll-window' if non-nil
4930specifies the window to scroll.
4931If `other-window-scroll-buffer' is non-nil, scroll the window 4939If `other-window-scroll-buffer' is non-nil, scroll the window
4932showing that buffer, popping the buffer up if necessary. */) 4940showing that buffer, popping the buffer up if necessary.
4941If in the minibuffer, `minibuffer-scroll-window' if non-nil
4942specifies 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
5906DEFUN ("save-window-excursion", Fsave_window_excursion, Ssave_window_excursion, 5917DEFUN ("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.
5920Return the value of the last form in BODY.
5909Restore which buffer appears in which window, where display starts, 5921Restore which buffer appears in which window, where display starts,
5910and the value of point and mark for each window. 5922and the value of point and mark for each window.
5911Also restore the choice of selected window. 5923Also 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.
6166WINDOW nil means use the selected window. Normally, VSCROLL is a 6178WINDOW nil means use the selected window. Normally, VSCROLL is a
6167non-negative multiple of the canonical character height of WINDOW; 6179non-negative multiple of the canonical character height of WINDOW;
6168optional third arg PIXELS_P non-nil means that VSCROLL is in pixels. */) 6180optional third arg PIXELS_P non-nil means that VSCROLL is in pixels.
6181If PIXELS-P is nil, VSCROLL may have to be rounded so that it
6182corresponds to an integral number of pixels. The return value is the
6183result of this rounding.
6184If 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.
6668If the value is`height', then only the window's height is fixed.
6669If the value is `width', then only the window's width is fixed.
6670Any other non-nil value fixes both the width and the height.
6652Emacs won't change the size of any window displaying that buffer, 6671Emacs won't change the size of any window displaying that buffer,
6653unless you explicitly change the size, or Emacs has no other choice. 6672unless you explicitly change the size, or Emacs has no other choice. */);
6654This 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