summaryrefslogtreecommitdiff
path: root/.config/emacs/early-init.el
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-11-27 20:52:46 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-11-27 20:52:46 +0100
commitf8c344ea0e859f04a7bf33264ae237bb51eef7b1 (patch)
tree15fb0cea942a307fdf467b79f0518fb33fd1d0ff /.config/emacs/early-init.el
parentfef1d8682bf9d88ab52b9d2c8e0ca0b7c7cb6e80 (diff)
emacs: Make use of xdg.el
Diffstat (limited to '.config/emacs/early-init.el')
-rw-r--r--.config/emacs/early-init.el18
1 files changed, 6 insertions, 12 deletions
diff --git a/.config/emacs/early-init.el b/.config/emacs/early-init.el
index 634acc0..b48d643 100644
--- a/.config/emacs/early-init.el
+++ b/.config/emacs/early-init.el
@@ -2,25 +2,19 @@
;;; XDG Base Directory Specification Compliance
+(eval-when-compile
+ (require 'xdg))
+
(defconst mm-cache-directory
- (expand-file-name
- "emacs"
- (or (getenv "XDG_CACHE_HOME")
- (expand-file-name ".cache" (getenv "HOME"))))
+ (expand-file-name "emacs" (xdg-cache-home))
"The XDG-conformant cache directory that Emacs should use.")
(defconst mm-config-directory
- (expand-file-name
- "emacs"
- (or (getenv "XDG_CONFIG_HOME")
- (expand-file-name ".config" (getenv "HOME"))))
+ (expand-file-name "emacs" (xdg-config-home))
"The XDG-conformant config directory that Emacs should use.")
(defconst mm-data-directory
- (expand-file-name
- "emacs"
- (or (getenv "XDG_DATA_HOME")
- (expand-file-name ".local/share" (getenv "HOME"))))
+ (expand-file-name "emacs" (xdg-data-home))
"The XDG-conformant data directory that Emacs should use.")
(mapc (lambda (directory)