From 83c71bfd686ae36b0483a8278303de7e5fe4924d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 11 Feb 2017 18:40:05 -0500 Subject: emacs: tidy XDG block, don't leak my variables --- .config/emacs/init.el | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 9fe3b9c..88cf870 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -2,20 +2,22 @@ ;; Hey, Emacs: -*- Indent-tabs-mode: nil -*- ;; Without (advice-add) it should work in older versions of Emacs 24. ;;;; Use XDG-ish locations ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(setq xdg-cache-home (file-name-as-directory (or (getenv "XDG_CACHE_HOME") "~/.cache"))) -(setq - package-user-dir (concat xdg-cache-home "emacs/elpa") - ido-save-directory-list-file (concat xdg-cache-home "emacs/ido.last.el") - el-get-dir (concat xdg-cache-home "emacs/el-get/") - eshell-directory-name (concat xdg-cache-home "emacs/eshell/") - wl-score-files-directory (concat xdg-cache-home "emacs/wl-score-files/") - elmo-msgdb-directory (concat xdg-cache-home "emacs/elmo-msgdb/") - elmo-cache-directory (concat xdg-cache-home "emacs/elmo-cache/") - auto-save-list-file-prefix (concat xdg-cache-home "emacs/auto-save-list/saves-") - tramp-persistency-file-name (concat xdg-cache-home "emacs/tramp-cache.el") - custom-file (concat user-emacs-directory "custom.el") - wl-init-file (concat user-emacs-directory "wl.el") - ) +(let ((xdg-cache-home (file-name-as-directory (or (getenv "XDG_CACHE_HOME") "~/.cache"))) + (xdg-data-home (file-name-as-directory (or (getenv "XDG_DATA_HOME") "~/.local/share")))) + (setq + custom-file (concat user-emacs-directory "custom.el") + wl-init-file (concat user-emacs-directory "wl.el") + eshell-directory-name (concat xdg-data-home "emacs/eshell/") ;; actually should be split betweenc config and data + ido-save-directory-list-file (concat xdg-data-home "emacs/ido.last.el") + + package-user-dir (concat xdg-cache-home "emacs/elpa") + el-get-dir (concat xdg-cache-home "emacs/el-get/") + wl-score-files-directory (concat xdg-cache-home "emacs/wl-score-files/") + elmo-msgdb-directory (concat xdg-cache-home "emacs/elmo-msgdb/") + elmo-cache-directory (concat xdg-cache-home "emacs/elmo-cache/") + auto-save-list-file-prefix (concat xdg-cache-home "emacs/auto-save-list/saves-") + tramp-persistency-file-name (concat xdg-cache-home "emacs/tramp-cache.el") + )) ;;;; The basics that I can't use Emacs without ;;;;;;;;;;;;;;;;;;;;;;; (show-paren-mode 1) -- cgit v1.1-4-g5e80