Report ignored files w/ reloading autoloads
This commit is contained in:
parent
f21c01fce2
commit
5364260a5c
1 changed files with 9 additions and 10 deletions
|
@ -558,22 +558,21 @@ This should be run whenever init.el or an autoload file is modified. Running
|
|||
(dolist (path (doom-module-paths))
|
||||
(let ((auto-dir (expand-file-name "autoload" path))
|
||||
(auto-file (expand-file-name "autoload.el" path)))
|
||||
(when (and (file-exists-p auto-file)
|
||||
(doom-packages--read-if-cookies auto-file))
|
||||
(when (file-exists-p auto-file)
|
||||
(push auto-file targets))
|
||||
(when (file-directory-p auto-dir)
|
||||
(dolist (file (file-expand-wildcards (expand-file-name "*.el" auto-dir) t))
|
||||
;; Make evil*.el autoload files a special case; don't load
|
||||
;; them unless evil is enabled.
|
||||
(when (doom-packages--read-if-cookies file)
|
||||
(push file targets))))))
|
||||
(dolist (file (directory-files-recursively auto-dir "\\.el$"))
|
||||
(push file targets)))))
|
||||
(when (file-exists-p doom-autoload-file)
|
||||
(delete-file doom-autoload-file)
|
||||
(message "Deleted old autoloads.el"))
|
||||
(dolist (file (reverse targets))
|
||||
(message (if (update-file-autoloads file nil doom-autoload-file)
|
||||
"Nothing in %s"
|
||||
"Scanned %s")
|
||||
(message (cond ((not (doom-packages--read-if-cookies file))
|
||||
"Ignoring %s")
|
||||
((update-file-autoloads file nil doom-autoload-file)
|
||||
"Nothing in %s")
|
||||
(t
|
||||
"Scanned %s"))
|
||||
(file-relative-name file doom-emacs-dir)))
|
||||
(let ((buf (get-file-buffer doom-autoload-file))
|
||||
current-sexp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue