diff --git a/tools/emacs/init/bindings.el b/tools/emacs/config/bindings.el similarity index 100% rename from tools/emacs/init/bindings.el rename to tools/emacs/config/bindings.el diff --git a/tools/emacs/init/custom.el b/tools/emacs/config/custom.el similarity index 100% rename from tools/emacs/init/custom.el rename to tools/emacs/config/custom.el diff --git a/tools/emacs/init/desktop.el b/tools/emacs/config/desktop.el similarity index 100% rename from tools/emacs/init/desktop.el rename to tools/emacs/config/desktop.el diff --git a/tools/emacs/init/eshell-setup.el b/tools/emacs/config/eshell-setup.el similarity index 100% rename from tools/emacs/init/eshell-setup.el rename to tools/emacs/config/eshell-setup.el diff --git a/tools/emacs/init/functions.el b/tools/emacs/config/functions.el similarity index 100% rename from tools/emacs/init/functions.el rename to tools/emacs/config/functions.el diff --git a/tools/emacs/init.el b/tools/emacs/config/init.el similarity index 84% rename from tools/emacs/init.el rename to tools/emacs/config/init.el index eb7846143..208611796 100644 --- a/tools/emacs/init.el +++ b/tools/emacs/config/init.el @@ -8,9 +8,6 @@ (package-initialize) -;; Add 'init' folder that contains other settings to load. -(add-to-list 'load-path (concat user-emacs-directory "init")) - ;; Initialise all packages installed via Nix. ;; ;; TODO: Generate this section in Nix for all packages that do not @@ -140,27 +137,24 @@ ;; Seed RNG (random t) -(defun load-other-settings () - (mapc 'require '(desktop - mail-setup - look-and-feel - functions - settings - modes - bindings - term-setup - eshell-setup)) - (telephone-line-setup) - (ace-window-display-mode)) +;; Load all other Emacs configuration. These configurations are +;; added to `load-path' by Nix. +(mapc 'require '(desktop + mail-setup + look-and-feel + functions + settings + modes + bindings + term-setup + eshell-setup)) +(telephone-line-setup) +(ace-window-display-mode) -;; If a local configuration file exists, it should be loaded. +;; If a local configuration file exists, it should be loaded. No +;; other configuration comes from `user-emacs-directory'. (let ((local-file (expand-file-name (f-join user-emacs-directory "local.el")))) (when (f-exists? local-file) (load local-file))) -;; Some packages can only be initialised after the rest of the -;; settings has been applied: - -(add-hook 'after-init-hook 'load-other-settings) -(put 'narrow-to-region 'disabled nil) -(put 'upcase-region 'disabled nil) +(provide 'init) diff --git a/tools/emacs/init/look-and-feel.el b/tools/emacs/config/look-and-feel.el similarity index 100% rename from tools/emacs/init/look-and-feel.el rename to tools/emacs/config/look-and-feel.el diff --git a/tools/emacs/init/mail-setup.el b/tools/emacs/config/mail-setup.el similarity index 100% rename from tools/emacs/init/mail-setup.el rename to tools/emacs/config/mail-setup.el diff --git a/tools/emacs/init/modes.el b/tools/emacs/config/modes.el similarity index 100% rename from tools/emacs/init/modes.el rename to tools/emacs/config/modes.el diff --git a/tools/emacs/init/settings.el b/tools/emacs/config/settings.el similarity index 100% rename from tools/emacs/init/settings.el rename to tools/emacs/config/settings.el diff --git a/tools/emacs/init/term-setup.el b/tools/emacs/config/term-setup.el similarity index 100% rename from tools/emacs/init/term-setup.el rename to tools/emacs/config/term-setup.el