-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.el
33 lines (32 loc) · 1 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
(let ((inhibit-message t)
(gc-cons-threshold most-positive-fixnum))
;; Define setup files to load
(defvar setup-files
(delete-dups
(append
(mapcar
(lambda (file) (concat user-emacs-directory file))
;; Prioritize loading these files first
'("modules/xdg-user-emacs-dirs.el"
"modules/ui.el"
"modules/fix-annoyances.el"
"modules/evil.el"
"modules/editing.el"))
(mapcan
(lambda (dir)
(directory-files-recursively (concat user-emacs-directory dir) "^[^.].*\.el$"))
'("major-modes"
"minor-modes"
"modules")))))
;; Load setup files and isolate errors
(setopt use-package-always-defer t)
(defvar after-successful-init-hook nil)
(let ((error? nil))
(dolist (setup setup-files)
(condition-case err
(load setup nil t)
(error
(setq error? t)
(message "%s" (error-message-string err)))))
(unless error?
(run-hooks 'after-successful-init-hook))))