Files
.emacs.d/early-init.el

50 lines
1.6 KiB
EmacsLisp
Raw Normal View History

2025-12-14 04:51:24 +11:00
;; -*- lexical-binding: t -*-
2026-02-25 22:18:53 +11:00
(setq gc-cons-threshold most-positive-fixnum
gc-cons-percentage 0.6)
;; After init, use gcmh
(add-hook 'emacs-startup-hook
(lambda ()
(setq gc-cons-threshold #x6400000
gc-cons-percentage 0.1)))
2025-12-16 09:41:13 +11:00
(setq package-enable-at-startup nil)
2025-12-14 21:09:42 +11:00
2026-03-20 00:44:25 +11:00
;; (setq native-comp-deferred-compilation t)
(setq native-comp-async-report-warnings-errors nil)
2025-12-15 18:20:19 +11:00
(add-to-list 'load-path (expand-file-name "lisp/" user-emacs-directory))
2025-12-22 21:20:02 +11:00
(setq use-package-enable-imenu-support t)
(setq load-prefer-newer noninteractive)
2025-12-16 09:41:13 +11:00
2025-12-14 21:09:42 +11:00
(prefer-coding-system 'utf-8)
;; Inhibit resizing frame
(setq frame-inhibit-implied-resize t)
2025-12-15 18:20:19 +11:00
;; Optimize `auto-mode-alist`
(setq auto-mode-case-fold nil)
(unless (or (daemonp) noninteractive init-file-debug)
;; Temporarily suppress file-handler processing to speed up startup
(let ((default-handlers file-name-handler-alist))
(setq file-name-handler-alist nil)
;; Recover handlers after startup
(add-hook 'emacs-startup-hook
(lambda ()
(setq file-name-handler-alist
(delete-dups (append file-name-handler-alist default-handlers))))
101)))
2025-12-14 21:09:42 +11:00
;; Faster to disable these here (before they've been initialized)
(push '(menu-bar-lines . 0) default-frame-alist)
(push '(tool-bar-lines . 0) default-frame-alist)
2026-03-14 11:42:48 +11:00
(push '(vertical-scroll-bars . 0) default-frame-alist)
2025-12-14 21:09:42 +11:00
(when (featurep 'ns)
2025-12-17 03:29:19 +11:00
(push '(ns-transparent-titlebar . t) default-frame-alist))
2026-02-27 02:32:57 +11:00
;; (push '(ns-appearance . light) default-frame-alist))
2025-12-14 21:09:42 +11:00
;; Prevent flash of unstyled mode line
2026-03-14 19:46:30 +11:00
(setq mode-line-format nil)
2025-12-14 21:09:42 +11:00
2025-12-17 03:29:19 +11:00
(provide 'early-init)