From 11d351f629d04c52aa892a6e707a97a4e5515e18 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Mon, 1 May 2023 10:06:49 +0200 Subject: [PATCH] Emacs: Read cache directory from ~ if no XDG is set --- .config/emacs/site-lisp/core/dot-core-variables.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/emacs/site-lisp/core/dot-core-variables.el b/.config/emacs/site-lisp/core/dot-core-variables.el index 6cef076..1766032 100644 --- a/.config/emacs/site-lisp/core/dot-core-variables.el +++ b/.config/emacs/site-lisp/core/dot-core-variables.el @@ -17,8 +17,8 @@ (defvar dot-etc-dir (expand-file-name "etc" dot-emacs-dir) "Directory for non-volatile storage.") ; ~/.config/emacs/etc -;; TODO: remove "-modules" when switching over -(defvar dot-cache-dir (expand-file-name "emacs" (getenv "XDG_CACHE_HOME")) +(defvar dot-cache-dir + (expand-file-name "emacs" (if (getenv "XDG_CACHE_HOME") (getenv "XDG_CACHE_HOME") "~/.cache")) "Directory for cache data.") ; ~/.cache/emacs (defvar dot/leader-key "SPC"