Silence undo-tree a little less destructively
undo-tree-load-history was formerly advised with doom*shut-up, which uses the quiet! macro to suppress output. quiet! accomplishes this by temporarily redefining message to a no-op function. However, if a fatal error occurs while this binding is active, in some cases, message will remain redefined, perpetually silencing all output to the minibuffer. This tries to mitigate that, at least where undo-tree is concerned. Also sharp-quotes an unquoted function.
This commit is contained in:
parent
d1d9cffcc8
commit
63e25b349d
|
@ -241,7 +241,8 @@ savehist file."
|
|||
`(("." . ,(concat doom-cache-dir "undo-tree-hist/"))))
|
||||
(global-undo-tree-mode +1)
|
||||
|
||||
(advice-add #'undo-tree-load-history :around #'doom*shut-up)
|
||||
(defun doom*shut-up-undo-tree (&rest _) (message ""))
|
||||
(advice-add #'undo-tree-load-history :after #'doom*shut-up-undo-tree)
|
||||
|
||||
;; compress undo history with xz
|
||||
(defun doom*undo-tree-make-history-save-file-name (file)
|
||||
|
@ -256,7 +257,7 @@ savehist file."
|
|||
(and (consp item)
|
||||
(stringp (car item))
|
||||
(setcar item (substring-no-properties (car item))))))
|
||||
(advice-add 'undo-list-transfer-to-tree :before #'doom*strip-text-properties-from-undo-history)
|
||||
(advice-add #'undo-list-transfer-to-tree :before #'doom*strip-text-properties-from-undo-history)
|
||||
|
||||
(defun doom*compress-undo-tree-history (orig-fn &rest args)
|
||||
(cl-letf* ((jka-compr-verbose nil)
|
||||
|
|
Loading…
Reference in New Issue
Block a user