Function: toggle-scroll-bar
toggle-scroll-bar is an interactive and byte-compiled function defined
in scroll-bar.el.gz.
Signature
(toggle-scroll-bar ARG)
Documentation
Toggle whether or not the selected frame has vertical scroll bars.
With ARG, turn on vertical scroll bars if and only if ARG is positive.
The variable scroll-bar-mode(var)/scroll-bar-mode(fun) controls which side the scroll bars are on
when they are turned on; if it is nil, they go on the left.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/scroll-bar.el.gz
(defun toggle-scroll-bar (arg)
"Toggle whether or not the selected frame has vertical scroll bars.
With ARG, turn on vertical scroll bars if and only if ARG is positive.
The variable `scroll-bar-mode' controls which side the scroll bars are on
when they are turned on; if it is nil, they go on the left."
(interactive "P")
(if (null arg)
(setq arg
(if (frame-parameter nil 'vertical-scroll-bars) -1 1))
(setq arg (prefix-numeric-value arg)))
(modify-frame-parameters
(selected-frame)
(list (cons 'vertical-scroll-bars
(if (> arg 0)
(or scroll-bar-mode default-frame-scroll-bars))))))