diff options
| author | Martin Rudalics | 2014-10-04 10:20:24 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2014-10-04 10:20:24 +0200 |
| commit | 3c6ba8b49bb87ada8a8cca6566ad0b6e3fc4e57d (patch) | |
| tree | a47c285b071a0821573b19970cb80e1ea7150cc3 /src/window.c | |
| parent | cebc89eea10104af6a871b8ee78fb60d6c597898 (diff) | |
| download | emacs-3c6ba8b49bb87ada8a8cca6566ad0b6e3fc4e57d.tar.gz emacs-3c6ba8b49bb87ada8a8cca6566ad0b6e3fc4e57d.zip | |
Add documentation for horizontal scroll bars and fix some minor issues.
* buffer.c (scroll_bar_width, scroll_bar_height): Fix
doc-strings.
* window.c (Fset_window_scroll_bars): Fix doc-string.
(Fwindow_scroll_bars): Have it return what the doc-string says.
* window.el (window-full-height-p): Make it behave correctly for
minibuffer window.
(window-current-scroll-bars): Fix code.
(fit-frame-to-buffer): Use window-scroll-bar-height instead of
window-scroll-bars.
* frame.el (frame-current-scroll-bars): Fix doc-string.
* scroll-bar.el (toggle-horizontal-scroll-bar): New command.
* frames.texi (Scroll Bars): Describe use of horizontal scroll
bars.
* display.texi (Scroll Bars): Add description of horizontal scroll
bars and associated functions.
* frames.texi (Layout Parameters): Add horizontal scroll bar
entries. Remove paragraph on "combined fringe widths".
* windows.texi (Window Sizes): Describe affects of horizontal
scroll bars on window layout and sizes. Fix description of
window-full-height-p.
(Resizing Windows): Mention horizontal scroll bar.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/window.c b/src/window.c index 456a8bce691..0b0f2140a58 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -7002,16 +7002,17 @@ DEFUN ("set-window-scroll-bars", Fset_window_scroll_bars, | |||
| 7002 | doc: /* Set width and type of scroll bars of window WINDOW. | 7002 | doc: /* Set width and type of scroll bars of window WINDOW. |
| 7003 | WINDOW must be a live window and defaults to the selected one. | 7003 | WINDOW must be a live window and defaults to the selected one. |
| 7004 | 7004 | ||
| 7005 | Second parameter WIDTH specifies the pixel width for the scroll bar. | 7005 | Second parameter WIDTH specifies the pixel width for the vertical scroll |
| 7006 | bar. If WIDTH is nil, use the scroll-bar width of WINDOW's frame. | ||
| 7006 | Third parameter VERTICAL-TYPE specifies the type of the vertical scroll | 7007 | Third parameter VERTICAL-TYPE specifies the type of the vertical scroll |
| 7007 | bar: left, right, or nil. If WIDTH is nil, use the frame's scroll-bar | 7008 | bar: left, right, or nil. If VERTICAL-TYPE is t, this means use the |
| 7008 | width. If VERTICAL-TYPE is t, use the frame's scroll-bar type. | 7009 | frame's scroll-bar type. |
| 7009 | 7010 | ||
| 7010 | Fourth parameter HEIGHT specifies the pixel height for the scroll bar. | 7011 | Fourth parameter HEIGHT specifies the pixel height for the horizontal |
| 7011 | Fifth parameter HORIZONTAL-TYPE specifies the type of the vertical | 7012 | scroll bar. If HEIGHT is nil, use the scroll-bar height of WINDOW's |
| 7012 | scroll bar: nil, bottom, or t. If HEIGHT is nil, use the frame's | 7013 | frame. Fifth parameter HORIZONTAL-TYPE specifies the type of the |
| 7013 | scroll-bar height. If HORIZONTAL-TYPE is t, use the frame's scroll-bar | 7014 | horizontal scroll bar: nil, bottom, or t. If HORIZONTAL-TYPE is t, this |
| 7014 | type. | 7015 | means to use the frame's horizontal scroll-bar type. |
| 7015 | 7016 | ||
| 7016 | Return t if scroll bars were actually changed and nil otherwise. */) | 7017 | Return t if scroll bars were actually changed and nil otherwise. */) |
| 7017 | (Lisp_Object window, Lisp_Object width, Lisp_Object vertical_type, | 7018 | (Lisp_Object window, Lisp_Object width, Lisp_Object vertical_type, |
| @@ -7029,17 +7030,22 @@ DEFUN ("window-scroll-bars", Fwindow_scroll_bars, Swindow_scroll_bars, | |||
| 7029 | doc: /* Get width and type of scroll bars of window WINDOW. | 7030 | doc: /* Get width and type of scroll bars of window WINDOW. |
| 7030 | WINDOW must be a live window and defaults to the selected one. | 7031 | WINDOW must be a live window and defaults to the selected one. |
| 7031 | 7032 | ||
| 7032 | Value is a list of the form (WIDTH COLS VERTICAL-TYPE HEIGHT LINES | 7033 | Value is a list of the form (WIDTH COLUMNS VERTICAL-TYPE HEIGHT LINES |
| 7033 | HORIZONTAL-TYPE). If WIDTH or HEIGHT is nil or TYPE is t, the window is | 7034 | HORIZONTAL-TYPE). If WIDTH or HEIGHT is nil or VERTICAL-TYPE or |
| 7034 | using the frame's corresponding value. */) | 7035 | HORIZONTAL-TYPE is t, the window is using the frame's corresponding |
| 7036 | value. */) | ||
| 7035 | (Lisp_Object window) | 7037 | (Lisp_Object window) |
| 7036 | { | 7038 | { |
| 7037 | struct window *w = decode_live_window (window); | 7039 | struct window *w = decode_live_window (window); |
| 7038 | 7040 | ||
| 7039 | return Fcons (make_number (WINDOW_SCROLL_BAR_AREA_WIDTH (w)), | 7041 | return Fcons (((w->scroll_bar_width >= 0) |
| 7042 | ? make_number (w->scroll_bar_width) | ||
| 7043 | : Qnil), | ||
| 7040 | list5 (make_number (WINDOW_SCROLL_BAR_COLS (w)), | 7044 | list5 (make_number (WINDOW_SCROLL_BAR_COLS (w)), |
| 7041 | w->vertical_scroll_bar_type, | 7045 | w->vertical_scroll_bar_type, |
| 7042 | make_number (WINDOW_SCROLL_BAR_AREA_HEIGHT (w)), | 7046 | ((w->scroll_bar_height >= 0) |
| 7047 | ? make_number (w->scroll_bar_height) | ||
| 7048 | : Qnil), | ||
| 7043 | make_number (WINDOW_SCROLL_BAR_LINES (w)), | 7049 | make_number (WINDOW_SCROLL_BAR_LINES (w)), |
| 7044 | w->horizontal_scroll_bar_type)); | 7050 | w->horizontal_scroll_bar_type)); |
| 7045 | } | 7051 | } |