Ben Wing <ben(a)666.com> writes:
yes, please patch.
"William M. Perry" wrote:
> Now, the scrollbars in athena behave differently than
> gtk/motif/athena3d/windows in that scrollbar-page-up and
> scrollbar-page-down require passing in a cons of (WINDOW . NUMBER) where
> the others just want WINDOW.
>
> My question is why in scrollbar.c the athena-like behaviour is
> conditionalized with ifdefs instead of just checking whether NILP (XCDR
> (object))?
Here's a patch against 21.2 CVS of today. The same code can go into 21.1
trivially. This removes all the ifdef'd code about window systems in
scrollbar.c except for setting the default scrollbar sides. Maybe that
could be a device method? I'm still trying to figure out the best way to
get the nextstep scrollbars on the left by default... there is some
disgusting voodoo in the theme that I can't really emulate very well.
*sigh*
-Bill P.
Index: scrollbar.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/scrollbar.c,v
retrieving revision 1.17.2.5
diff -c -w -r1.17.2.5 scrollbar.c
*** scrollbar.c 2000/03/01 17:47:11 1.17.2.5
--- scrollbar.c 2000/05/05 17:09:48
***************
*** 735,744 ****
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);
--- 735,744 ----
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 (NILP (XCDR (object)))
window_scroll (window, Qnil, -1, ERROR_ME_NOT);
! else
{
Bufpos bufpos;
Lisp_Object value = Fcdr (object);
***************
*** 754,760 ****
Fset_window_point (window, make_int (bufpos));
Fcenter_to_window_line (Qzero, window);
}
! #endif /* Athena */
zmacs_region_stays = 1;
return Qnil;
}
--- 754,760 ----
Fset_window_point (window, make_int (bufpos));
Fcenter_to_window_line (Qzero, window);
}
!
zmacs_region_stays = 1;
return Qnil;
}
***************
*** 776,792 ****
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 */
zmacs_region_stays = 1;
return Qnil;
}
--- 776,790 ----
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 (NILP (XCDR (object)))
window_scroll (window, Qnil, 1, ERROR_ME_NOT);
{
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;
}