aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorJim Blandy1992-02-12 03:35:14 +0000
committerJim Blandy1992-02-12 03:35:14 +0000
commit95605e15f15ec2a56dec7438b5f6121d94da6965 (patch)
treefc7c6449c6c49ca1c4ea5f5d20b75ac776575418 /src/window.c
parenta764a7537b6af4a7248c88de5e8356be7631c1be (diff)
downloademacs-95605e15f15ec2a56dec7438b5f6121d94da6965.tar.gz
emacs-95605e15f15ec2a56dec7438b5f6121d94da6965.zip
*** empty log message ***
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/window.c b/src/window.c
index 43a4a95b744..f81e7481c03 100644
--- a/src/window.c
+++ b/src/window.c
@@ -425,26 +425,24 @@ window_from_coordinates (screen, x, y, part)
425} 425}
426 426
427DEFUN ("window-at", Fwindow_at, Swindow_at, 1, 2, 0, 427DEFUN ("window-at", Fwindow_at, Swindow_at, 1, 2, 0,
428 "Return window containing position COORDINATES on SCREEN.\n\ 428 "Return window containing row ROW, column COLUMN on SCREEN.\n\
429If omitted, SCREEN defaults to the currently selected screen.\n\ 429If omitted, SCREEN defaults to the currently selected screen.\n\
430COORDINATES is a pair (SCREEN-X . SCREEN-Y) of coordinates\n\ 430The top left corner of the screen is considered to be row 0,\n\
431which are relative to 0,0 at the top left corner of the screen.") 431column 0.")
432 (coordinates, screen) 432 (row, column, screen)
433 Lisp_Object coordinates, screen; 433 Lisp_Object row, column, screen;
434{ 434{
435 int part; 435 int part;
436 436
437 if (NILP (screen)) 437 if (NILP (screen))
438 XSET (screen, Lisp_Screen, selected_screen); 438 XSET (screen, Lisp_Screen, selected_screen);
439 else 439 else
440 CHECK_LIVE_SCREEN (screen, 0); 440 CHECK_LIVE_SCREEN (screen, 2);
441 CHECK_CONS (coordinates, 1); 441 CHECK_NUMBER (row, 0);
442 CHECK_NUMBER (XCONS (coordinates)->car, 1); 442 CHECK_NUMBER (column, 1);
443 CHECK_NUMBER (XCONS (coordinates)->cdr, 1);
444 443
445 return window_from_coordinates (XSCREEN (screen), 444 return window_from_coordinates (XSCREEN (screen),
446 XINT (Fcar (coordinates)), 445 XINT (row), XINT (column),
447 XINT (Fcdr (coordinates)),
448 &part); 446 &part);
449} 447}
450 448
@@ -2007,13 +2005,13 @@ scroll_command (n, direction)
2007 register int defalt; 2005 register int defalt;
2008 int count = specpdl_ptr - specpdl; 2006 int count = specpdl_ptr - specpdl;
2009 2007
2010 /* Code here used to set the current buffer to the selected window's 2008 /* If selected window's buffer isn't current, make it current for the moment.
2011 buffer, but since this command always operates on the selected 2009 But don't screw up if window_scroll gets an error. */
2012 window, the current buffer should always be the selected window's
2013 buffer already. Verify this assumption, so we won't be screwed
2014 if we're guessing wrong. */
2015 if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) 2010 if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer)
2016 abort (); 2011 {
2012 record_unwind_protect (save_excursion_restore, save_excursion_save ());
2013 Fset_buffer (XWINDOW (selected_window)->buffer);
2014 }
2017 2015
2018 defalt = (window_internal_height (XWINDOW (selected_window)) 2016 defalt = (window_internal_height (XWINDOW (selected_window))
2019 - next_screen_context_lines); 2017 - next_screen_context_lines);
@@ -2028,6 +2026,8 @@ scroll_command (n, direction)
2028 n = Fprefix_numeric_value (n); 2026 n = Fprefix_numeric_value (n);
2029 window_scroll (selected_window, XINT (n) * direction, 0); 2027 window_scroll (selected_window, XINT (n) * direction, 0);
2030 } 2028 }
2029
2030 unbind_to (count, Qnil);
2031} 2031}
2032 2032
2033DEFUN ("scroll-up", Fscroll_up, Sscroll_up, 0, 1, "P", 2033DEFUN ("scroll-up", Fscroll_up, Sscroll_up, 0, 1, "P",
@@ -2614,8 +2614,8 @@ init_window_once ()
2614#else /* not MULTI_SCREEN */ 2614#else /* not MULTI_SCREEN */
2615 extern Lisp_Object get_minibuffer (); 2615 extern Lisp_Object get_minibuffer ();
2616 2616
2617 root_window = make_window (0); 2617 root_window = make_window ();
2618 minibuf_window = make_window (0); 2618 minibuf_window = make_window ();
2619 2619
2620 XWINDOW (root_window)->next = minibuf_window; 2620 XWINDOW (root_window)->next = minibuf_window;
2621 XWINDOW (minibuf_window)->prev = root_window; 2621 XWINDOW (minibuf_window)->prev = root_window;