Commit 852668e 1 parent 0bd6093 commit 852668e Copy full SHA for 852668e
File tree 1 file changed +17
-0
lines changed
modules/nixos/programs/emacs
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 19
19
(undo-tree-enable-undo-in-region t )
20
20
(undo-tree-history-directory-alist `((" ." . ,(concat user-emacs-directory " undo-tree-history" )))))
21
21
22
+ (let ((backup-dir " ~/.local/state/emacs/backups" )
23
+ (auto-saves-dir " ~/.local/state/emacs/autosaves" ))
24
+ (dolist (dir (list backup-dir auto-saves-dir))
25
+ (when (not (file-directory-p dir))
26
+ (make-directory dir t )))
27
+ (setq backup-directory-alist `((" ." . , backup-dir ))
28
+ auto-save-file-name-transforms `((" .*" , auto-saves-dir t ))
29
+ auto-save-list-file-prefix (concat auto-saves-dir " .saves-" )
30
+ tramp-backup-directory-alist `((" .*" . , backup-dir ))
31
+ tramp-auto-save-directory auto-saves-dir))
32
+
33
+ (setq backup-by-copying t ; Don't delink hardlinks
34
+ delete-old-versions t ; Clean up the backups
35
+ version-control t ; Use version numbers on backups,
36
+ kept-new-versions 8 ; keep some new versions
37
+ kept-old-versions 8 ) ; and some old ones, too
38
+
22
39
(defalias 'yes-or-no-p 'y-or-n-p )
23
40
(setq inhibit-startup-message t )
24
41
(setq use-dialog-box nil )
You can’t perform that action at this time.
0 commit comments