summary refs log tree commit diff stats
path: root/user/emacs
diff options
context:
space:
mode:
authorAlan Pearce2024-05-25 05:39:51 +0200
committerAlan Pearce2024-05-25 05:39:51 +0200
commitdaa739e6f5f1754d9861924018569131beb3bf88 (patch)
tree1c7088802ed2c7d53065276be941e8eb6c589020 /user/emacs
parentb09a6d6d7894650331ec1e26de9daacac74cb3d4 (diff)
downloadnixfiles-daa739e6f5f1754d9861924018569131beb3bf88.tar.lz
nixfiles-daa739e6f5f1754d9861924018569131beb3bf88.tar.zst
nixfiles-daa739e6f5f1754d9861924018569131beb3bf88.zip
Emacs: set eln cache directory properly
1. It needs to be set in early-init.el
2. It should not be the last value of `native-comp-eln-load-path`, as
that is expected to be a system directory
Diffstat (limited to 'user/emacs')
-rw-r--r--user/emacs/early-init.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/user/emacs/early-init.el b/user/emacs/early-init.el
index 8617e3f2..d24c661d 100644
--- a/user/emacs/early-init.el
+++ b/user/emacs/early-init.el
@@ -4,6 +4,11 @@
       frame-inhibit-implied-resize t
       byte-compile-warnings '(not free-vars unresolved noruntime lexical make-local cl-functions))
 
+(require 'xdg)
+(startup-redirect-eln-cache
+ (expand-file-name "emacs/native-compile"
+                   (xdg-cache-home)))
+
 ;; Disable all the bars, unless on macOS, in which case, keep the menu bar.
 (unless (eq window-system 'ns)
   (menu-bar-mode -1))