emacs: remove everything related to byte-compiling init file
[~bandali/configs] / .emacs.d / init.el
index 930aa9f..b07c683 100644 (file)
@@ -24,9 +24,6 @@
 
 ;;; Code:
 
-(defvar a/byte-compiled-init nil
-  "If non-nil, byte-(re)compile init.el on successful tangles.")
-
 (defvar a/before-user-init-time (current-time)
   "Value of `current-time' when Emacs begins loading `user-init-file'.")
 (message "Loading Emacs...done (%.3fs)"
 
 ;; Solid rocket booster ignition...
 
-(defun a/build-init ()
-  (a/bootstrap-straight)
-  (byte-compile-file "init.el"))
-
 (a/bootstrap-straight)
 
 ;; We have lift off!
   (interactive)
   (straight-transaction
     (straight-mark-transaction-as-init)
-    (load (if a/byte-compiled-init
-              (concat (file-name-sans-extension user-init-file) ".elc")
-            user-init-file))))
+    (load user-init-file)))
 
 (straight-use-package 'use-package)
 (if nil                             ; set to t when need to debug init
   (defvar a/show-async-tangle-time nil
     "Show the time spent tangling the file.")
 
-  (defvar a/async-tangle-post-compile
-    (when a/byte-compiled-init "make build-init")
-    "If non-nil, pass to `compile' after successful tangle.")
-
-  ;; TODO: look into why directly byte-compiling init.el causes a
-  ;; number of problems, including magit-status not loading (busy
-  ;; waiting).
-  (defvar a/async-tangle-byte-recompile nil
-    "If non-nil, byte-recompile the file on successful tangle.")
-
   (defun a/async-babel-tangle ()
     "Tangle org file asynchronously."
     (interactive)
        (unless a/show-async-tangle-results
          `(lambda (result)
             (if result
-                (progn
-                  ;; (setq byte-compile-warnings '(not noruntime unresolved))
-                  (message "Tangled %s%s"
-                           ,file-nodir
-                           (if a/show-async-tangle-time
-                               (format " (%.3fs)"
-                                       (float-time (time-subtract (current-time)
-                                                                  ',file-tangle-start-time)))
-                             ""))
-                  (when a/async-tangle-post-compile
-                    (compile a/async-tangle-post-compile))
-                  (when a/async-tangle-byte-recompile
-                    (byte-recompile-file (concat ,file-noext ".el"))))
+                (message "Tangled %s%s"
+                         ,file-nodir
+                         (if a/show-async-tangle-time
+                             (format " (%.3fs)"
+                                     (float-time (time-subtract (current-time)
+                                                                ',file-tangle-start-time)))
+                           ""))
               (message "Tangling %s failed" ,file-nodir))))))))
 
 (add-to-list