Add function: load-user-lisp
This commit is contained in:
@@ -14,6 +14,15 @@
|
|||||||
|
|
||||||
;;; Code:
|
;;; 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 significantly affects startup times. This setting delays
|
||||||
;; garbage collection during startup but will be reset later.
|
;; garbage collection during startup but will be reset later.
|
||||||
(setq gc-cons-threshold most-positive-fixnum)
|
(setq gc-cons-threshold most-positive-fixnum)
|
||||||
@@ -40,6 +49,8 @@
|
|||||||
(when (fboundp 'horizontal-scroll-bar-mode)
|
(when (fboundp 'horizontal-scroll-bar-mode)
|
||||||
(horizontal-scroll-bar-mode -1))
|
(horizontal-scroll-bar-mode -1))
|
||||||
|
|
||||||
|
(load-user-lisp "user-post-early-init.el")
|
||||||
|
|
||||||
(provide 'early-init)
|
(provide 'early-init)
|
||||||
|
|
||||||
;;; early-init.el ends here
|
;;; early-init.el ends here
|
||||||
|
|||||||
10
init.el
10
init.el
@@ -14,6 +14,9 @@
|
|||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
;;; Load user-pre-init.el
|
||||||
|
(load-user-lisp "user-pre-init.el")
|
||||||
|
|
||||||
;;; package: Set package archives for package installation
|
;;; package: Set package archives for package installation
|
||||||
(progn
|
(progn
|
||||||
(require 'package)
|
(require 'package)
|
||||||
@@ -49,11 +52,8 @@
|
|||||||
(eval-when-compile
|
(eval-when-compile
|
||||||
(require 'use-package)))
|
(require 'use-package)))
|
||||||
|
|
||||||
;;; Load user-init.el
|
;;; Load user-pre-init.el
|
||||||
(let ((user-init-file (expand-file-name "user-init.el"
|
(load-user-lisp "user-post-init.el")
|
||||||
user-emacs-directory)))
|
|
||||||
(when (file-exists-p user-init-file)
|
|
||||||
(load user-init-file)))
|
|
||||||
|
|
||||||
(provide 'init)
|
(provide 'init)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user