From f8c344ea0e859f04a7bf33264ae237bb51eef7b1 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 27 Nov 2024 20:52:46 +0100 Subject: emacs: Make use of xdg.el --- .config/emacs/early-init.el | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to '.config/emacs/early-init.el') 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) -- cgit v1.2.3