Your autoloads file will fail to load with the following error:
void-function project-vc-extra-root-markers
Instead of:
;;;###autoload
(dolist (file '("deno.json" deno.jsonc"))
(add-to-list 'project-vc-extra-root markers file))
You should wrap the form in with-eval-after-load:
;;;###autoload
(with-eval-after-load "project"
(dolist (file '("deno.json" deno.jsonc"))
(add-to-list 'project-vc-extra-root markers file)))
That should do the right thing.
> > Your autoloads file will fail to load with the following error:> > void-function project-vc-extra-root-markers
Great catch, thank you. I just pushed your fix to main.
> Instead of:> > ;;;###autoload> (dolist (file '("deno.json" deno.jsonc"))> (add-to-list 'project-vc-extra-root markers file))> > You should wrap the form in with-eval-after-load:> > ;;;###autoload> (with-eval-after-load "project"> (dolist (file '("deno.json" deno.jsonc"))> (add-to-list 'project-vc-extra-root markers file)))> > That should do the right thing.
I was also considering requiring dependencies in the autoload to make
the file extensions available to `auto-mode-alist' automatically without
an extra function call. What do you think of using a regular `require'
statement in the autoloads instead of a `with-eval-after-load'? Not sure
I fully understand the differences, but it seems like `require' might be
preferred for this situation based on the manual.
;;;###autoload
(progn
(require 'project)
(add-to-list 'auto-mode-alist '("\\.ts\\'" . deno-ts--ts-auto-mode))
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . deno-ts--tsx-auto-mode)))
;;;###autoload
(progn
(require 'project)
(dolist (file '("deno.json" "deno.jsonc"))
(add-to-list 'project-vc-extra-root-markers file)))