forked from senny/cabbage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cabbage.el
48 lines (36 loc) · 1.7 KB
/
cabbage.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
42
43
44
45
46
47
48
(require 'cl)
(load (expand-file-name "~/.emacs.d/config.el") 'noerror)
(if (not custom-file)
(setq custom-file (expand-file-name "~/.emacs.d/custom.el")))
(load custom-file 'noerror)
;; Platform-specific stuff
(when (eq system-type 'darwin)
;; Work around a bug on OS X where system-name is FQDN
(setq system-name (car (split-string system-name "\\."))))
;; You can keep system- or user-specific customizations here
(setq local-config (expand-file-name "~/.emacs.d/local.el")
system-specific-config (expand-file-name (concat "~/.emacs.d/machines/" system-name ".el"))
user-specific-config (expand-file-name (concat"~/.emacs.d/users/" user-login-name ".el")))
(load (concat cabbage-repository "lib/variables"))
(if (file-exists-p system-specific-config) (load system-specific-config))
(if (file-exists-p user-specific-config) (load user-specific-config))
(if (file-exists-p local-config) (load local-config) )
(add-to-list 'load-path cabbage-repository)
(load (concat cabbage-repository "lib/bundles/framework"))
(load (concat cabbage-repository "lib/defun"))
(load (concat cabbage-repository "lib/setup"))
(if (version< emacs-version "24.4")
(load (concat cabbage-repository "lib/perspective")))
(load (concat cabbage-repository "lib/compilation"))
(load (concat cabbage-repository "lib/modes"))
(cond
((string-match "nt" system-configuration)
(load "lib/platforms/windows"))
((string-match "apple" system-configuration)
(load "lib/platforms/mac")))
(run-hooks 'cabbage-pre-bundle-hook)
(dolist (bundle cabbage-bundles)
(cabbage-load-bundle bundle))
;; TODO: load this earlier and debug the weird error
;; (load (concat cabbage-repository "lib/themes"))
(run-hooks 'cabbage-initialized-hook)