diff options
author | Alan Pearce | 2020-08-26 14:02:23 +0200 |
---|---|---|
committer | Alan Pearce | 2020-08-26 14:03:50 +0200 |
commit | 3937dbd373054643862bed55e11280d2f34b6eeb (patch) | |
tree | 12c19cb7f134d7564107024c3cde68fe887f35e5 /user/emacs | |
parent | 0f6a0e57504c07aa9f93f6d23a56555341ee5124 (diff) | |
download | nixfiles-3937dbd373054643862bed55e11280d2f34b6eeb.tar.lz nixfiles-3937dbd373054643862bed55e11280d2f34b6eeb.tar.zst nixfiles-3937dbd373054643862bed55e11280d2f34b6eeb.zip |
BC! Emacs: move config to XDG config dir
Diffstat (limited to 'user/emacs')
-rw-r--r-- | user/emacs/init.el | 5 |
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)) |