summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--early-init.el55
1 files changed, 23 insertions, 32 deletions
diff --git a/early-init.el b/early-init.el index 137c04c..e2080a1 100644 --- a/early-init.el +++ b/early-init.el
@@ -21,26 +21,25 @@
21 21
22;;; Code: 22;;; Code:
23 23
24;;(setq debug-on-error t)
25(message "Loading early-init.el...")
26
27(define-advice load (:before (feature &rest _))
28 "Message the user when loading a library."
29 (with-temp-message (format "Now loading: '%s'" feature)))
30
31;;; Speed up init 24;;; Speed up init
32 25
26;; Garbage collection
33(setq gc-cons-threshold most-positive-fixnum) 27(setq gc-cons-threshold most-positive-fixnum)
34
35(add-hook 'emacs-startup-hook 28(add-hook 'emacs-startup-hook
36 (defun emacs-startup@restore-values () 29 (defun emacs-startup@restore-values ()
37 "Restore values set during early-init for speed." 30 "Restore values set during early-init for speed."
38 (setq gc-cons-threshold 134217728 ; 128mb 31 (setq gc-cons-threshold 134217728 ; 128mb
39 ;; I don't do the common `file-name-handler-alist' thing here
40 ;; because of a weirdness where my Emacs doesn't know how to
41 ;; load bookmark.el.gz when initializing.
42 ))) 32 )))
43 33
34;; Don't prematurely re-display
35(setq-default inhibit-redisplay t
36 inhibit-message t)
37(add-hook 'window-setup-hook
38 (defun window-setup@restore-values ()
39 "Restore values set during early-init for visuals."
40 (setq-default inhibit-redisplay nil
41 inhibit-message nil)))
42
44;;; Set up extra load paths and functionality 43;;; Set up extra load paths and functionality
45 44
46(push (locate-user-emacs-file "lisp") load-path) 45(push (locate-user-emacs-file "lisp") load-path)
@@ -54,12 +53,6 @@ See `no-littering' for examples.")
54(+define-dir sync/ (expand-file-name "~/Sync") 53(+define-dir sync/ (expand-file-name "~/Sync")
55 "My Syncthing directory.") 54 "My Syncthing directory.")
56 55
57;; Load system-specific changes.
58;; (progn (require 'system)
59;; (setq system-default-font "DejaVu Sans Mono"
60;; system-variable-pitch-font "DejaVu Sans")
61;; (system-settings-load))
62
63;;; Default frame settings 56;;; Default frame settings
64 57
65(setq default-frame-alist '((tool-bar-lines . 0) 58(setq default-frame-alist '((tool-bar-lines . 0)
@@ -77,21 +70,19 @@ See `no-littering' for examples.")
77;;; Fonts 70;;; Fonts
78(+with-ensure-after-init 71(+with-ensure-after-init
79 ;; Emoji fonts 72 ;; Emoji fonts
80 (+with-message "Adding emoji fonts" 73 (let ((ffl (font-family-list)))
81 (let ((ffl (font-family-list))) 74 (dolist (font '("Noto Color Emoji"
82 (dolist (font '("Noto Color Emoji" 75 "Noto Emoji"
83 "Noto Emoji" 76 "Segoe UI Emoji"
84 "Segoe UI Emoji" 77 "Apple Color Emoji"
85 "Apple Color Emoji" 78 "FreeSans"
86 "FreeSans" 79 "FreeMono"
87 "FreeMono" 80 "FreeSerif"
88 "FreeSerif" 81 "Unifont"
89 "Unifont" 82 "Symbola"))
90 "Symbola")) 83 (when (member font ffl)
91 (when (member font ffl) 84 (set-fontset-font t 'symbol
92 (message "Found font: %s" font) 85 (font-spec :family font) nil :append)))))
93 (set-fontset-font t 'symbol
94 (font-spec :family font) nil :append))))))
95 86
96;;; Packages 87;;; Packages
97 88