mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-09 12:57:25 -05:00
tweak: centralize profile loader script
Because this file serves as a global manifest for Doom's profiles, it should be kept in a central location for any Doom instance to consult, rather than per-instance. Plus, post-v3 Doom will only write files to $XDG_*_HOME and $TMPDIR, therefore I'd like to avoid writing to $EMACSDIR. This change shouldn't affect end-users, in any case. Run 'doom sync' to regenerate the file, which should happen when you run 'doom upgrade' anyway.
This commit is contained in:
@ -33,9 +33,15 @@ Can be changed externally by setting $DOOMPROFILELOADPATH to a colon-delimited
|
||||
list of paths or profile config files (semi-colon delimited on Windows).")
|
||||
|
||||
(defvar doom-profile-load-file
|
||||
(if-let (loader (getenv-internal "DOOMPROFILELOADFILE"))
|
||||
(expand-file-name loader doom-emacs-dir)
|
||||
(file-name-concat doom-emacs-dir (format "profiles/load.el" emacs-major-version)))
|
||||
;; REVIEW: Derive from `doom-data-dir' in v3
|
||||
(expand-file-name
|
||||
(format (or (getenv-internal "DOOMPROFILELOADFILE")
|
||||
(file-name-concat (if doom--system-windows-p "doomemacs/data" "doom")
|
||||
"profiles.%d.el"))
|
||||
emacs-major-version)
|
||||
(or (if doom--system-windows-p (getenv-internal "LOCALAPPDATA"))
|
||||
(getenv-internal "XDG_DATA_HOME")
|
||||
"~/.local/share"))
|
||||
"Where Doom writes its interactive profile loader script.
|
||||
|
||||
Can be changed externally by setting $DOOMPROFILELOADFILE.")
|
||||
|
Reference in New Issue
Block a user