Last active
August 29, 2015 13:55
-
-
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
This file contains 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
(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