emacs: remove everything related to byte-compiling init file
authorAmin Bandali <bandali@gnu.org>
Fri, 10 May 2019 04:19:39 +0000 (00:19 -0400)
committerAmin Bandali <bandali@gnu.org>
Fri, 10 May 2019 04:19:39 +0000 (00:19 -0400)
.emacs.d/Makefile [deleted file]
.emacs.d/init.el

diff --git a/.emacs.d/Makefile b/.emacs.d/Makefile
deleted file mode 100644 (file)
index 37c1f3f..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-EMACS           ?= emacs
-EMACS_ARGUMENTS ?= -Q
-
-tangle-init: init.el
-init.el: init.org
-       @$(EMACS) $(EMACS_ARGUMENTS) \
-       --batch --load org \
-       --eval '(org-babel-tangle-file "init.org")' 2>&1
-
-build-init:
-       @$(EMACS) $(EMACS_ARGUMENTS) \
-       --batch -l init.el --eval '(a/build-init)' 2>&1
-
-ti: tangle-init
-bi: build-init
-
-clean: FORCE
-               @rm -f init.elc
-
-.PHONY: clean tangle-init build-init
-.FORCE:
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