Add support for custom emacs.d location via FG42_EMACSD

This commit is contained in:
Sameer Rahmani 2024-02-16 12:44:50 +00:00
parent 2491b7f2cf
commit 55e9037aa6
Signed by: lxsameer
GPG Key ID: B0A4AF28AB9FD90B
1 changed files with 7 additions and 5 deletions

View File

@ -31,11 +31,13 @@
(setq tab-width 2)
(setq custom-file (format "%s/.fg42.custom.el" (getenv "HOME")))
(setq user-emacs-directory "~/.fg42/emacs.d")
(setq user-init-file
(format "%s/.fg42.el"
(getenv "HOME")))
(let ((emacsd (or (getenv "FG42_EMACSD") "~/.fg42/emacs.d")))
(setq custom-file (format "%s/.fg42.custom.el" emacsd))
(setq user-emacs-directory emacsd)
(setq user-init-file
(or (getenv "FG42_CONFIG_FILE")
(format "%s/.fg42.el"
(getenv "HOME"))))))
;; Load the customization file. In FG42 it is different than