aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/lisp/init-misc.el
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-02-22 09:52:17 +0800
committerGuangxiong Lin <[email protected]>2022-02-22 09:52:17 +0800
commit32ed338843935a257bfae23ca9cfe905dff0b9a0 (patch)
tree64ce0fa41e36e4aa5cf798384075661ab72cddda /.emacs.d/lisp/init-misc.el
parent620ae93bb23a458a215cb99f823538a9c2cf385d (diff)
downloaddotfiles-32ed338843935a257bfae23ca9cfe905dff0b9a0.tar.gz
dotfiles-32ed338843935a257bfae23ca9cfe905dff0b9a0.tar.bz2
dotfiles-32ed338843935a257bfae23ca9cfe905dff0b9a0.zip
Set emacs auto save directory
Diffstat (limited to '.emacs.d/lisp/init-misc.el')
-rw-r--r--.emacs.d/lisp/init-misc.el14
1 files changed, 12 insertions, 2 deletions
diff --git a/.emacs.d/lisp/init-misc.el b/.emacs.d/lisp/init-misc.el
index 71a5d7e..0a0bdf7 100644
--- a/.emacs.d/lisp/init-misc.el
+++ b/.emacs.d/lisp/init-misc.el
@@ -4,8 +4,18 @@
(when (version<= "26.0.50" emacs-version)
(global-display-line-numbers-mode))
(setq vc-follow-symlinks t)
-(setq backup-directory-alist
- `(("." . ,(concat user-emacs-directory "backups"))))
+
+(setq
+ backup-by-copying t
+ delete-old-versions t
+ kept-new-versions 10
+ kept-old-versions 2
+ version-control t
+ backup-directory-alist `(("." . ,(concat user-emacs-directory "backups"))))
+
+(setq auto-save-file-name-transforms
+ `((".*" "~/.emacs.d/backups/" t)))
+
(setq-default fill-column 72)
(menu-bar-mode -1)
(xterm-mouse-mode 1) ;; Enable mouse