Rename doom/clean-cache => doom/reset (+ make reset)

This commit is contained in:
Henrik Lissner 2017-07-09 22:50:29 +02:00
parent c8e138ff51
commit 27b344b64a
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
4 changed files with 11 additions and 9 deletions

View file

@ -36,12 +36,13 @@ $(MODULES): init.el .local/autoloads.el
clean: clean:
@$(EMACS) -f doom/clean-compiled @$(EMACS) -f doom/clean-compiled
clean-cache:
@$(EMACS) -f doom/clean-cache
clean-pcache: clean-pcache:
@$(EMACS) -l persistent-soft --eval '(delete-directory pcache-directory t)' @$(EMACS) -l persistent-soft --eval '(delete-directory pcache-directory t)'
reset:
@$(EMACS) -f doom/reset
test: init.el .local/autoloads.el test: init.el .local/autoloads.el
@$(EMACS) -f doom-run-tests @$(EMACS) -f doom-run-tests

View file

@ -617,10 +617,11 @@ If ONLY-RECOMPILE-P is non-nil, only recompile out-of-date files."
;; In case `load-path' has changed (e.g. after an update) ;; In case `load-path' has changed (e.g. after an update)
(byte-recompile-file (expand-file-name "core.el" doom-core-dir) t)) (byte-recompile-file (expand-file-name "core.el" doom-core-dir) t))
(defun doom/clean-cache () (defun doom/reset ()
"Clear the local cache completely (in `doom-cache-dir'). "Clear the local cache completely (in `doom-cache-dir').
You must restart Emacs for some components to feel its effects." This resets Emacs to a blank slate. You must restart Emacs for some components
to feel its effects."
(interactive) (interactive)
(delete-directory doom-cache-dir t) (delete-directory doom-cache-dir t)
(make-directory doom-cache-dir t)) (make-directory doom-cache-dir t))

View file

@ -53,10 +53,10 @@ config files that are stable (i.e. it should be unlikely that you need to delete
them if something goes wrong).") them if something goes wrong).")
(defvar doom-cache-dir (concat doom-host-dir "/cache/") (defvar doom-cache-dir (concat doom-host-dir "/cache/")
"Host-namespaced directory for volatile storage. Deleted when "Host-namespaced directory for volatile storage. Deleted when `doom/reset' is
`doom/clean-cache' is called. Use this for transient files that are generated on called. Use this for transient files that are generated on the fly like caches
the fly like caches and temporary files. Anything that may need to be cleared if and temporary files. Anything that may need to be cleared if there are
there are problems.") problems.")
(defvar doom-packages-dir (concat doom-local-dir "packages/") (defvar doom-packages-dir (concat doom-local-dir "packages/")
"Where package.el and quelpa plugins (and their caches) are stored.") "Where package.el and quelpa plugins (and their caches) are stored.")

View file

@ -163,6 +163,6 @@ These are /not/ loaded automatically. Use ~load!~ to do so.
+ ~doom/reload-autoloads~ + ~doom/reload-autoloads~
+ ~doom/compile~ + ~doom/compile~
+ ~doom/recompile~ + ~doom/recompile~
+ ~doom/clean-cache~ + ~doom/reset~
+ ~doom/clean-compiled~ + ~doom/clean-compiled~