From b86135cdd029a6f146d2026e3f488c9f439748c2 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 23 Aug 2020 17:19:53 +0100 Subject: ~use-package -> autoload --- Emacs/.config/emacs/init.el | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'Emacs') diff --git a/Emacs/.config/emacs/init.el b/Emacs/.config/emacs/init.el index f3d6aa4..b82fb95 100644 --- a/Emacs/.config/emacs/init.el +++ b/Emacs/.config/emacs/init.el @@ -44,7 +44,16 @@ :initial-value t) (file-exists-p (car +literate/output-files)))) +(autoload #'org-babel-tangle-file "ob-tangle") +(defun +literate/compile-config () + "Compile all files in +literate/org-files via org-babel-tangle." + (mapc #'org-babel-tangle-file +literate/org-files)) + ;; Killing Emacs hook +(add-hook + 'kill-emacs-hook + #'+literate/compile-config) + (unless (daemonp) (add-hook 'kill-emacs-hook @@ -52,17 +61,8 @@ (unless (y-or-n-p "Really exit emacs? ") (keyboard-quit))))) -(with-eval-after-load "ob-tangle" - (defun +literate/compile-config () - "Compile all files in +literate/org-files via org-babel-tangle." - (mapc #'org-babel-tangle-file +literate/org-files)) - - (add-hook - 'kill-emacs-hook - #'+literate/compile-config) - - (unless (+literate/org-files-exist) - (+literate/compile-config))) +(unless (+literate/org-files-exist) + (+literate/compile-config)) (+literate/load-config) @@ -74,7 +74,7 @@ (require 'org) (require 'eglot)) -(setq gc-cons-threshold 8000) +(setq gc-cons-threshold 20000000) (custom-set-variables ;; custom-set-variables was added by Custom. -- cgit v1.2.3-13-gbd6f