From 0579025806a9ee1aaed6b0d7a979f44f52ddbca3 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Fri, 13 Dec 2019 16:07:36 +0100 Subject: [PATCH] [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. --- init.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/init.el b/init.el index 0ecbe59..106d787 100644 --- a/init.el +++ b/init.el @@ -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