Skip to content

Instantly share code, notes, and snippets.

@sean-m
Last active August 29, 2015 13:55
Show Gist options
  • Save sean-m/8725359 to your computer and use it in GitHub Desktop.
Save sean-m/8725359 to your computer and use it in GitHub Desktop.
function for installing emacs packages, copied from here: https://bigmac.caelum.uberspace.de/paste/ensure-package-installed.html
(defun ensure-package-installed (&rest packages)
"Assure every package is installed, ask for installation if it’s not.
Return a list of installed packages or nil for every package not installed."
(mapcar
(lambda (package)
(package-installed-p 'evil)
(if (package-installed-p package)
package
(if (y-or-n-p (format "Package %s is missing. Install it? " package))
(package-install package)
nil)))
packages))
Generated by Profpatsch using scpaste at Sun Dec 8 01:24:51 2013. CET. (original)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment