From 01df2ad2016c836dab41650a1b694811d5d9d93a Mon Sep 17 00:00:00 2001 From: Jessie Hildebrandt Date: Sat, 4 Aug 2018 19:45:20 -0400 Subject: [PATCH] Enable automatic init file byte-compilation --- init.el | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index be6683c..52b4b7f 100644 --- a/init.el +++ b/init.el @@ -179,8 +179,18 @@ (package-install 'use-package)) ;; Require use-package. -(eval-when-compile - (require 'use-package)) +(require 'use-package) + +;;==================== +;; Init File +;;==================== + +;; Make sure that the latest version of the init file is always byte-compiled. +(if (file-newer-than-file-p + (concat user-emacs-directory "init.el") + (concat user-emacs-directory "init.elc")) + (save-restriction + (byte-compile-file (concat user-emacs-directory "init.el")))) ;;==================== ;; Garbage Collector