在Emacs启动期间运行自己的代码 [英] Running my own code when during Emacs startup
本文介绍了在Emacs启动期间运行自己的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
〜/ bin / hello.el
中有自己的elisp代码。 code>〜/ .emacs 文件具有以下代码,可在启动时运行 hello.el
。
(add-to-list'load-path〜/ bin / elisp)
(require'hello)
但是,我收到以下错误消息。
警告(初始化):加载`/Users/smcho/.emacs'时发生错误:
错误:未提供必需功能hello p>
这是什么问题?
解决方案
hello.el提供你好吗?它应该从开始(提供'hello)
。请参阅 elisp手册。 (加载hello.el)
工作?
Let's say I have my own elisp code in ~/bin/hello.el
.
The ~/.emacs
file has the following code to run hello.el
at startup.
(add-to-list 'load-path "~/bin/elisp")
(require 'hello)
But, I get the following error message.
Warning (initialization): An error occurred while loading `/Users/smcho/.emacs':
error: Required feature `hello' was not provided
What's wrong with this?
解决方案
Does hello.el provide hello? It should start with (provide 'hello)
. See the elisp manual. Does (load "hello.el")
work?
这篇关于在Emacs启动期间运行自己的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文