Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 9dfdfffc5d
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (24 sloc) 0.993 kB
(require 'package)
(defvar marmalade '("marmalade" . "http://marmalade-repo.org/packages/"))
(defvar gnu '("gnu" . "http://elpa.gnu.org/packages/"))
(defvar melpa '("melpa" . "http://melpa.milkbox.net/packages/"))
;; Add marmalade to package repos
(add-to-list 'package-archives marmalade)
(add-to-list 'package-archives melpa 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)
Jump to Line
Something went wrong with that request. Please try again.