# HG changeset patch # User Kim F. Storm # Date 1064100380 0 # Node ID 4a93216e6678cafb388a296889d93d0a8a0b211b # Parent ce06c92d0b1e4740ee4bf04e322fb1699f109bf8 (Vdefault_frame_scroll_bars): New variable. (x_set_vertical_scroll_bars): Use it instead of hardcoded values. (syms_of_frame): DEFVAR_LISP it, and initialize according to window-system default scroll bar position. diff -r ce06c92d0b1e -r 4a93216e6678 src/frame.c --- a/src/frame.c Sat Sep 20 23:25:46 2003 +0000 +++ b/src/frame.c Sat Sep 20 23:26:20 2003 +0000 @@ -114,6 +114,7 @@ Lisp_Object Vterminal_frame; Lisp_Object Vdefault_frame_alist; +Lisp_Object Vdefault_frame_scroll_bars; Lisp_Object Vmouse_position_function; Lisp_Object Vmouse_highlight; Lisp_Object Vdelete_frame_functions; @@ -3217,13 +3218,11 @@ ? vertical_scroll_bar_left : EQ (Qright, arg) ? vertical_scroll_bar_right -#ifdef HAVE_NTGUI - /* MS-Windows has scroll bars on the right by default. */ - : vertical_scroll_bar_right -#else - : vertical_scroll_bar_left -#endif - ); + : EQ (Qleft, Vdefault_frame_scroll_bars) + ? vertical_scroll_bar_left + : EQ (Qright, Vdefault_frame_scroll_bars) + ? vertical_scroll_bar_right + : vertical_scroll_bar_none); /* We set this parameter before creating the X window for the frame, so we can get the geometry right from the start. @@ -4032,6 +4031,19 @@ Setting this variable does not affect existing frames, only new ones. */); Vdefault_frame_alist = Qnil; + 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(HAVE_CARBON) + /* MS-Windows has 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 + Qinhibit_default_face_x_resources = intern ("inhibit-default-face-x-resources"); staticpro (&Qinhibit_default_face_x_resources);