Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (40 sloc) 1.68 KB
;;; starter-kit-elpa.el --- Install a base set of packages automatically.
;; Part of the Emacs Starter Kit
(defvar starter-kit-packages (list 'idle-highlight
;; 'nxml
"Libraries that should be installed by default.")
(defun starter-kit-elpa-install ()
"Install all starter-kit packages that aren't installed."
(dolist (package starter-kit-packages)
(unless (or (member package package-activated-list)
(functionp package))
(message "Installing %s" (symbol-name package))
(package-install package))))
(defun esk-online? ()
"See if we're online.
Windows does not have the network-interface-list function, so we
just have to assume it's online."
;; TODO how could this work on Windows?
(if (and (functionp 'network-interface-list)
(some (lambda (iface) (unless (equal "lo" (car iface))
(member 'up (first (last (network-interface-info
(car iface)))))))
;; On your first run, this should pull in all the base packages.
(when (esk-online?)
(unless package-archive-contents (package-refresh-contents))
;; Workaround for an ELPA bug that people are reporting but I've been
;; unable to reproduce:
(autoload 'paredit-mode "paredit")
(provide 'starter-kit-elpa)
Something went wrong with that request. Please try again.