aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.emacs.d/rul-emacs.org7
1 files changed, 4 insertions, 3 deletions
diff --git a/.emacs.d/rul-emacs.org b/.emacs.d/rul-emacs.org
index f2a3a45..5394b3e 100644
--- a/.emacs.d/rul-emacs.org
+++ b/.emacs.d/rul-emacs.org
@@ -101,9 +101,10 @@ I use package from both stable and bleeding-edge Melpa.
Emacs tends to clutter the filesystem with backup files. A backup file is normally the filename with a =~= suffix. I rather have my filesystem clean, and centralize all backups in a single directory.
#+begin_src emacs-lisp :tangle "init.el"
-(if (file-directory-p "~/.backup")
- (setq backup-directory-alist '(("." . "~/.backup")))
- (message "Directory does not exist: ~/.backup"))
+(let ((backup-dir "~/.backup"))
+ (unless (file-directory-p backup-dir)
+ (make-directory backup-dir t))
+ (setq backup-directory-alist `(("." . ,backup-dir))))
(setq
backup-by-copying t ; Don't delink hardlinks
nihil fit ex nihilo