diff options
author | David Engster <deng@randomsample.de> | 2010-03-10 18:37:30 +0100 |
---|---|---|
committer | Lucas Bonnet <lucas@rincevent.net> | 2010-03-16 17:48:09 +0100 |
commit | 9390fc321a233787dcb2dfc9426f7468c32153bc (patch) | |
tree | 9bf945efeb05daea540fc284d69ae3af8e2fd020 | |
parent | 903e2484fa658eef9b4dc8bbd0bf4958f7233242 (diff) |
lisp/emms-cache.el: Initialize cache immediately instead of using after-init-hook.
* emms-cache.el (emms-cache): Call emms-cache-restore directly instead
of using after-init-hook.
-rw-r--r-- | lisp/emms-cache.el | 4 |
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) |