Function: window-scroll-bars

window-scroll-bars is a function defined in window.c.

Signature

(window-scroll-bars &optional WINDOW)

Documentation

Get width and type of scroll bars of window WINDOW.

WINDOW must be a live window and defaults to the selected one.

Value is a list of the form (WIDTH COLUMNS VERTICAL-TYPE HEIGHT LINES HORIZONTAL-TYPE PERSISTENT), see set-window-scroll-bars. If WIDTH or HEIGHT is nil or VERTICAL-TYPE or HORIZONTAL-TYPE is t, WINDOW is using the frame's corresponding value.

Probably introduced at or before Emacs version 22.1.

Source Code

// Defined in /usr/src/emacs/src/window.c
{
  struct window *w = decode_live_window (window);

  return Fcons (((w->scroll_bar_width >= 0)
		 ? make_fixnum (w->scroll_bar_width)
		 : Qnil),
		Fcons (make_fixnum (WINDOW_SCROLL_BAR_COLS (w)),
		       list5 (w->vertical_scroll_bar_type,
			      ((w->scroll_bar_height >= 0)
			       ? make_fixnum (w->scroll_bar_height)
			       : Qnil),
			      make_fixnum (WINDOW_SCROLL_BAR_LINES (w)),
			      w->horizontal_scroll_bar_type,
			      w->scroll_bars_persistent ? Qt : Qnil)));
}