9

我需要update-directory-autoloads在一个小 el 脚本中使用函数。当我尝试使用作为目录名称的参数调用此函数时,我收到此错误:

Wrong type argument: stringp, nil.

调用如下所示: (update-directory-autoloads "~/test")

4

2 回答 2

11

当你得到 时Wrong type argument: foo, bar.,你应该M-: (setq debug-on-error t) RET然后重现错误以获得回溯。实际上,您可以debug-on-error在 .emacs 中进行这样的设置,并且 Emacs 通常保持完全可用。

于 2013-02-08T02:40:50.723 回答
7

生成自动加载文件的文档很少。您遇到了由于您没有设置变量而出现的问题generated-autoload-file。尝试以下操作:

(let ((generated-autoload-file "~/test/loaddefs.el"))
  (update-directory-autoloads "~/test"))

将绑定更新为您希望文件generated-autoloads-file存在的位置。loaddefs.el

于 2013-02-07T22:41:24.400 回答