【问题标题】:set-frame-height in .emacs doesn't have any effect.emacs 中的 set-frame-height 没有任何效果
【发布时间】:2011-02-20 06:01:40
【问题描述】:

我最近从 GNU Emacs 20.7.1 更新到 23.2(是的,我的变化有点慢。) 我的 .emacs 以

开头
 (set-frame-height (selected-frame) 60)  
 (set-frame-width (selected-frame) 90)  
 (set-frame-position (selected-frame) 50 20)

这适用于 20.7.1,但不适用于 23.2 我使用 -debug-init 运行,我的 .emacs 文件没有出现任何错误。

如果我在缓冲区和 eval-region 中选择 .emacs 文件的前三行,窗口将移动到第 3 行的位置,宽度设置为 90。如果我再次 eval-region,则设置高度到 60。

虽然我没有测试 .emacs 中的所有其他行,但文件的余额似乎在初始化时正常评估。

(操作系统 = Windows Vista)

【问题讨论】:

  • 经过一些实验,看来这一行 - (set-default-font "--Lucida Console-normal-r---13- i>-96-96-c-*-iso8859-1") 会破坏 set-frame-height 或 set-frame-size 命令。通过将 set-default-font 行移到 set-frame-height 上方,一切正常。然后我尝试添加 (tool-bar-mode nil) 并且无论我将它放在 .emacs 文件中的哪个位置,它都会破坏 set-frame-height。

标签: debugging emacs dot-emacs


【解决方案1】:

很奇怪。看起来像一个错误。

同时设置宽度和高度为我解决了这个问题。

(set-frame-size (selected-frame) 90 60)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-06-14
    • 2019-06-19
    • 2017-07-18
    • 2010-10-17
    • 2012-11-25
    • 2017-08-22
    • 2013-10-10
    相关资源
    最近更新 更多