Add function: load-user-lisp

This commit is contained in:
James Cherti
2024-06-19 15:19:30 -04:00
parent 18d985eed0
commit 0c3aad6d99
2 changed files with 16 additions and 5 deletions

View File

@@ -14,6 +14,15 @@
;;; Code:
(defun load-user-lisp (filename)
"Execute a file of Lisp code named FILENAME."
(let ((user-init-file (expand-file-name filename
user-emacs-directory)))
(when (file-exists-p user-init-file)
(load user-init-file))))
(load-user-lisp "user-pre-early-init.el")
;; Garbage collection significantly affects startup times. This setting delays
;; garbage collection during startup but will be reset later.
(setq gc-cons-threshold most-positive-fixnum)
@@ -40,6 +49,8 @@
(when (fboundp 'horizontal-scroll-bar-mode)
(horizontal-scroll-bar-mode -1))
(load-user-lisp "user-post-early-init.el")
(provide 'early-init)
;;; early-init.el ends here