forked from ghoseb/dotemacs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el
47 lines (39 loc) · 1.32 KB
/
init.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
;; This is where everything starts
;; Create a variable to store the path to this dotfile directory
;; (Usually ~/.emacs.d)
(setq dotfiles-dir (file-name-directory
(or (buffer-file-name) load-file-name)))
;; Create variables to store the path to this dotfile dir's lib etc and tmp directories
(setq dotfiles-lib-dir (concat dotfiles-dir "lib/"))
(setq dotfiles-tmp-dir (concat dotfiles-dir "tmp/"))
(setq dotfiles-etc-dir (concat dotfiles-dir "etc/"))
;; Create helper fns for loading dotfile paths and files
(defun add-dotfile-path (p)
(add-to-list 'load-path (concat dotfiles-dir p)))
(defun add-lib-path (p)
(add-to-list 'load-path (concat dotfiles-lib-dir p)))
(defun load-dotfile (f)
(load-file (concat dotfiles-dir f)))
(defun load-config (m)
(load-dotfile (concat "config/" m ".el")))
;; Ensure the lib directory is on the load path
(add-dotfile-path "lib")
;; Pull in personalised configuration files
(load-config "core")
(load-config "utils")
(load-config "cosmetic")
(load-config "clojure")
(load-config "built-in")
(load-config "ido")
(load-config "paredit")
(load-config "lisp")
(load-config "slime")
(load-config "durendal")
(load-config "ac")
(load-config "smex")
(load-config "undo-tree")
(load-config "yas")
(load-config "bindings")
(load-config "git")
(load-config "markdown")
(load-config "golang")