2018-03-21 19:21:18 +00:00
|
|
|
;;; early-init.el -*- lexical-binding: t; -*-
|
|
|
|
|
2018-03-28 04:41:57 +00:00
|
|
|
;; Emacs HEAD (27+) introduces early-init.el, which is run before init.el,
|
2018-08-31 21:40:54 +00:00
|
|
|
;; before package and UI initialization happens.
|
2018-03-28 04:41:57 +00:00
|
|
|
|
2018-09-19 22:14:01 +00:00
|
|
|
;; Defer garbage collection further back in the startup process
|
2019-07-21 01:01:15 +00:00
|
|
|
(setq gc-cons-threshold most-positive-fixnum)
|
2018-09-18 23:25:17 +00:00
|
|
|
|
2019-07-21 01:01:15 +00:00
|
|
|
;; In Emacs 27+, package initialization occurs before `user-init-file' is
|
|
|
|
;; loaded, but after `early-init-file'. Doom handles package initialization, so
|
|
|
|
;; we must prevent Emacs from doing it early!
|
2018-08-31 21:40:54 +00:00
|
|
|
(setq package-enable-at-startup nil)
|
2019-12-27 06:41:14 +00:00
|
|
|
(advice-add #'package--ensure-init-file :override #'ignore)
|
2018-06-16 09:38:19 +00:00
|
|
|
|
2019-07-22 22:30:45 +00:00
|
|
|
;; Prevent the glimpse of un-styled Emacs by disabling these UI elements early.
|
2020-02-21 17:36:29 +00:00
|
|
|
(push '(menu-bar-lines . 0) default-frame-alist)
|
|
|
|
(push '(tool-bar-lines . 0) default-frame-alist)
|
|
|
|
(push '(vertical-scroll-bars) default-frame-alist)
|
2019-03-02 08:54:04 +00:00
|
|
|
|
2019-07-21 01:01:15 +00:00
|
|
|
;; Resizing the Emacs frame can be a terribly expensive part of changing the
|
|
|
|
;; font. By inhibiting this, we easily halve startup times with fonts that are
|
|
|
|
;; larger than the system default.
|
|
|
|
(setq frame-inhibit-implied-resize t)
|
2019-09-06 19:40:38 +00:00
|
|
|
|
|
|
|
;; Ignore X resources; its settings would be redundant with the other settings
|
|
|
|
;; in this file and can conflict with later config (particularly where the
|
|
|
|
;; cursor color is concerned).
|
|
|
|
(advice-add #'x-apply-session-resources :override #'ignore)
|
2020-10-06 18:38:32 +00:00
|
|
|
|
|
|
|
;; Prevent unwanted runtime builds in gccemacs (native-comp); packages are
|
|
|
|
;; compiled ahead-of-time when they are installed and site files are compiled
|
|
|
|
;; when gccemacs is installed.
|
|
|
|
(setq comp-deferred-compilation nil)
|