[Init] Add `db/after-init-load-files'

This allows to specify files to be loaded as the last step in `db/run-init'.
This way, custom code can be added to this Emacs configuration without
explicitly adding it to its configuration, making future merges easier.
This commit is contained in:
Daniel Borchmann 2019-12-13 16:07:36 +01:00
parent 485b7b84d3
commit 0579025806
Signed by: exot
GPG Key ID: 1C7071A75BB72D64

12
init.el
View File

@ -276,6 +276,13 @@
(unless (server-running-p)
(server-start))
;; Load custom code
(dolist (file db/after-init-load-files)
(message "Loading %s" file)
(with-demoted-errors "Error loading file: %s"
(load-file file)))
;; Finish
(message "Running main initialization ... done")
@ -299,6 +306,11 @@
:group 'personal-settings
:type 'string)
(defcustom db/after-init-load-files nil
"A list of files to be loaded by `db/run-init' as the last step."
:group 'personal-settings
:type '(repeat file))
;; * General configuration