diff --git a/core/core-editor.el b/core/core-editor.el index 7e6494197..936e500fc 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -57,6 +57,11 @@ modes are active and the buffer is read-only.") savehist-additional-variables '(kill-ring search-ring regexp-search-ring)) (savehist-mode 1) +;; Branching & persistent undo +(require 'undo-tree) +(setq undo-tree-auto-save-history t + undo-tree-history-directory-alist (list (cons "." (concat doom-cache-dir "undo-tree-hist/")))) + ;; Keep track of recently opened files (require 'recentf) (setq recentf-save-file (concat doom-cache-dir "recentf") diff --git a/core/core.el b/core/core.el index 05d50c316..2152aa3f6 100644 --- a/core/core.el +++ b/core/core.el @@ -95,12 +95,10 @@ there are problems.") create-lockfiles nil history-length 1000 make-backup-files nil - undo-tree-auto-save-history t ;; files abbrev-file-name (concat doom-local-dir "abbrev.el") auto-save-list-file-name (concat doom-cache-dir "autosave") backup-directory-alist (list (cons "." (concat doom-cache-dir "backup/"))) - custom-file (concat doom-etc-dir "custom.el") pcache-directory (concat doom-cache-dir "pcache/") server-auth-dir (concat doom-cache-dir "server/") shared-game-score-directory (concat doom-etc-dir "shared-game-score/") @@ -108,8 +106,11 @@ there are problems.") tramp-backup-directory-alist backup-directory-alist tramp-persistency-file-name (concat doom-cache-dir "tramp-persistency.el") url-cache-directory (concat doom-cache-dir "url/") - url-configuration-directory (concat doom-etc-dir "url/") - undo-tree-history-directory-alist (list (cons "." (concat doom-cache-dir "undo-tree-hist/")))) + url-configuration-directory (concat doom-etc-dir "url/")) + +;; move custom defs out of init.el +(setq custom-file (concat doom-etc-dir "custom.el")) +(load custom-file nil t) ;; be quiet at startup (advice-add #'display-startup-echo-area-message :override #'ignore)