Calling tool-bar-mode, menu-bar-mode or scroll-bar-mode from early-init.el seems to cause a 15-30% slowdown in startup time, possibly for loading the UI libraries early. Also, loading early-init.el eagerly from init.el causes a GC hit for Emacs 25/26 users. It's too early to use this optimization.
14 lines
642 B
EmacsLisp
14 lines
642 B
EmacsLisp
;;; early-init.el -*- lexical-binding: t; -*-
|
|
|
|
;; Emacs HEAD (27+) introduces early-init.el, which is run before init.el,
|
|
;; before package and UI initialization happens.
|
|
|
|
;; Package initialize occurs automatically, before `user-init-file' is
|
|
;; loaded, but after `early-init-file'. Doom handles package
|
|
;; initialization, so we must prevent Emacs from doing it early!
|
|
(setq package-enable-at-startup nil)
|
|
|
|
;; Prevent the glimpse of un-styled Emacs by setting these early.
|
|
(add-to-list 'default-frame-alist '(tool-bar-lines 0))
|
|
(add-to-list 'default-frame-alist '(menu-bar-lines 0))
|
|
(add-to-list 'default-frame-alist '(vertical-scroll-bars))
|