我需要在一个小的el脚本中使用update-directory-autoloads
函数。当我试图使用一个目录名称作为参数来调用此函数时,我收到此错误:
Wrong type argument: stringp, nil.
调用看起来像这样:(update-directory-autoloads "~/test")
当你遇到Wrong type argument: foo, bar.
的错误时,你需要M-: (setq debug-on-error t) RET
并重现错误以获得回溯信息。实际上,你可以在你的.emacs文件中设置debug-on-error
,这样Emacs通常仍然可以正常使用。
generated-autoload-file
。请尝试以下操作:(let ((generated-autoload-file "~/test/loaddefs.el"))
(update-directory-autoloads "~/test"))
将generated-autoloads-file
绑定更新为您希望loaddefs.el
文件存放的位置。
M-x toggle-debug-on-error
对于交互式情况来说会更加友好一些。 - phils