-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.el
40 lines (34 loc) · 1.14 KB
/
setup.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
;; load-path expansion
(setq load-path (append '("~/.emacs.d/lisp/network"
"~/local-elisp") load-path))
(require 'dependencies)
(require 'package-manager-configuration)
;; Check version numbers
(if (not (= emacs-major-version 24))
(if (not (> emacs-major-version 24))
(progn
(message "Not using Emacs 24!")
(setq install-okay nil))
(setq install-okay t))
(if (not (>= emacs-minor-version 3))
(progn
(message "Not using Emacs 24.3!")
(setq install-okay nil))
(setq install-okay t)))
;; If something went wrong, abort.
(if (not install-okay)
(progn
(message "Please install Emacs 24.3 or newer!")
(kill-emacs))
(progn
(message "Version checks complete, we should be good to go.")))
(package-refresh-contents)
(setq install-all
(y-or-n-p
(format "Do you want me to install all of the packages for you? ")))
(dolist (package dependency-list)
(or (package-installed-p package)
(if install-all
(package-install package)
(if (y-or-n-p (format "Package %s is missing. Install it? " package))
(package-install package)))))