1

Replace static references to emacs user directory

This commit is contained in:
Jessie Hildebrandt 2020-03-02 03:15:05 -05:00
parent 52bd69f8a2
commit 0b16c662a1

10
init.el
View File

@ -45,12 +45,10 @@
scroll-preserve-screen-position 1 ; Don't move cursor while scrolling scroll-preserve-screen-position 1 ; Don't move cursor while scrolling
scroll-conservatively 101 ; Only scroll one line at a time scroll-conservatively 101 ; Only scroll one line at a time
scroll-margin 5 ; Maintain a margin of 5 lines while scrolling scroll-margin 5 ; Maintain a margin of 5 lines while scrolling
custom-file "~/.emacs.d/custom.el" ; Use separate custom-vars file
) )
;; Set backup behavior. ;; Set backup behavior.
(setq-default (setq-default
backup-directory-alist '(("." . "~/.emacs.d/backup")) ; Set backup file directory
backup-by-copying t ; Don't delink hardlinks backup-by-copying t ; Don't delink hardlinks
version-control t ; Use version numbers on backups version-control t ; Use version numbers on backups
delete-old-versions t ; Do not keep old backups delete-old-versions t ; Do not keep old backups
@ -58,6 +56,14 @@
kept-old-versions 3 ; Keep 3 old versions kept-old-versions 3 ; Keep 3 old versions
) )
;; Configure user directory and file locations.
(defconst custom-backup-dir (concat user-emacs-directory "backups"))
(setq-default
custom-file (concat user-emacs-directory "custom.el") ; Use separate custom-vars file
backup-directory-alist `((".*" . ,custom-backup-dir)) ; Set backup file directory
auto-save-file-name-transforms `((".*" ,custom-backup-dir t)) ; Set autosave file directory
)
;; Enable uniquify for better unique buffer names. ;; Enable uniquify for better unique buffer names.
(require 'uniquify) (require 'uniquify)
(setq (setq