diff --git a/core/core-editor.el b/core/core-editor.el index f198f89ec..3a42c8609 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -221,13 +221,16 @@ savehist file." `(("." . ,(concat doom-cache-dir "undo-tree-hist/")))) (global-undo-tree-mode +1) - ;; compress undo with xz - (advice-add #'undo-tree-make-history-save-file-name :filter-return - (cond ((executable-find "zstd") (lambda (file) (concat file ".zst"))) - ((executable-find "gzip") (lambda (file) (concat file ".gz"))))) - (advice-add #'undo-tree-load-history :around #'doom*shut-up) + ;; compress undo history with xz + (defun doom*undo-tree-make-history-save-file-name (file) + (cond ((executable-find "zstd") (concat file ".zst")) + ((executable-find "gzip") (concat file ".gz")) + (file))) + (advice-add #'undo-tree-make-history-save-file-name :filter-return + #'doom*undo-tree-make-history-save-file-name) + (defun doom*strip-text-properties-from-undo-history (orig-fn &rest args) (dolist (item buffer-undo-list) (and (consp item)