From 303500aa06fb042fb63a02858bf15bad2fc192f7 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 15 Mar 2010 13:16:46 -0400 Subject: [PATCH] Put non-GTK X scroll-bars on left. * xfns.c (Fx_create_frame): * frame.c (Vdefault_frame_scroll_bars): Put non-GTK X scroll-bars on left. --- etc/NEWS | 2 +- src/ChangeLog | 6 ++++++ src/frame.c | 6 ++++++ src/xfns.c | 7 ++++++- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index d8061589fb9..ee4ec1370cb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -30,7 +30,7 @@ so we will look at it and add it to the manual. * Changes in Emacs 24.1 -** The scroll-bar is now on the right on GNU/Linux and UNIX-like systems. +** GTK scroll-bars are now placed on the right by default. Use `set-scroll-bar-mode' to change this. diff --git a/src/ChangeLog b/src/ChangeLog index da4e336b0ae..e62f3cb8bc3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2010-03-15 Chong Yidong + + * xfns.c (Fx_create_frame): + * frame.c (Vdefault_frame_scroll_bars): Put non-GTK X scroll-bars + on left. + 2010-03-13 Andreas Politz (tiny change) * editfns.c (Fformat): Account for string precision when computing diff --git a/src/frame.c b/src/frame.c index c779f1c5b65..40930af594c 100644 --- a/src/frame.c +++ b/src/frame.c @@ -4584,7 +4584,13 @@ Setting this variable does not affect existing frames, only new ones. */); DEFVAR_LISP ("default-frame-scroll-bars", &Vdefault_frame_scroll_bars, doc: /* Default position of scroll bars on this window-system. */); #ifdef HAVE_WINDOW_SYSTEM +#if defined(HAVE_NTGUI) || defined(NS_IMPL_COCOA) || (defined(USE_GTK) && defined(USE_TOOLKIT_SCROLL_BARS)) + /* MS-Windows, Mac OS X, and GTK have scroll bars on the right by + default. */ Vdefault_frame_scroll_bars = Qright; +#else + Vdefault_frame_scroll_bars = Qleft; +#endif #else Vdefault_frame_scroll_bars = Qnil; #endif diff --git a/src/xfns.c b/src/xfns.c index 84d0d622200..45bea1e4ec2 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -3376,7 +3376,12 @@ This function is an internal primitive--use `make-frame' instead. */) #endif "internalBorderWidth", "internalBorderWidth", RES_TYPE_NUMBER); - x_default_parameter (f, parms, Qvertical_scroll_bars, Qright, + x_default_parameter (f, parms, Qvertical_scroll_bars, +#if defined(USE_GTK) && defined(USE_TOOLKIT_SCROLL_BARS) + Qright, +#else + Qleft, +#endif "verticalScrollBars", "ScrollBars", RES_TYPE_SYMBOL); -- 2.39.5