aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Rudalics2014-10-04 10:20:24 +0200
committerMartin Rudalics2014-10-04 10:20:24 +0200
commit3c6ba8b49bb87ada8a8cca6566ad0b6e3fc4e57d (patch)
treea47c285b071a0821573b19970cb80e1ea7150cc3 /src
parentcebc89eea10104af6a871b8ee78fb60d6c597898 (diff)
downloademacs-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')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/buffer.c4
-rw-r--r--src/window.c32
3 files changed, 28 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3260af49d11..4885778b920 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12014-10-04 Martin Rudalics <rudalics@gmx.at>
2
3 * buffer.c (scroll_bar_width, scroll_bar_height): Fix
4 doc-strings.
5 * window.c (Fset_window_scroll_bars): Fix doc-string.
6 (Fwindow_scroll_bars): Have it return what the doc-string says.
7
12014-10-03 Eli Zaretskii <eliz@gnu.org> 82014-10-03 Eli Zaretskii <eliz@gnu.org>
2 9
3 * xdisp.c (move_it_by_lines): Call reseat_1 after moving the 10 * xdisp.c (move_it_by_lines): Call reseat_1 after moving the
diff --git a/src/buffer.c b/src/buffer.c
index b46993a3cdb..80791a1fdb1 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5925,12 +5925,12 @@ in a window. To make the change take effect, call `set-window-buffer'. */);
5925 5925
5926 DEFVAR_PER_BUFFER ("scroll-bar-width", &BVAR (current_buffer, scroll_bar_width), 5926 DEFVAR_PER_BUFFER ("scroll-bar-width", &BVAR (current_buffer, scroll_bar_width),
5927 Qintegerp, 5927 Qintegerp,
5928 doc: /* Width of this buffer's scroll bars in pixels. 5928 doc: /* Width of this buffer's vertical scroll bars in pixels.
5929A value of nil means to use the scroll bar width from the window's frame. */); 5929A value of nil means to use the scroll bar width from the window's frame. */);
5930 5930
5931 DEFVAR_PER_BUFFER ("scroll-bar-height", &BVAR (current_buffer, scroll_bar_height), 5931 DEFVAR_PER_BUFFER ("scroll-bar-height", &BVAR (current_buffer, scroll_bar_height),
5932 Qintegerp, 5932 Qintegerp,
5933 doc: /* Height of this buffer's scroll bars in pixels. 5933 doc: /* Height of this buffer's horizontal scroll bars in pixels.
5934A value of nil means to use the scroll bar height from the window's frame. */); 5934A value of nil means to use the scroll bar height from the window's frame. */);
5935 5935
5936 DEFVAR_PER_BUFFER ("vertical-scroll-bar", &BVAR (current_buffer, vertical_scroll_bar_type), 5936 DEFVAR_PER_BUFFER ("vertical-scroll-bar", &BVAR (current_buffer, vertical_scroll_bar_type),
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.
7003WINDOW must be a live window and defaults to the selected one. 7003WINDOW must be a live window and defaults to the selected one.
7004 7004
7005Second parameter WIDTH specifies the pixel width for the scroll bar. 7005Second parameter WIDTH specifies the pixel width for the vertical scroll
7006bar. If WIDTH is nil, use the scroll-bar width of WINDOW's frame.
7006Third parameter VERTICAL-TYPE specifies the type of the vertical scroll 7007Third parameter VERTICAL-TYPE specifies the type of the vertical scroll
7007bar: left, right, or nil. If WIDTH is nil, use the frame's scroll-bar 7008bar: left, right, or nil. If VERTICAL-TYPE is t, this means use the
7008width. If VERTICAL-TYPE is t, use the frame's scroll-bar type. 7009frame's scroll-bar type.
7009 7010
7010Fourth parameter HEIGHT specifies the pixel height for the scroll bar. 7011Fourth parameter HEIGHT specifies the pixel height for the horizontal
7011Fifth parameter HORIZONTAL-TYPE specifies the type of the vertical 7012scroll bar. If HEIGHT is nil, use the scroll-bar height of WINDOW's
7012scroll bar: nil, bottom, or t. If HEIGHT is nil, use the frame's 7013frame. Fifth parameter HORIZONTAL-TYPE specifies the type of the
7013scroll-bar height. If HORIZONTAL-TYPE is t, use the frame's scroll-bar 7014horizontal scroll bar: nil, bottom, or t. If HORIZONTAL-TYPE is t, this
7014type. 7015means to use the frame's horizontal scroll-bar type.
7015 7016
7016Return t if scroll bars were actually changed and nil otherwise. */) 7017Return 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.
7030WINDOW must be a live window and defaults to the selected one. 7031WINDOW must be a live window and defaults to the selected one.
7031 7032
7032Value is a list of the form (WIDTH COLS VERTICAL-TYPE HEIGHT LINES 7033Value is a list of the form (WIDTH COLUMNS VERTICAL-TYPE HEIGHT LINES
7033HORIZONTAL-TYPE). If WIDTH or HEIGHT is nil or TYPE is t, the window is 7034HORIZONTAL-TYPE). If WIDTH or HEIGHT is nil or VERTICAL-TYPE or
7034using the frame's corresponding value. */) 7035HORIZONTAL-TYPE is t, the window is using the frame's corresponding
7036value. */)
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}