summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-02-11 18:40:05 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-02-11 18:40:05 -0500
commit83c71bfd686ae36b0483a8278303de7e5fe4924d (patch)
tree05f84e4f3309ea13f898f9a4800ccff30e17b5b9
parentf46817b5968d596aaf5afde2a17dff497b819c17 (diff)
emacs: tidy XDG block, don't leak my variables
-rw-r--r--.config/emacs/init.el30
1 files 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)