Fix daemon startup optimizations and buffer initialization

- Remove (not (daemonp)) checks from early-init.el performance blocks.
  This allows Emacs to properly optimize file name handlers, UI rendering
  suppression, and frame resizing when starting as a background server.
- Move initial-major-mode and initial-scratch-message from
  early-init.el to init.el to prevent silent overwrites by custom.el.
- Move default-input-method to init.el.
This commit is contained in:
James Cherti
2026-02-24 22:39:00 -05:00
parent e384055417
commit 9ea9d4eb51
2 changed files with 15 additions and 20 deletions

13
init.el
View File

@@ -28,6 +28,19 @@
;;; Before package
;; The initial buffer is created during startup even in non-interactive
;; sessions, and its major mode is fully initialized. Modes like `text-mode',
;; `org-mode', or even the default `lisp-interaction-mode' load extra packages
;; and run hooks, which can slow down startup.
;;
;; Using `fundamental-mode' for the initial buffer to avoid unnecessary
;; startup overhead.
(setq initial-major-mode 'fundamental-mode
initial-scratch-message nil)
;; Set-language-environment sets default-input-method, which is unwanted.
(setq default-input-method nil)
;; Ask the user whether to terminate asynchronous compilations on exit.
;; This prevents native compilation from leaving temporary files in /tmp.
(setq native-comp-async-query-on-exit t)