Created
March 4, 2020 19:48
-
-
Save brainplot/1ea347e9134a6fcde70dddfea3e35056 to your computer and use it in GitHub Desktop.
Byte-compile emacs configuration upon startup, if it's changed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let ((config-org (concat user-emacs-directory "main-config.org")) | |
(config-el (concat user-emacs-directory "main-config.el"))) | |
(if (file-newer-than-file-p config-org config-el) | |
(progn | |
(message "TANGLING THE CONFIG") | |
(org-babel-load-file config-org) | |
(run-with-idle-timer 10 nil | |
(lambda () | |
(byte-compile-file config-el) | |
(message "CONFIG BYTE COMPILED")))) | |
(load-file config-el))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment