Go to the first, previous, next, last section, table of contents.

13. Scrollbars

13.1. How can I disable the scrollbar?

To turn disable them for all frames, add the following line to your `.Xdefaults':

Emacs.scrollBarWidth:  0

To turn the scrollbar off on a per-frame basis, use the following function:

(set-specifier scrollbar-width (cons (selected-frame) 0))

You can actually turn the scrollbars on at any level you want by substituting for (selected-frame) in the above command. For example, to turn the scrollbars off only in a single buffer:

(set-specifier scrollbar-width (cons (current-buffer) 0))

13.2. How can one use resources to change scrollbar colors?

Here's a recap of how to use resources to change your scrollbar colors:

! Motif scrollbars

Emacs*XmScrollBar.Background: skyblue
Emacs*XmScrollBar.troughColor: lightgray

! Athena scrollbars

Emacs*Scrollbar.Foreground: skyblue
Emacs*Scrollbar.Background: lightgray

Note the capitalization of `Scrollbar' for the Athena widget.

13.3. When I move the scrollbar in an XEmacs window, it moves the point as well, which should not be the default behavior. Is this a bug or a feature? Can I disable it?

The current behavior is a feature, not a bug. Point remains at the same buffer position as long as that position does not scroll off the screen. In that event, point will end up in either the upper-left or lower-left hand corner.

13.4. How can I get automatic horizontal scrolling? By the same token, how can I turn it off in specific modes?

To do this, add to your .emacs file:

(require 'auto-show)

Then do (setq truncate-lines t) in the mode-hooks for any modes in which you want lines truncated.


Go to the first, previous, next, last section, table of contents.