X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fscrollbar.c;h=ffa3c12a0e8ebb5df71bb4384f6fff2cf7f1899c;hb=975655e6b5b1526ee82b159b3eadf69888c42090;hp=18360c029ddf9de92c3e43f7f9d3d06ab9968cae;hpb=2fd9701a4f902054649dde9143a3f77809afee8f;p=chise%2Fxemacs-chise.git- diff --git a/src/scrollbar.c b/src/scrollbar.c index 18360c0..ffa3c12 100644 --- a/src/scrollbar.c +++ b/src/scrollbar.c @@ -735,26 +735,26 @@ behavior. with their standard behaviors. It is not possible to hide the differences down in lwlib because knowledge of XEmacs buffer and cursor motion routines is necessary. */ -#if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) || \ - defined (LWLIB_SCROLLBARS_ATHENA3D) || defined(HAVE_MS_WINDOWS) - window_scroll (window, Qnil, -1, ERROR_ME_NOT); -#else /* Athena */ - { - Bufpos bufpos; - Lisp_Object value = Fcdr (object); - CHECK_INT (value); - Fmove_to_window_line (Qzero, window); - /* can't use Fvertical_motion() because it moves the buffer point - rather than the window's point. - - #### It does? Why does it take a window argument then? */ - bufpos = vmotion (XWINDOW (window), XINT (Fwindow_point (window)), - XINT (value), 0); - Fset_window_point (window, make_int (bufpos)); - Fcenter_to_window_line (Qzero, window); - } -#endif /* Athena */ + if (NILP (XCDR (object))) + window_scroll (window, Qnil, -1, ERROR_ME_NOT); + else + { + Bufpos bufpos; + Lisp_Object value = Fcdr (object); + + CHECK_INT (value); + Fmove_to_window_line (Qzero, window); + /* can't use Fvertical_motion() because it moves the buffer point + rather than the window's point. + + #### It does? Why does it take a window argument then? */ + bufpos = vmotion (XWINDOW (window), XINT (Fwindow_point (window)), + XINT (value), 0); + Fset_window_point (window, make_int (bufpos)); + Fcenter_to_window_line (Qzero, window); + } + zmacs_region_stays = 1; return Qnil; } @@ -776,17 +776,17 @@ behavior. with their standard behaviors. It is not possible to hide the differences down in lwlib because knowledge of XEmacs buffer and cursor motion routines is necessary. */ -#if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) || \ - defined (LWLIB_SCROLLBARS_ATHENA3D) || defined (HAVE_MS_WINDOWS) - window_scroll (window, Qnil, 1, ERROR_ME_NOT); -#else /* Athena */ - { - Lisp_Object value = Fcdr (object); - CHECK_INT (value); - Fmove_to_window_line (value, window); - Fcenter_to_window_line (Qzero, window); - } -#endif /* Athena */ + + if (NILP (XCDR (object))) + window_scroll (window, Qnil, 1, ERROR_ME_NOT); + else + { + Lisp_Object value = Fcdr (object); + CHECK_INT (value); + Fmove_to_window_line (value, window); + Fcenter_to_window_line (Qzero, window); + } + zmacs_region_stays = 1; return Qnil; }