Mercurial > emacs
comparison src/window.c @ 52565:26d1a4665f6c
(Fset_window_scroll_bars): Validate the value of `vertical_type'.
author | Masatake YAMATO <jet@gyve.org> |
---|---|
date | Mon, 22 Sep 2003 12:55:25 +0000 |
parents | 9a8ad8b87f32 |
children | f8adaf14f570 |
comparison
equal
deleted
inserted
replaced
52564:eaaa5462dd17 | 52565:26d1a4665f6c |
---|---|
5859 If window is nil, set scroll bars of the currently selected window. | 5859 If window is nil, set scroll bars of the currently selected window. |
5860 Second parameter WIDTH specifies the pixel width for the scroll bar; | 5860 Second parameter WIDTH specifies the pixel width for the scroll bar; |
5861 this is automatically adjusted to a multiple of the frame column width. | 5861 this is automatically adjusted to a multiple of the frame column width. |
5862 Third parameter VERTICAL-TYPE specifies the type of the vertical scroll | 5862 Third parameter VERTICAL-TYPE specifies the type of the vertical scroll |
5863 bar: left, right, or nil. | 5863 bar: left, right, or nil. |
5864 A width of nil and type of t means to use the frame's corresponding value. */) | 5864 If WIDTH is nil, use the frame's scroll-bar width. |
5865 If 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 { |
5868 struct window *w = decode_window (window); | 5869 struct window *w = decode_window (window); |
5869 | 5870 |
5870 if (!NILP (width)) | 5871 if (!NILP (width)) |
5871 CHECK_NUMBER (width); | 5872 CHECK_NUMBER (width); |
5872 | 5873 |
5873 if (XINT (width) == 0) | 5874 if (XINT (width) == 0) |
5874 vertical_type = Qnil; | 5875 vertical_type = Qnil; |
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"); | |
5875 | 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 { |
5879 w->scroll_bar_width = width; | 5886 w->scroll_bar_width = width; |