aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emms-cache.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/emms-cache.el b/lisp/emms-cache.el
index 35221b3..2262c7c 100644
--- a/lisp/emms-cache.el
+++ b/lisp/emms-cache.el
@@ -71,12 +71,12 @@ This is used to cache over emacs sessions.")
(interactive "p")
(if (and arg (> arg 0))
(progn
- (add-hook 'after-init-hook 'emms-cache-restore)
+ (unless emms-cache-dirty
+ (emms-cache-restore))
(add-hook 'kill-emacs-hook 'emms-cache-save)
(setq emms-cache-get-function 'emms-cache-get)
(setq emms-cache-set-function 'emms-cache-set)
(setq emms-cache-modified-function 'emms-cache-dirty))
- (remove-hook 'after-init-hook 'emms-cache-restore)
(remove-hook 'kill-emacs-hook 'emms-cache-save)
(setq emms-cache-get-function nil)
(setq emms-cache-set-function nil)