.emacs 文件(脚本)不起作用
我刚刚安装了 Ubuntu 10.10.2010 的新发行版,然后安装了 emacs23,我还安装了用于颜色主题的 emacs 好东西。
我用以下代码在我的主目录中创建了文件 .emacs:
(require 'color-theme)
(setq color-theme-is-global t)
(color-theme-euphoria)
但它不起作用,即使使用任何代码 (setq oblique-startup-message t)
我创建了一个名为 .emacs.el 的新文件,但什么也没有。安装时会生成一个名为“.emacs.d”的文件夹。我什至尝试将 emacs 文件放入其中,但仍然没有任何结果。
现在我认为任何启动脚本都不起作用。那么我应该怎么做才能知道为什么 Emacs 不读取该文件呢?
更新:我删除了所有混乱文件并留下了 ~/.emacs.el 文件,现在代码是:
(setq inhibit-startup-message t)
(require 'color-theme)
(setq color-theme-is-global t)
(color-theme-euphoria)
但给出错误:警告(初始化):加载`/home/marmoush/.emacs.el'时发生错误:符号的功能定义无效:color-theme-euphoria
I've just installed new distribution of Ubuntu 10.10.2010, then installed emacs23, I installed also emacs goodies for color themes.
I made the file .emacs in my home directory with the code:
(require 'color-theme)
(setq color-theme-is-global t)
(color-theme-euphoria)
but it doesn't work, with any code even (setq inhibit-startup-message t)
I made a new file named .emacs.el but nothing. There is a folder with the name ".emacs.d" generated by the installation. I even tried putting emacs file in it, still nothing.
now I think any startup script won't work. so what should I do to know why Emacs doesn't read that file ?
Update: I deleted all the mess files and left the ~/.emacs.el file and now the code is :
(setq inhibit-startup-message t)
(require 'color-theme)
(setq color-theme-is-global t)
(color-theme-euphoria)
but gives error: Warning (initialization): An error occurred while loading `/home/marmoush/.emacs.el': Symbol's function definition is void: color-theme-euphoria
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
诡异的。尝试将其另存为 ~/.emacs.d/init.el
Weird. Try saving it as ~/.emacs.d/init.el
我不知道,但是当我使用这段代码时它起作用了!
I don't know but when I used this code it worked !
首先,删除您的
.emacs
文件。当 Emacs 启动时,使用菜单自定义一些值并保存它们。应该在某处创建一个新的 .emacs 文件。找出位置,然后根据需要进行编辑。First, delete your
.emacs
file. When Emacs starts up, customize some values using the menu and save them. A new.emacs
file should be created somewhere. Find out where, and then edit it as you please.