以编程方式设置Emacs帧大小 [英] Programmatically setting Emacs frame size

查看:117
本文介绍了以编程方式设置Emacs帧大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的emacs(在Windows上)总是启动一个设置的大小,这是相当小的,如果我调整大小,它不是记住在下次启动。



我一直在玩以下:

 (设置帧位置(选择帧)200 2);左上方的像素x y 
(set-frame-size(selected-frame)110 58);行和列w h

当我在临时缓冲区中执行它时,它完全可以工作。我把它放在我的.emacs中,虽然现在当我启动程序时,我可以看到框架临时设置为该大小,在时间 * scratch * 加载之前再次重设为小默认。



任何人都可以帮助我修复上述代码,以便在启动时粘贴?

解决方案

这是我在〜/ .emacs 中使用的:



<$ p $ ($ 0))
(add-to-list'default-frame-alist'(top。0))
(add-to-list'default-frame-alist'(height。50))
(add-to-list'default-frame-alist'(width。155))


My emacs (on Windows) always launches with a set size, which is rather small, and if I resize it, it's not "remembered" at next start-up.

I've been playing with the following:

(set-frame-position (selected-frame) 200 2) ; pixels x y from upper left
(set-frame-size (selected-frame) 110 58) ; rows and columns w h

which totally works when I execute it in the scratch buffer. I put it in my .emacs, and although now when I start the program, I can see the frame temporarily set to that size, by the time *scratch* loads, it resets back to the small default again.

Can anyone help me fix up the above code so that it "sticks" on start-up?

解决方案

Here's what I use in my ~/.emacs:

(add-to-list 'default-frame-alist '(left . 0))
(add-to-list 'default-frame-alist '(top . 0))
(add-to-list 'default-frame-alist '(height . 50))
(add-to-list 'default-frame-alist '(width . 155))

这篇关于以编程方式设置Emacs帧大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆