Fix doom//clean-byte-compiled-files
This commit is contained in:
parent
6ea5430c4d
commit
b629f4f507
1 changed files with 12 additions and 11 deletions
|
@ -358,19 +358,20 @@ If RECOMPILE-P is non-nil, only recompile out-of-date files."
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom//clean-byte-compiled-files ()
|
(defun doom//clean-byte-compiled-files ()
|
||||||
"Delete all the compiled elc files in your Emacs configuration. This excludes
|
"Delete all the compiled elc files in your Emacs configuration and private
|
||||||
compiled packages.'"
|
module. This does not include your byte-compiled, third party packages.'"
|
||||||
(interactive)
|
(interactive)
|
||||||
(cl-loop with default-directory = doom-emacs-dir
|
(cl-loop with default-directory = doom-emacs-dir
|
||||||
for path in (append (doom-files-in doom-emacs-dir :match "\\.elc$")
|
for path in (append (doom-files-in doom-emacs-dir :match "\\.elc$" :depth 1)
|
||||||
(doom-files-in doom-psuedo-module-dirs :match "\\.elc$" :full t)
|
(doom-files-in doom-psuedo-module-dirs :match "\\.elc$" :depth 1)
|
||||||
(doom-files-under doom-core-dir :match "\\.elc$")
|
(doom-files-in doom-core-dir :match "\\.elc$")
|
||||||
(doom-files-under doom-modules-dirs :match "\\.elc$"))
|
(doom-files-in doom-modules-dirs :match "\\.elc$" :depth 4))
|
||||||
for truepath = (file-truename path)
|
for truepath = (file-truename path)
|
||||||
|
if (file-exists-p path)
|
||||||
do (delete-file path)
|
do (delete-file path)
|
||||||
and do
|
and do
|
||||||
(message "✓ Deleted %s"
|
(print! (green "✓ Deleted %%s")
|
||||||
(if (file-in-directory-p truepath default-directory)
|
(if (file-in-directory-p truepath default-directory)
|
||||||
(file-relative-name truepath)
|
(file-relative-name truepath)
|
||||||
(abbreviate-file-name path)))
|
(abbreviate-file-name truepath)))
|
||||||
finally do (message "Everything is clean")))
|
finally do (print! (bold (green "Everything is clean")))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue