aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorMasatake YAMATO2003-09-22 12:55:25 +0000
committerMasatake YAMATO2003-09-22 12:55:25 +0000
commit2f71b5eae86e4f82e77918c6d5dcebb07ccf1496 (patch)
treed58776a64bb940ab7ef10e3e56bc6a184f086622 /src/window.c
parentb8313039df4446d849b658fcf5306fe6d8d0103a (diff)
downloademacs-2f71b5eae86e4f82e77918c6d5dcebb07ccf1496.tar.gz
emacs-2f71b5eae86e4f82e77918c6d5dcebb07ccf1496.zip
(Fset_window_scroll_bars): Validate the value of `vertical_type'.
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c9
1 files changed, 8 insertions, 1 deletions
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;
5861this is automatically adjusted to a multiple of the frame column width. 5861this is automatically adjusted to a multiple of the frame column width.
5862Third parameter VERTICAL-TYPE specifies the type of the vertical scroll 5862Third parameter VERTICAL-TYPE specifies the type of the vertical scroll
5863bar: left, right, or nil. 5863bar: left, right, or nil.
5864A width of nil and type of t means to use the frame's corresponding value. */) 5864If WIDTH is nil, use the frame's scroll-bar width.
5865If TYPE is t, use the frame's scroll-bar type. */)
5865 (window, width, vertical_type, horizontal_type) 5866 (window, width, vertical_type, horizontal_type)
5866 Lisp_Object window, width, vertical_type, horizontal_type; 5867 Lisp_Object window, width, vertical_type, horizontal_type;
5867{ 5868{
@@ -5873,6 +5874,12 @@ A width of nil and type of t means to use the frame's corresponding value. */)
5873 if (XINT (width) == 0) 5874 if (XINT (width) == 0)
5874 vertical_type = Qnil; 5875 vertical_type = Qnil;
5875 5876
5877 if (!(EQ (vertical_type, Qnil)
5878 || EQ (vertical_type, Qleft)
5879 || EQ (vertical_type, Qright)
5880 || EQ (vertical_type, Qt)))
5881 error ("Invalid type of vertical scroll bar");
5882
5876 if (!EQ (w->scroll_bar_width, width) 5883 if (!EQ (w->scroll_bar_width, width)
5877 || !EQ (w->vertical_scroll_bar_type, vertical_type)) 5884 || !EQ (w->vertical_scroll_bar_type, vertical_type))
5878 { 5885 {