aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2003-09-20 23:26:20 +0000
committerKim F. Storm2003-09-20 23:26:20 +0000
commita6e20602cb25502a57c49d303b4dd181b17ebca2 (patch)
tree361838f2b8cc06cfa553cccbfdf7a2805033e222 /src
parent0c4da02395bd837c196f0abf054969722e4900e6 (diff)
downloademacs-a6e20602cb25502a57c49d303b4dd181b17ebca2.tar.gz
emacs-a6e20602cb25502a57c49d303b4dd181b17ebca2.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/frame.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/frame.c b/src/frame.c
index abba478037f..12ae8cef479 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -114,6 +114,7 @@ Lisp_Object Qface_set_after_frame_default;
114 114
115Lisp_Object Vterminal_frame; 115Lisp_Object Vterminal_frame;
116Lisp_Object Vdefault_frame_alist; 116Lisp_Object Vdefault_frame_alist;
117Lisp_Object Vdefault_frame_scroll_bars;
117Lisp_Object Vmouse_position_function; 118Lisp_Object Vmouse_position_function;
118Lisp_Object Vmouse_highlight; 119Lisp_Object Vmouse_highlight;
119Lisp_Object Vdelete_frame_functions; 120Lisp_Object Vdelete_frame_functions;
@@ -3217,13 +3218,11 @@ x_set_vertical_scroll_bars (f, arg, oldval)
3217 ? vertical_scroll_bar_left 3218 ? vertical_scroll_bar_left
3218 : EQ (Qright, arg) 3219 : EQ (Qright, arg)
3219 ? vertical_scroll_bar_right 3220 ? vertical_scroll_bar_right
3220#ifdef HAVE_NTGUI 3221 : EQ (Qleft, Vdefault_frame_scroll_bars)
3221 /* MS-Windows has scroll bars on the right by default. */ 3222 ? vertical_scroll_bar_left
3222 : vertical_scroll_bar_right 3223 : EQ (Qright, Vdefault_frame_scroll_bars)
3223#else 3224 ? vertical_scroll_bar_right
3224 : vertical_scroll_bar_left 3225 : vertical_scroll_bar_none);
3225#endif
3226 );
3227 3226
3228 /* We set this parameter before creating the X window for the 3227 /* We set this parameter before creating the X window for the
3229 frame, so we can get the geometry right from the start. 3228 frame, so we can get the geometry right from the start.
@@ -4032,6 +4031,19 @@ The `menu-bar-lines' element of the list controls whether new frames
4032Setting this variable does not affect existing frames, only new ones. */); 4031Setting this variable does not affect existing frames, only new ones. */);
4033 Vdefault_frame_alist = Qnil; 4032 Vdefault_frame_alist = Qnil;
4034 4033
4034 DEFVAR_LISP ("default-frame-scroll-bars", &Vdefault_frame_scroll_bars,
4035 doc: /* Default position of scroll bars on this window-system. */);
4036#ifdef HAVE_WINDOW_SYSTEM
4037#if defined(HAVE_NTGUI) || defined(HAVE_CARBON)
4038 /* MS-Windows has scroll bars on the right by default. */
4039 Vdefault_frame_scroll_bars = Qright;
4040#else
4041 Vdefault_frame_scroll_bars = Qleft;
4042#endif
4043#else
4044 Vdefault_frame_scroll_bars = Qnil;
4045#endif
4046
4035 Qinhibit_default_face_x_resources 4047 Qinhibit_default_face_x_resources
4036 = intern ("inhibit-default-face-x-resources"); 4048 = intern ("inhibit-default-face-x-resources");
4037 staticpro (&Qinhibit_default_face_x_resources); 4049 staticpro (&Qinhibit_default_face_x_resources);