diff options
author | Masatake YAMATO <jet@gyve.org> | 2003-09-22 12:55:25 +0000 |
---|---|---|
committer | Masatake YAMATO <jet@gyve.org> | 2003-09-22 12:55:25 +0000 |
commit | 2f71b5eae86e4f82e77918c6d5dcebb07ccf1496 (patch) | |
tree | d58776a64bb940ab7ef10e3e56bc6a184f086622 | |
parent | b8313039df4446d849b658fcf5306fe6d8d0103a (diff) | |
download | emacs-2f71b5eae86e4f82e77918c6d5dcebb07ccf1496.tar.gz |
(Fset_window_scroll_bars): Validate the value of `vertical_type'.
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/window.c | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 927c9941cc0..e31e9fccc58 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-09-22 Masatake YAMATO <jet@gyve.org> + + * window.c (Fset_window_scroll_bars): Validate the value of + `vertical_type'. + 2003-09-21 Kim F. Storm <storm@cua.dk> * frame.c (Vdefault_frame_scroll_bars): New variable. diff --git a/src/window.c b/src/window.c index ed796fb48cc..b61db3ffbb0 100644 --- a/src/window.c +++ b/src/window.c @@ -5861,7 +5861,8 @@ Second parameter WIDTH specifies the pixel width for the scroll bar; this is automatically adjusted to a multiple of the frame column width. Third parameter VERTICAL-TYPE specifies the type of the vertical scroll bar: left, right, or nil. -A width of nil and type of t means to use the frame's corresponding value. */) +If WIDTH is nil, use the frame's scroll-bar width. +If TYPE is t, use the frame's scroll-bar type. */) (window, width, vertical_type, horizontal_type) Lisp_Object window, width, vertical_type, horizontal_type; { @@ -5873,6 +5874,12 @@ A width of nil and type of t means to use the frame's corresponding value. */) if (XINT (width) == 0) vertical_type = Qnil; + if (!(EQ (vertical_type, Qnil) + || EQ (vertical_type, Qleft) + || EQ (vertical_type, Qright) + || EQ (vertical_type, Qt))) + error ("Invalid type of vertical scroll bar"); + if (!EQ (w->scroll_bar_width, width) || !EQ (w->vertical_scroll_bar_type, vertical_type)) { |