如何在Emacs中更改滚动条颜色?

3

在emacs中是否可以更改滚动条的颜色?(注意:不是XEmacs)

如果有影响的话,我在Ubuntu 8.10上运行emacs 22。

3个回答

3

在什么环境下?例如,在Carbon EMACS中,滚动条小部件来自carbon本地集合;如果是这样,你不能真正改变颜色。


Carbon Emacs现在已经废弃,但它的现代版本是什么?它有续集吗? - Sam
有很多选择。我使用eMacs-plus,但还有很多其他选择。请查看eMacs维基https://www.emacswiki.org/emacs/EmacsForMacOS。 - Charlie Martin

1
请查看Emacs维基网站获取与ScrollBars有关的信息。
引用自该网站:

GnuEmacs can draw its own “native” scroll bars, which are quite customizable. In my opinion, this also gives the best results for users of ColorTheme. Details follow:

Build GnuEmacs with the following options passed to ./configure:

         --without-toolkit-scroll-bars --with-x-toolkit=no 

Then try a ColorTheme, or:

M-x customize-face RET scroll-bar RET

You can set the foreground/background colors, border color/width, etc. There is a separate variable called scroll-bar-width.


但是如果我正在处理一个预先构建的emacs,而且我无法控制安装呢? - user3458
如果没有以上设置,请尝试使用 M-x describe-variable ret system-configuration-options ret 命令查看系统配置选项! - Andrew Cox

1

不要脸地从XEmacs的常见问题解答中摘取

以下是如何使用资源更改滚动条颜色的概述:

! Motif scrollbars

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

! Athena scrollbars

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

请注意 Athena 小部件的 Scrollbar 大写。

这对我似乎不起作用。我正在运行最新版本的Ubuntu(8.10)和最新版本的emacs(22.2.1)。还有其他建议吗? - mike
1
Charlie问了一个好问题:你在什么环境中?回答你的问题——是的,我认为那只适用于XEmacs(对我的假设感到抱歉)。 - Dan Esparza

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接