-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit.el
49 lines (43 loc) · 1.52 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
48
49
;;; init.el --- Summary
;;;
;;; Commentary:
;;; My init file
;;;
;;; Code:
(let ((file-name-handler-alist nil))
(defconst emacs-start-time (current-time))
(unless noninteractive
(message "Loading %s..." load-file-name))
;;; REALLY speeds up init
(setq-default gc-cons-threshold (* 100 1024 1024))
(setq message-log-max 10000)
(eval-and-compile
(require 'package)
(add-to-list 'load-path
"~/.emacs.d/elisp")
(setq package-archives
'(("gnu" . "https://elpa.gnu.org/packages/")
;("melpa-stable" . "https://stable.melpa.org/packages/")
("melpa" . "https://melpa.org/packages/")
("org" . "http://orgmode.org/elpa/")))
(package-initialize)
(setq package-enable-at-startup nil)
(require 'cl)
(require 'cl-lib)
(unless package-archive-contents
(package-refresh-contents))
(unless (package-installed-p 'use-package)
(package-install 'use-package))
(unless (package-installed-p 'req-package)
(package-install 'req-package))
(require 'use-package))
(setq use-package-always-ensure t)
(use-package req-package)
(dolist (file (sort (file-expand-wildcards "~/.emacs.d/elisp/*.el") #'string<))
(message "Loading %s" file)
(load-library (file-name-sans-extension file))
(message "Loading %s...done (%.3fs)" file (float-time (time-subtract (current-time) emacs-start-time))))
(req-package-finish)
(message "Loading %s...done (%.3fs)" load-file-name (float-time (time-subtract (current-time) emacs-start-time))))
(provide 'init)
;;; init ends here