diff --git a/modules/config/literate/config.el b/modules/config/literate/init.el similarity index 68% rename from modules/config/literate/config.el rename to modules/config/literate/init.el index 05e2a870e..a7a7c19e7 100644 --- a/modules/config/literate/config.el +++ b/modules/config/literate/init.el @@ -1,3 +1,5 @@ +;;; config/literate/init.el -*- lexical-binding: t; -*- + ;;; config/literate/config.el -*- lexical-binding: t; -*- (defvar +literate-config-file @@ -15,21 +17,19 @@ byte-compiled from.") "Tangles & compiles `+literate-config-file' if it has changed. If LOAD is non-nil, load it too!" (let ((org +literate-config-file) - (elc (concat +literate-config-dest-file "c"))) - ;; If config is pre-compiled, then load that - (when (file-newer-than-file-p org elc) + (el +literate-config-dest-file)) + (when (file-newer-than-file-p org el) (message "Compiling your literate config...") - ;; We tangle in a separate, blank process because loading it here would load - ;; all of :lang org, which will be more expensive than it needs to be. + + ;; We tangle in a separate, blank process because loading it here would + ;; load all of :lang org (very expensive!). We only need ob-tangle. (or (zerop (call-process "emacs" nil nil nil "-q" "--batch" "-l" "ob-tangle" "--eval" (format "(org-babel-tangle-file \"%s\" \"%s\" \"emacs-lisp\")" - org +literate-config-dest-file))) - (error "There was a problem tangling your literate config!")) - ;; Then byte-compile it! - (require 'bytecomp) - (byte-compile-file +literate-config-dest-file load) + org el))) + (warn "There was a problem tangling your literate config!")) + (message "Done!")))) ;; Let 'er rip!