From 858ed5a8e768c5b456369dcda4603ab21f969222 Mon Sep 17 00:00:00 2001 From: John Turner Date: Sat, 25 Mar 2023 03:28:06 -0400 Subject: use early-init.el to allow setting native comp cache dir Some of the init.el setup code moved to early-init.el to allow loading our init modules in early init. Loading the native comp init module in init.el set the cache directory variable too late and resulted in the original directory still being populated with eln files. --- early-init.el | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 early-init.el (limited to 'early-init.el') diff --git a/early-init.el b/early-init.el new file mode 100644 index 0000000..de9661e --- /dev/null +++ b/early-init.el @@ -0,0 +1,40 @@ +(setq auth-source-save-behavior nil + auto-save-default nil + change-major-mode-with-file-name nil + custom-buffer-indent 4 + custom-file (file-name-concat user-emacs-directory "custom.el") + custom-theme-directory (file-name-concat user-emacs-directory "themes/") + debugger 'edebug + enable-local-variables :safe + inferior-lisp-program "sbcl" + inhibit-splash-screen t + make-backup-files nil + scheme-program-name "guile" + tab-width 4 + temporary-file-directory (file-name-concat (getenv "HOME") "tmp" ".emacs")) + +(setq-default display-fill-column-indicator-column 120 + indent-tabs-mode nil) + +(let* ((init-modules-wildcard + (file-name-concat user-emacs-directory "init" "*")) + (lisp-modules-wildcard + (file-name-concat user-emacs-directory "lisp" "*")) + (init-modules-files + (file-expand-wildcards init-modules-wildcard t)) + (lisp-modules-files + (file-expand-wildcards lisp-modules-wildcard t)) + (files + (append init-modules-files lisp-modules-files)) + (directories + (seq-filter 'file-directory-p files))) + (mapc (lambda (directory) + (add-to-list 'load-path directory)) + directories)) + +(mkdir temporary-file-directory t) + +(require 'init-garbage-collection) + +(when (and (>= emacs-major-version 29) (native-comp-available-p)) + (require 'init-native-comp)) -- cgit v1.2.3