summary refs log tree commit diff stats
path: root/emacs/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/init.el')
-rw-r--r--emacs/init.el38
1 files changed, 22 insertions, 16 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 7226482..770b5dc 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -56,24 +56,30 @@ Values: `desktop', `server', `laptop'")
   "Where the emacs init file really is, passing through symlinks.")
 
 ;;;; Package Management
-(eval-and-compile
-  (setq package-archives '(("gnu"       . "http://elpa.gnu.org/packages/")
-                           ("marmalade" . "http://marmalade-repo.org/packages/")
-                           ("melpa"     . "http://melpa.milkbox.net/packages/")
-                           ("org"       . "http://orgmode.org/elpa/")))
-  (package-initialize))
-
-(when (not package-archive-contents)
-  (package-refresh-contents))
-
 (add-to-list 'load-path (expand-file-name "elisp/" user-emacs-directory))
 
-(mapc (lambda (package-name)
-        (unless (package-installed-p package-name)
-          (package-install package-name)))
-      '(bind-key
-        diminish
-        use-package))
+(let ((cask-file (expand-file-name "cask.el" user-emacs-directory)))
+  (if (file-exists-p cask-file)
+      (progn
+        (add-to-list 'load-path (file-name-directory (file-truename cask-file)))
+        (require 'cask)
+        (cask-initialize))
+    (eval-and-compile
+      (setq package-archives '(("gnu"       . "http://elpa.gnu.org/packages/")
+                               ("marmalade" . "http://marmalade-repo.org/packages/")
+                               ("melpa"     . "http://melpa.milkbox.net/packages/")
+                               ("org"       . "http://orgmode.org/elpa/")))
+      (package-initialize))
+
+    (when (not package-archive-contents)
+      (package-refresh-contents))
+
+    (mapc (lambda (package-name)
+            (unless (package-installed-p package-name)
+              (package-install package-name)))
+          '(bind-key
+            diminish
+            use-package))))
 
 (require 'use-package)