-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathearly-init.el
41 lines (33 loc) · 1.51 KB
/
early-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
;;; Package --- Summary -*- lexical-binding: t; -*-
;;; Commentary:
;;; early init file
;;; Code:
;;; no secrets should get saved in plaintext
(setq auth-sources '("secrets:Login" "~/.authinfo.gpg"))
;; increase this early, decrease later on again
(setq gc-cons-threshold most-positive-fixnum
gc-cons-percentage 0.6)
;; In noninteractive sessions, prioritize non-byte-compiled source files to
;; prevent the use of stale byte-code. Otherwise, it saves us a little IO time
;; to skip the mtime checks on every *.elc file.
(setq load-prefer-newer noninteractive)
(unless (or (daemonp) noninteractive)
;; Site files tend to use `load-file', which emits "Loading X..." messages in
;; the echo area, which in turn triggers a redisplay. Redisplays can have a
;; substantial effect on startup times and in this case happens so early that
;; Emacs may flash white while starting up.
(define-advice load-file (:override (file) silence)
(load file nil 'nomessage))
;; Undo our `load-file' advice above, to limit the scope of any edge cases it
;; may introduce down the road.
(define-advice startup--load-user-init-file (:before (&rest _) init-doom)
(advice-remove #'load-file #'load-file@silence)))
;;; disable package.el
(setq package-enable-at-startup nil)
;; Premature redisplays can substantially affect startup times and produce
;; ugly flashes of unstyled Emacs.
(setq-default inhibit-redisplay t
inhibit-message t)
;; We'll reset it later in init.el
(provide 'early-init)
;;; early-init.el ends here