Created
June 29, 2013 06:01
-
-
Save PuercoPop/5890040 to your computer and use it in GitHub Desktop.
For Kirbuchi
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
(setq lexical-binding t) | |
(require 'package) | |
;; Add marmalade to package repos | |
;; default value for package-archives | |
;; (("gnu" . "http://elpa.gnu.org/packages/")) | |
(let | |
((marmalade '("marmalade" . "http://marmalade-repo.org/packages/")) | |
(melpa '("melpa" . "http://melpa.milkbox.net/packages/")) | |
(org '("org" . "http://orgmode.org/elpa/"))) | |
(add-to-list 'package-archives marmalade t) | |
(add-to-list 'package-archives melpa t) | |
(add-to-list 'package-archives org t)) | |
(package-initialize) | |
(unless (and (file-exists-p "~/.emacs.d/elpa/archives/marmalade") | |
(file-exists-p "~/.emacs.d/elpa/archives/gnu") | |
(file-exists-p "~/.emacs.d/elpa/archives/melpa")) | |
(package-refresh-contents)) | |
(defun packages-install (&rest packages) | |
(mapc (lambda (package) | |
(let ((name (car package)) | |
(repo (cdr package))) | |
(when (not (package-installed-p name)) | |
(let ((package-archives (list repo))) | |
(package-initialize) | |
(package-install name))))) | |
packages) | |
(package-initialize) | |
(delete-other-windows)) | |
(provide 'setup-package) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment