diff options
author | John Turner <jturner.usa@gmail.com> | 2023-03-25 03:28:06 -0400 |
---|---|---|
committer | John Turner <jturner.usa@gmail.com> | 2023-03-26 00:20:56 -0400 |
commit | 858ed5a8e768c5b456369dcda4603ab21f969222 (patch) | |
tree | 4c51dceefae7b64c69f9262bae5e5e64d8e2e6e5 /early-init.el | |
parent | 0487a351477b5fca13461977a008bc2b3e15098d (diff) | |
download | emacs.d-858ed5a8e768c5b456369dcda4603ab21f969222.tar.gz |
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.
Diffstat (limited to 'early-init.el')
-rw-r--r-- | early-init.el | 40 |
1 files changed, 40 insertions, 0 deletions
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)) |