Add doom-autoloads-files option
So users can scan additional files for autoloads during 'doom sync'.
This commit is contained in:
parent
f4e6d36574
commit
22c7eac897
1 changed files with 10 additions and 6 deletions
|
@ -16,6 +16,9 @@ one wants that.")
|
||||||
Info-directory-list)
|
Info-directory-list)
|
||||||
"A list of variables to be cached in `doom-autoload-file'.")
|
"A list of variables to be cached in `doom-autoload-file'.")
|
||||||
|
|
||||||
|
(defvar doom-autoloads-files ()
|
||||||
|
"A list of additional files or file globs to scan for autoloads.")
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;;; Library
|
;;; Library
|
||||||
|
@ -42,12 +45,13 @@ one wants that.")
|
||||||
(mapcar (lambda (var) `(set ',var ',(symbol-value var)))
|
(mapcar (lambda (var) `(set ',var ',(symbol-value var)))
|
||||||
doom-autoloads-cached-vars)
|
doom-autoloads-cached-vars)
|
||||||
(doom-autoloads--scan
|
(doom-autoloads--scan
|
||||||
(cl-loop for dir
|
(append (cl-loop for dir
|
||||||
in (append (list doom-core-dir)
|
in (append (list doom-core-dir)
|
||||||
(cdr (doom-module-load-path 'all-p))
|
(cdr (doom-module-load-path 'all-p))
|
||||||
(list doom-private-dir))
|
(list doom-private-dir))
|
||||||
if (doom-glob dir "autoload.el") collect it
|
if (doom-glob dir "autoload.el") collect it
|
||||||
if (doom-glob dir "autoload/*.el") append it))
|
if (doom-glob dir "autoload/*.el") append it)
|
||||||
|
(mapcan #'doom-glob doom-autoloads-files)))
|
||||||
(doom-autoloads--scan
|
(doom-autoloads--scan
|
||||||
(mapcar #'straight--autoloads-file
|
(mapcar #'straight--autoloads-file
|
||||||
(cl-set-difference (hash-table-keys straight--build-cache)
|
(cl-set-difference (hash-table-keys straight--build-cache)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue