···42;;; Set up native-comp load path.
43(when (featurep 'native-compile)
44 ;; Append native-comp subdirectories from `NIX_PROFILES'.
0000045 (setq native-comp-eln-load-path
46- (append (mapcar (lambda (profile-dir)
047 (concat profile-dir "/share/emacs/native-lisp/"))
48 (nix--profile-paths))
49- native-comp-eln-load-path)))
5051;;; Make `woman' find the man pages
52(defvar woman-manpath)
···42;;; Set up native-comp load path.
43(when (featurep 'native-compile)
44 ;; Append native-comp subdirectories from `NIX_PROFILES'.
45+ ;; Emacs writes asynchronous native-compilation files to the first writable directory[1].
46+ ;; At this time, (car native-comp-eln-load-path) is a writable one in `user-emacs-directory'[2].
47+ ;; So we keep that one unchanged.
48+ ;; [1]: info "(elisp) Native-Compilation Variables"
49+ ;; [2]: https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/startup.el?id=3685387e609753293c4518be75e77c659c3b2d8d#n601
50 (setq native-comp-eln-load-path
51+ (append (list (car native-comp-eln-load-path))
52+ (mapcar (lambda (profile-dir)
53 (concat profile-dir "/share/emacs/native-lisp/"))
54 (nix--profile-paths))
55+ (cdr native-comp-eln-load-path))))
5657;;; Make `woman' find the man pages
58(defvar woman-manpath)