diff options
| -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 @@ | |||
| 1 | 2003-09-22 Masatake YAMATO <jet@gyve.org> | ||
| 2 | |||
| 3 | * window.c (Fset_window_scroll_bars): Validate the value of | ||
| 4 | `vertical_type'. | ||
| 5 | |||
| 1 | 2003-09-21 Kim F. Storm <storm@cua.dk> | 6 | 2003-09-21 Kim F. Storm <storm@cua.dk> |
| 2 | 7 | ||
| 3 | * frame.c (Vdefault_frame_scroll_bars): New variable. | 8 | * 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; | |||
| 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 | { |
| @@ -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 | { |