Created
November 15, 2012 20:07
-
-
Save pdxmph/4080914 to your computer and use it in GitHub Desktop.
Install a list of Emacs packages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defvar mph-packages | |
| '(ack-and-a-half auctex clojure-mode coffee-mode deft expand-region | |
| gist groovy-mode haml-mode haskell-mode inf-ruby | |
| magit magithub markdown-mode paredit projectile python | |
| sass-mode rainbow-mode scss-mode solarized-theme | |
| volatile-highlights yaml-mode yari zenburn-theme) | |
| "A list of packages to ensure are installed at launch.") | |
| (defun mph-packages-installed-p () | |
| (loop for p in mph-packages | |
| when (not (package-installed-p p)) do (return nil) | |
| finally (return t))) | |
| (unless (mph-packages-installed-p) | |
| ;; check for new packages (package versions) | |
| (message "%s" "Emacs is now refreshing its package database...") | |
| (package-refresh-contents) | |
| (message "%s" " done.") | |
| ;; install the missing packages | |
| (dolist (p mph-packages) | |
| (when (not (package-installed-p p)) | |
| (package-install p)))) | |
| (provide 'mph-packages) | |
| ;;; mph-packages.el ends here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment