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.
精彩评论