From 9ef2df938e791354fbb773b55b0ec186f7d4611c Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 14 Apr 2014 11:29:59 -0700 Subject: [PATCH] multi-line my-packages. --- init.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/init.el b/init.el index 7a089d38..2f4ef160 100644 --- a/init.el +++ b/init.el @@ -37,12 +37,19 @@ '("melpa" . "http://melpa.milkbox.net/packages/") t) (package-initialize) -(defvar my-packages '(ctags ctags-update evil flymake mo-git-blame multiple-cursors no-easy-keys starter-kit-bindings starter-kit-ruby starter-kit magit ido-ubiquitous find-file-in-project idle-highlight-mode paredit inf-ruby undo-tree rainbow-delimiters) - "A list of packages to ensure are installed at launch.") +(defvar my-packages '(color-theme ctags ctags-update evil flymake mo-git-blame + multiple-cursors no-easy-keys starter-kit-bindings + starter-kit-ruby starter-kit magit ido-ubiquitous + find-file-in-project idle-highlight-mode paredit + inf-ruby undo-tree rainbow-delimiters smex) + "Packages that must be installed at launch.") (defun ensure-package-installed (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." + ;; fetch the list of packages available + (unless package-archive-contents + (package-refresh-contents)) (mapcar (lambda (package) (if (package-installed-p package) @@ -51,10 +58,6 @@ Return a list of installed packages or nil for every package not installed." (package-install package)))) packages)) -;; fetch the list of packages available -(unless package-archive-contents - (package-refresh-contents)) - (ensure-package-installed my-packages) ;; =============================================================================