X-Git-Url: https://git.shemshak.org/gitweb.cgi/~bandali/configs/blobdiff_plain/49e9503b56514c9229de30a7e33cdff479676676..d70868916476cde3b4a36eced402b629dd27e416:/.emacs.d/init.el diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 930aa9f..c7eac7e 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -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)" @@ -78,10 +75,6 @@ ;; Solid rocket booster ignition... -(defun a/build-init () - (a/bootstrap-straight) - (byte-compile-file "init.el")) - (a/bootstrap-straight) ;; We have lift off! @@ -104,9 +97,7 @@ (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 @@ -122,6 +113,12 @@ (setq use-package-always-defer t) (require 'bind-key) +;; comment macro, useful for commenting out multiple sexps at a time +(defmacro comment (&rest _) + "Comment out one or more s-expressions." + (declare (indent defun)) + nil) + (use-package no-littering :demand t :config @@ -407,16 +404,6 @@ (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) @@ -432,19 +419,13 @@ (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