Fix load-order issue for undo-fu-session

Which made it much more difficult to customize undo-fu-session with
merely an `after!` block. See jwiegley/use-package#829 for why this
happens.
This commit is contained in:
Henrik Lissner 2020-04-09 18:19:11 -04:00
parent 5c56c0b218
commit 15ab86848e
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -580,10 +580,14 @@ files, so we replace calls to `pp' with the much faster `prin1'."
(use-package! undo-fu-session
:after undo-fu
:init
:preface
(setq undo-fu-session-directory (concat doom-cache-dir "undo-fu-session/")
undo-fu-session-incompatible-files '("/COMMIT_EDITMSG\\'" "/git-rebase-todo\\'"))
:config
;; HACK We avoid `:config' here because `use-package's `:after' complicates
;; the load order of a package's `:config' block and makes it impossible
;; for the user to override its settings with merely `after!' (or
;; `eval-after-load'). See jwiegley/use-package#829.
(after! undo-fu-session
;; HACK Use the faster zstd to compress undo files instead of gzip
(when (executable-find "zstd")
(defadvice! doom--undo-fu-session-use-zstd-a (filename)
@ -591,8 +595,7 @@ files, so we replace calls to `pp' with the much faster `prin1'."
(if undo-fu-session-compression
(concat (file-name-sans-extension filename) ".zst")
filename)))
(global-undo-fu-session-mode +1))
(global-undo-fu-session-mode +1)))
(use-package! ws-butler