我使用elpa安装了许多包,并希望为它们适当地生成autoloads。 为此,我在我的init文件中添加了以下内容:
(apply 'update-directory-autoloads (directory-files package-user-dir t "[^\.].*"))
然而,我遇到了以下回溯错误:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
expand-file-name(nil "/build/buildd/emacs24-24.3+1/debian/build-x/lisp")
autoload-generated-file()
autoload-find-generated-file()
update-directory-autoloads("/home/survivor/.emacs.d/elpa/ahg-20140818.130")
eval((update-directory-autoloads "/home/survivor/.emacs.d/elpa/ahg-20140818.130") nil)
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)
我现在这样做的方式有问题吗?我是不是应该为每个包都添加require
语句?
init.el
文件中添加(package-initialize)
,以便实际加载包自动加载并在init.el
中使用。 - user355252