about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--config.org5
1 files changed, 2 insertions, 3 deletions
diff --git a/config.org b/config.org index 3bfc426..a655267 100644 --- a/config.org +++ b/config.org
@@ -37,13 +37,12 @@ After the first run, the above ~init.el~ will be replaced by the tangled stuff h
37 (defun acdw/tangle-init () 37 (defun acdw/tangle-init ()
38 "If the current buffer is `init.org', the code blocks are tangled, 38 "If the current buffer is `init.org', the code blocks are tangled,
39 and the tangled file is compiled and loaded." 39 and the tangled file is compiled and loaded."
40 (interactive)
40 (when (equal (buffer-file-name) 41 (when (equal (buffer-file-name)
41 (expand-file-name (concat user-emacs-directory "config.org"))) 42 (expand-file-name (concat user-emacs-directory "config.org")))
42 ;; Avoid running hooks when tangling. 43 ;; Avoid running hooks when tangling.
43 (let ((prog-mode-hook nil)) 44 (let ((prog-mode-hook nil))
44 (org-babel-tangle) 45 (org-babel-tangle))))
45 (load-file (concat user-emacs-directory "early-init.el"))
46 (load-file (concat user-emacs-directory "init.el")))))
47 46
48 (add-hook 'after-save-hook #'acdw/tangle-init) 47 (add-hook 'after-save-hook #'acdw/tangle-init)
49#+END_SRC 48#+END_SRC