diff options
author | Alan Pearce | 2014-03-05 12:19:22 +0000 |
---|---|---|
committer | Alan Pearce | 2014-03-05 12:19:22 +0000 |
commit | 21b6f0cd68028c1e64c97e1ab7143fed4151c35d (patch) | |
tree | 185f37272b08454bbc004bb5ec591be6c65547e8 /emacs/init.el | |
parent | 6f4c1e62e76d861f672d270348c5ef4f2cfec8e0 (diff) | |
download | dotfiles-21b6f0cd68028c1e64c97e1ab7143fed4151c35d.tar.lz dotfiles-21b6f0cd68028c1e64c97e1ab7143fed4151c35d.tar.zst dotfiles-21b6f0cd68028c1e64c97e1ab7143fed4151c35d.zip |
Emacs: check and use cask, if installed
Diffstat (limited to 'emacs/init.el')
-rw-r--r-- | emacs/init.el | 38 |
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) |