Refactor doom*strip-text-properties-from-undo-history
:around -> :before advice
This commit is contained in:
parent
c45e563453
commit
37e80c4878
1 changed files with 3 additions and 4 deletions
|
@ -231,13 +231,12 @@ savehist 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)
|
||||
(defun doom*strip-text-properties-from-undo-history (&rest args)
|
||||
(dolist (item buffer-undo-list)
|
||||
(and (consp item)
|
||||
(stringp (car item))
|
||||
(setcar item (substring-no-properties (car item)))))
|
||||
(apply orig-fn args))
|
||||
(advice-add 'undo-list-transfer-to-tree :around #'doom*strip-text-properties-from-undo-history)
|
||||
(setcar item (substring-no-properties (car item))))))
|
||||
(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…
Add table
Add a link
Reference in a new issue