-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy-packages.el
41 lines (34 loc) · 968 Bytes
/
my-packages.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
;;; package -- Summary
;;; Commentary:
;;; Code:
;; Require cl-lib to allow for latest emacs features
(require 'cl-lib)
(defvar my-packages '(
autopair
auto-complete
color-theme
color-theme-solarized
flx-ido
flycheck
groovy-mode
jedi
paren
popup
magit
)
"A list of packages to ensure are installed at launch.")
(defun my-packages-installed-p ()
(cl-loop for p in my-packages
when (not (package-installed-p p)) do (cl-return nil)
finally (cl-return t)))
(unless (my-packages-installed-p)
;; check for new packages (package versions)
(message "%s" "Emacs Prelude is now refreshing its package database...")
(package-refresh-contents)
(message "%s" " done.")
;; install the missing packages
(dolist (p my-packages)
(when (not (package-installed-p p))
(package-install p))))
(provide 'my-packages)
;;; my-packages.el ends here