summary refs log tree commit diff stats
path: root/user/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'user/emacs')
-rw-r--r--user/emacs/init.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index a3dd37e1..d5396f75 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -49,7 +49,7 @@
 
 ;;; Customize
 
-(setq custom-file "~/.emacs.d/custom.el")
+(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
 (load custom-file :noerror :nomessage)
 
 (use-package crux
@@ -576,7 +576,8 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
 ;; I like to keep my backups out of regular folders.  I tell emacs to use
 ;; a subfolder of its configuration directory for that.  Also, use the
 ;; trash for deleting on OS X.
-(let ((backup-dir (expand-file-name "~/.emacs.d/backups/")))
+(let ((backup-dir (expand-file-name "emacs" (or (getenv "XDG_DATA_HOME")
+                                                "~/.local/share"))))
   (unless (file-directory-p backup-dir)
     (make-directory backup-dir))
   (setq backup-directory-alist `((".*" . ,backup-dir))