Reputation: 883
I need to use update-directory-autoloads
function in a little el-script. When I'm trying to call this function with an argument that is a name of a directory I receive this error:
Wrong type argument: stringp, nil.
Call looks like this:
(update-directory-autoloads "~/test")
Upvotes: 10
Views: 8376
Reputation: 28581
When you get Wrong type argument: foo, bar.
, you should M-: (setq debug-on-error t) RET
and then reproduce the error so as to get a backtrace. Actually, you can set debug-on-error
like that in your .emacs and Emacs usually stays perfectly useable.
Upvotes: 13
Reputation: 74480
Generating autoload files is poorly documented. You're experiencing the problem that arises because you haven't set the variable generated-autoload-file
. Try the following:
(let ((generated-autoload-file "~/test/loaddefs.el"))
(update-directory-autoloads "~/test"))
Update the generated-autoloads-file
binding to be the location where you want the loaddefs.el
file to live.
Upvotes: 7