Add function: load-user-lisp
This commit is contained in:
@@ -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
|
||||
|
||||
10
init.el
10
init.el
@@ -14,6 +14,9 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
;;; Load user-pre-init.el
|
||||
(load-user-lisp "user-pre-init.el")
|
||||
|
||||
;;; package: Set package archives for package installation
|
||||
(progn
|
||||
(require 'package)
|
||||
@@ -49,11 +52,8 @@
|
||||
(eval-when-compile
|
||||
(require 'use-package)))
|
||||
|
||||
;;; Load user-init.el
|
||||
(let ((user-init-file (expand-file-name "user-init.el"
|
||||
user-emacs-directory)))
|
||||
(when (file-exists-p user-init-file)
|
||||
(load user-init-file)))
|
||||
;;; Load user-pre-init.el
|
||||
(load-user-lisp "user-post-init.el")
|
||||
|
||||
(provide 'init)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user