emacs23 缓冲区菜单字体 (GTK)

发布于 2024-09-14 03:54:09 字数 459 浏览 1 评论 0原文

我最近升级到 emacs23 (Ubuntu 10.04),并且我成功地使用相关的 .emacs 选项对我的面孔(字体)进行了整理。

然而,我似乎无法更改的一种字体是用于显示缓冲区菜单的字体(即,当您在缓冲区上按住 CTRL+左键单击时,您会看到一个弹出菜单,其中列出了所有打开的缓冲区)。

问题是用于显示此菜单的字体是成比例的(不是固定宽度),这使菜单变得一团糟 - 没有任何东西垂​​直排列,我经常使用它来查看哪些缓冲区保存共同的文件目录。比例字体的路径遍布各处。

我相信 Ubuntu 的 emacs23 是用 GTK 而不是 Lucid 构建的。我读过的一些内容似乎表明无法在 Emacs 中设置此字体 - 必须使用 GTK 配置在外部完成 - 如果这是真的,如何设置?

否则,如果做不到,在 Ubuntu 上用 Lucid 而不是 GTK 支持重新编译 emacs23 有多棘手?用“apt-get source”可以轻松完成吗?

I've recently upgraded to emacs23 (Ubuntu 10.04) and I've managed to get my faces (fonts) all sorted out with relevant .emacs options.

However the one font I can't seem to change is the one used to display the Buffer Menu (i.e. when you CTRL+left-click on a buffer, you get a pop-up menu that lists all open buffers).

The problem is that the font used to display this menu is proportional (not fixed-width) and it makes a big mess of the menu - nothing is lined up vertically, and I often use this to see which buffers hold files that are in common directories. The proportional font has the paths all over the place.

I believe Ubuntu's emacs23 was built with GTK rather than Lucid. Some things I've read seem to indicate that there's no way to set this font within Emacs - that is has to be done externally using GTK config - if this is true, how?

Otherwise, if it can't be done, how tricky is it to recompile emacs23 with Lucid rather than GTK support on Ubuntu? Can it be done easily with "apt-get source"?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

与风相奔跑 2024-09-21 03:54:09

我相信我已经找到了答案:

http://www .gnu.org/software/emacs/manual/html_node/emacs/GTK-resources.html

这个想法是创建 ~/.emacs.d/gtkrc 并使用 GTK 配置机制为 emacs 设置替代样式' GTK 小部件。

$ cat ~/.emacs.d/gtkrc
style "menufont"
{
  font_name = "monospace 10"  # Pango font name
}
widget "*emacs-menuitem*" style "menufont"

看起来效果不错。

I believe I have discovered the answer:

http://www.gnu.org/software/emacs/manual/html_node/emacs/GTK-resources.html

The idea is to create ~/.emacs.d/gtkrc and use the GTK config mechanism to set up alternative styles for emacs' GTK widgets.

$ cat ~/.emacs.d/gtkrc
style "menufont"
{
  font_name = "monospace 10"  # Pango font name
}
widget "*emacs-menuitem*" style "menufont"

Seems to work well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文