emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/undo-tree f726f6e 149/195: Don't restore undo history f


From: Stefan Monnier
Subject: [elpa] externals/undo-tree f726f6e 149/195: Don't restore undo history from file when reverting buffer.
Date: Sat, 28 Nov 2020 13:41:41 -0500 (EST)

branch: externals/undo-tree
commit f726f6e7665947c02185fa0133b724928d0c7ca7
Author: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Commit: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>

    Don't restore undo history from file when reverting buffer.
    
    revert-buffer explicitly sets buffer-undo-list to nil, so trying to restore
    the undo tree from file is arguably the wrong thing to do. Plus this avoids
    trying (and failing with a message) to load the undo history when other 
Emacs
    functions revert the buffer (e.g. Magit).
---
 undo-tree.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/undo-tree.el b/undo-tree.el
index 14aa642..13c22ac 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -3119,7 +3119,8 @@ signaling an error if file is not found."
 
 (defun undo-tree-load-history-hook ()
   (when (and undo-tree-mode undo-tree-auto-save-history
-            (not (eq buffer-undo-list t)))
+            (not (eq buffer-undo-list t))
+            (not revert-buffer-in-progress-p))
     (undo-tree-load-history nil t)))
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]