I would like to make sure that scrollbars never show up on my windows, but I recently noticed that when I created a new frame with C-x 5 2
the new frame gets a scrollbar, even though the original frame does not. The lines that might be relevant from my init.el
are below:
(scroll-bar-mode -1)
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1))
I can still use M-x toggle-scroll-bar
to turn it off in the new frame, but I feel like that shouldn't be necessary.
To clarify, I'm using emacsclient -c &
to start Emacs on Ubuntu, and when I do this I get a scroll bar. C-h v scroll-bar-mode
gives me:
scroll-bar-mode is a variable defined in `scroll-bar.el'.
Its value is nil
Original value was right
Documentation:
Specify whether to have vertical scroll bars, and on which side.
Possible values are nil (no scroll bars), `left' (scroll bars on left)
and `right' (scroll bars on right).
To set this variable in a Lisp program, use `set-scroll-bar-mode'
to make it take real effect.
Setting the variable with a customization buffer also takes effect.
You can customize this variable.
So the value of scroll-bar-mode
is properly set to nil
, but somehow Emacs is ignoring this to give me a scroll bar anyway.