Emacs: check and use cask, if installed
Alan Pearce alan@alanpearce.co.uk
Wed, 05 Mar 2014 12:19:22 +0000
2 files changed, 94 insertions(+), 15 deletions(-)
jump to
A emacs/Cask
@@ -0,0 +1,73 @@+(source org) +(source melpa) +(source marmalade) +(source gnu) + +(depends-on "ace-jump-mode") +(depends-on "ag") +(depends-on "auto-compile") +(depends-on "auto-indent-mode") +(depends-on "autopair") +(depends-on "bind-key") +(depends-on "cask") +(depends-on "cdnjs") +(depends-on "company") +(depends-on "confluence") +(depends-on "control-mode") +(depends-on "dash") +(depends-on "dash-at-point") +(depends-on "deferred") +(depends-on "diff-hl") +(depends-on "diminish") +(depends-on "dired+") +(depends-on "discover") +(depends-on "emmet-mode") +(depends-on "epl") +(depends-on "expand-region") +(depends-on "f") +(depends-on "flx") +(depends-on "flx-ido") +(depends-on "framemove") +(depends-on "geiser") +(depends-on "ggtags") +(depends-on "git-commit-mode") +(depends-on "git-rebase-mode") +(depends-on "god-mode") +(depends-on "haskell-mode") +(depends-on "helm") +(depends-on "ido-vertical-mode") +(depends-on "jinja2-mode") +(depends-on "js2-mode") +(depends-on "lua-mode") +(depends-on "magit") +(depends-on "makey") +(depends-on "multi-term") +(depends-on "multiple-cursors") +(depends-on "mustache-mode") +(depends-on "nginx-mode") +(depends-on "org-jira") +(depends-on "org-journal") +(depends-on "org-plus-contrib") +(depends-on "packed") +(depends-on "pallet") +(depends-on "paredit") +(depends-on "php-mode") +(depends-on "pkg-info") +(depends-on "project-persist") +(depends-on "projectile") +(depends-on "puppet-mode") +(depends-on "quickrun") +(depends-on "redshank") +(depends-on "s") +(depends-on "simple-httpd") +(depends-on "skewer-mode") +(depends-on "smart-tab") +(depends-on "smart-tabs-mode") +(depends-on "smex") +(depends-on "solarized-theme") +(depends-on "tup-mode") +(depends-on "undo-tree") +(depends-on "use-package") +(depends-on "web-mode") +(depends-on "xml-rpc") +(depends-on "yaml-mode")
M emacs/init.el → emacs/init.el
@@ -56,24 +56,30 @@ (file-name-directory (file-truename user-init-file)))) "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)) +(add-to-list 'load-path (expand-file-name "elisp/" user-emacs-directory)) -(when (not package-archive-contents) - (package-refresh-contents)) +(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)) -(add-to-list 'load-path (expand-file-name "elisp/" user-emacs-directory)) + (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)) + (mapc (lambda (package-name) + (unless (package-installed-p package-name) + (package-install package-name))) + '(bind-key + diminish + use-package)))) (require 'use-package)