summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--user/emacs/early-init.el5
-rw-r--r--user/settings/emacs.nix5
2 files changed, 5 insertions, 5 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))
diff --git a/user/settings/emacs.nix b/user/settings/emacs.nix
index 5ed9eb4f..7f681bd1 100644
--- a/user/settings/emacs.nix
+++ b/user/settings/emacs.nix
@@ -6,8 +6,6 @@
 let
   inherit (pkgs) stdenv;
 
-  nativeCompileDirectory = "${config.xdg.cacheHome}/emacs/native-compile/";
-
   editorScript = pkgs.writeScriptBin "edit" ''
     #!${pkgs.runtimeShell}
     if [ -z "$1" ]; then
@@ -199,9 +197,6 @@ in
     extraConfig = ''
       (with-eval-after-load 'editorconfig
         (defvar editorconfig-exec-path "${pkgs.editorconfig-core-c}/bin/editorconfig"))
-      (when (featurep 'native-compile)
-        (defvar native-compile-target-directory "${nativeCompileDirectory}")
-        (add-to-list 'native-comp-eln-load-path "${nativeCompileDirectory}" :append))
     '' + lib.optionalString stdenv.isDarwin ''
       (with-eval-after-load 'files
         (defvar insert-directory-program "${pkgs.coreutils-prefixed}/bin/gls"))