emacs.d

My Emacs configuration
git clone https://git.jamzattack.xyz/emacs.d
Log | Files | Refs | LICENSE

commit 7445fa2a2718b617e6d14db927ce34c6c3092fd3
parent eb8de0a7950674eee98d06b26be90875c1f8e4a8
Author: Jamie Beardslee <beardsleejamie@gmail.com>
Date:   Wed, 25 Mar 2020 20:02:47 +1300

in init.el: adjusted function 'config-load' so that it calls 'require' rather than 'load-file'

Diffstat:
Minit.el | 27++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/init.el b/init.el @@ -1,3 +1,4 @@ +;-*- lexical-binding: t; -*- ;; Prefer newer files rather than old byte-compiled ones. (setq load-prefer-newer t) @@ -20,19 +21,23 @@ config.el, then repeat." (el (expand-file-name "config.el" dir)) (elc (expand-file-name "config.elc" dir)) (org (expand-file-name "config.org" user-emacs-directory))) - (cond ((file-exists-p elc) - (progn (when recompile - (delete-file elc) - (delete-file el) - (config-load)) - (load-file elc))) + (cond (recompile + (delete-file elc) + (delete-file el) + (config-load)) + ((file-exists-p elc) + (when (featurep 'config.el) + (unload-feature 'config.el)) + (require 'config.el elc)) ((file-exists-p el) - (progn (load-file el) - (byte-compile-file el))) + (when (featurep 'config.el) + (unload-feature 'config.el)) + (require 'config.el el)) ((file-exists-p org) - (progn (require 'org) - (org-babel-tangle-file org) - (config-load)))))) + (require 'org) + (org-babel-tangle-file org) + (config-load)) + (t (user-error "file \"%s\" not found" org))))) (config-load)