| 1 | ;;; early-init.el -*- lexical-binding: t; -*- |
| 2 | |
| 3 | (setq gc-cons-threshold most-positive-fixnum |
| 4 | gc-cons-percentage 1.0) |
| 5 | (add-hook 'emacs-startup-hook |
| 6 | (lambda () (setq gc-cons-threshold (* 16 1024 1024) |
| 7 | gc-cons-percentage 0.1))) |
| 8 | |
| 9 | ;; Every `load'/`require' checks file names against these regexps; skip that |
| 10 | ;; during init and restore afterwards (adapted from minimal-emacs.d) |
| 11 | (let ((handlers file-name-handler-alist)) |
| 12 | ;; keep jka-compr so compressed .el.gz libraries still load |
| 13 | (setq file-name-handler-alist (list (rassq 'jka-compr-handler handlers))) |
| 14 | (add-hook 'emacs-startup-hook |
| 15 | (lambda () |
| 16 | (setq file-name-handler-alist |
| 17 | (delete-dups (append file-name-handler-alist handlers)))) |
| 18 | 101)) |
| 19 | |
| 20 | (setq package-enable-at-startup t |
| 21 | inhibit-startup-screen t |
| 22 | inhibit-startup-echo-area-message user-login-name |
| 23 | frame-inhibit-implied-resize t |
| 24 | frame-resize-pixelwise t |
| 25 | auto-mode-case-fold nil) |
| 26 | |
| 27 | ;; Skip UI chrome before first frame draws |
| 28 | (push '(menu-bar-lines . 0) default-frame-alist) |
| 29 | (push '(tool-bar-lines . 0) default-frame-alist) |
| 30 | (push '(vertical-scroll-bars) default-frame-alist) |
| 31 | (push '(background-color . "#121113") default-frame-alist) |
| 32 | (push '(foreground-color . "#c1c1c1") default-frame-alist) |
| 33 | |
| 34 | ;; macOS: blend the title bar into the frame background |
| 35 | (when (eq system-type 'darwin) |
| 36 | (push '(ns-transparent-titlebar . t) default-frame-alist) |
| 37 | (push '(ns-appearance . dark) default-frame-alist) |
| 38 | (setq ns-use-proxy-icon nil |
| 39 | frame-title-format nil)) |
| 40 | |
| 41 | ;; Keep native-comp noise quiet |
| 42 | (setq native-comp-async-report-warnings-errors 'silent) |