dotfiles/.config/emacs/early-init.el

44 lines
1.2 KiB
EmacsLisp

;;; early-init.el --- Early initialization -*- lexical-binding: t; -*-
;; Copyright (C) 2020-2021 earnest ma
;; SPDX-License-Identifier: MIT
;; Author: earnest ma <me@earne.link>
;;; Commentary:
;; This file is loaded before the main `init.el' initialization file and
;; graphical window.
;;; Code:
;; Garbage collection
(setq gc-cons-threshold most-positive-fixnum
gc-cons-percentage 0.6)
(add-hook 'emacs-startup-hook
(lambda ()
(setq gc-cons-threshold 16777216
gc-cons-percentage 0.1)))
;; Remove some graphical things
;; (if (not (eq system-type 'darwin)) (menu-bar-mode -1))
(tool-bar-mode -1)
(scroll-bar-mode -1) ; no scroll bars at all
;; Startup slightly faster even if frame is being resized on startup
(setq frame-inhibit-implied-resize t)
;; Do NOT use package.el
(setq package-enable-at-startup nil)
;; Silence "Package cl is deprecated"
;; AFAIK, cl was deprecated in Emacs 27.1 and replaced by cl-lib,
;; which some packages have not switched over to yet.
(setq byte-compile-warnings '(cl-functions))
;; Don't show the default modeline until doom-modeline loads
(setq-default mode-line-format nil)
(provide 'early-init)
;;; early-init.el ends here