Speed up init

This commit is contained in:
Case Duckworth 2021-12-30 23:08:10 -06:00
parent 8e4d03f44d
commit 165f7622a6
1 changed files with 19 additions and 4 deletions

View File

@ -21,10 +21,24 @@
;;; Code:
;; Message when loading a library. This is the only place I'm going to use a
;; `defadvice', and only because it's cleaner than defining a nonce function.
(defadvice load (before debug-log activate)
(message "Now loading: '%s'" (ad-get-arg 0)))
;; Message when loading a library.
(define-advice load (:before (feature &rest _))
(message "Now loading: '%s'" feature))
;;; Speed up init
(setq gc-cons-threshold most-positive-fixnum)
(add-hook 'emacs-startup-hook
(defun emacs-startup@restore-values ()
"Restore values set during early-init for speed."
(setq gc-cons-threshold 134217728 ; 128mb
;; I don't do the common `file-name-handler-alist' thing here
;; because of a weirdness where my Emacs doesn't know how to
;; load bookmark.el.gz when initializing.
)))
;;; Set up extra load paths and functionality
(push (locate-user-emacs-file "lisp") load-path)
(add-to-list 'load-path (locate-user-emacs-file "lisp/compat") :append)
@ -53,6 +67,7 @@ See `no-littering' for examples.")
(bottom . right)))
;; Fonts
(let ((font-name "Go Mono")
(font-size 105)
(variable-font-name "Go")