From be656cafda5c78cdd707475236e628ec9c5e4e13 Mon Sep 17 00:00:00 2001 From: Blendoit Date: Tue, 6 Oct 2020 21:27:06 -0700 Subject: Byte-compiled literate config! <3 --- init.el | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 228062c..81157c0 100644 --- a/init.el +++ b/init.el @@ -5,18 +5,17 @@ ;;; Code: - ;; First of all, we indicate the path to our literate configuration file. -(setq my/literate-config (concat user-emacs-directory "smart-documents")) +(setq my/literate-config (concat user-emacs-directory "smart-documents.org")) ;; Emacs will startup faster next time, because it will load ;; a byte-compiled version of our literate configuration file. -(cond ((file-exists-p (concat my/literate-config ".elc")) - (load (concat my/literate-config ".elc"))) - ((file-exists-p (concat my/literate-config ".el")) - (load (concat my/literate-config ".el"))) - ((file-exists-p (concat my/literate-config ".org")) - (org-babel-load-file (concat my/literate-config ".org"))) +(cond ((file-exists-p (concat (file-name-sans-extension my/literate-config) ".elc")) + (load (concat (file-name-sans-extension my/literate-config) ".elc"))) + ((file-exists-p (concat (file-name-sans-extension my/literate-config) ".el")) + (load (concat (file-name-sans-extension my/literate-config) ".el"))) + ((file-exists-p my/literate-config) + (org-babel-load-file my/literate-config)) (t (message "There appears to be no literate configuration file. Reinstall?"))) (provide 'init) -- cgit v1.2.3