Less messy backup files
This commit is contained in:
parent
35d2b6a97d
commit
ed802de0c7
12
init.el
12
init.el
|
@ -49,6 +49,18 @@
|
|||
(add-hook 'lisp-mode-hook 'disable-tabs)
|
||||
(add-hook 'emacs-lisp-mode-hook 'disable-tabs)
|
||||
|
||||
(let ((savedir (concat (file-name-as-directory (getenv "XDG_DATA_HOME")) "emacs/autosave/")))
|
||||
(make-directory savedir t)
|
||||
(setq backup-directory-alist `(("." . ,savedir)))
|
||||
(setq auto-save-list-file-prefix (concat savedir ".saves-"))
|
||||
(setq auto-save-file-name-transforms `((".*" ,savedir t)))
|
||||
(setq tramp-auto-save-directory savedir))
|
||||
|
||||
(setq backup-by-copying t
|
||||
delete-old-versions t
|
||||
version-control t
|
||||
kept-new-versions 2
|
||||
kept-old-versions 2)
|
||||
;; Packages
|
||||
(require 'use-package)
|
||||
|
||||
|
|
Loading…
Reference in a new issue