开发者

What's the difference between 'M-x load-file' and 'M-x load-library' in emacs?

I tried to reload the ~/.emacs file, and it seems that both of the command works fine. Then, what's the difference between the two? For loading .emacs, what command do I have 开发者_开发知识库to use?


From the manual:

M-x load-library differs from M-x load-file in that it searches a sequence of directories and tries three file names in each directory.

Suppose your argument is lib; the three names are lib.elc, lib.el, and lastly just lib. If lib.elc exists, it is by convention the result of compiling lib.el; it is better to load the compiled file, since it will load and run faster.


Yes. To add to that, load-library recognizes things in your load-path. load-file recognized file names in the current directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜