all repos — nixfiles @ af351fc049176b48f6e484d927c3293b1077b6e1

System and user configuration, managed by nix and home-manager

Emacs: Defer loading of async until tangling

Alan Pearce
commit

af351fc049176b48f6e484d927c3293b1077b6e1

parent

ec66ac0081b68df0220ab6f5fc0290b611bf9a6f

1 file changed, 1 insertion(+), 2 deletions(-)

jump to
M tag-emacs/emacs.d/init.orgtag-emacs/emacs.d/init.org
@@ -2482,13 +2482,12 @@ to the =after-save-hook= ensuring to always tangle and byte-compile
the =org=-document after changes. #+BEGIN_SRC emacs-lisp - (req-package async) - (defun tangle-init () "If the current buffer is 'init.org' the code-blocks are tangled, and the tangled file is compiled." (when (string-suffix-p "init.org" (buffer-file-name)) + (require 'async) (async-start `(lambda () ;; Avoid running hooks when tangling.