[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/undo-tree 8105f5f 143/195: Temporarily disable diff wto
From: |
Stefan Monnier |
Subject: |
[elpa] externals/undo-tree 8105f5f 143/195: Temporarily disable diff wto speed up undoing-to-x. |
Date: |
Sat, 28 Nov 2020 13:41:40 -0500 (EST) |
branch: externals/undo-tree
commit 8105f5fc864732b9fb6c5a265dec004ff1a5afd8
Author: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Commit: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Temporarily disable diff wto speed up undoing-to-x.
---
undo-tree.el | 35 +++++++++++++++++++++++------------
1 file changed, 23 insertions(+), 12 deletions(-)
diff --git a/undo-tree.el b/undo-tree.el
index a450926..f45944e 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -3917,12 +3917,14 @@ at mouse event POS."
(defun undo-tree-visualize-undo-to-x (&optional x)
"Undo to last branch point, register, or saved state.
-If X is 'branch, undo to last branch point. If X is 'register,
-undo to last register. If X is 'saved, undo to last saved state.
+If X is the symbol `branch', undo to last branch point. If X is
+the symbol `register', undo to last register. If X is the sumbol
+`saved', undo to last saved state. If X is null, undo to first of
+these that's encountered.
Interactively, a single \\[universal-argument] specifies
-`branch', a double \\[universal-argument] \[universal-argument]
-spcified `saved', and a negative prefix argument specifies
+`branch', a double \\[universal-argument] \\[universal-argument]
+specifies `saved', and a negative prefix argument specifies
`register'."
(interactive "P")
(when (and (called-interactively-p 'any) x)
@@ -3932,7 +3934,9 @@ spcified `saved', and a negative prefix argument specifies
((<= x 4) 'branch)
(t 'saved))))
(let ((current (undo-tree-current buffer-undo-tree))
+ (diff undo-tree-visualizer-diff)
r)
+ (undo-tree-visualizer-hide-diff)
(while (and (undo-tree-node-previous current)
(or (undo-tree-visualize-undo) t)
(setq current (undo-tree-current buffer-undo-tree))
@@ -3948,17 +3952,21 @@ spcified `saved', and a negative prefix argument
specifies
;; saved state
(and (or (null x) (eq x 'saved))
(undo-tree-node-unmodified-p current))
- ))))))
+ ))))
+ (when diff (undo-tree-visualizer-show-diff))))
(defun undo-tree-visualize-redo-to-x (&optional x)
- "Redo to next branch point or register.
-If X is the symbol `branch', redo to next branch point ignoring
-registers. If X is the symbol 'register', redo to next register,
-ignoring branch points.
+ "Redo to last branch point, register, or saved state.
+If X is the symbol `branch', redo to last branch point. If X is
+the symbol `register', redo to last register. If X is the sumbol
+`saved', redo to last saved state. If X is null, redo to first of
+these that's encountered.
-Interactively, a positive prefix argument specifies `branch', and
-a negative prefix argument specifies `register'."
+Interactively, a single \\[universal-argument] specifies
+`branch', a double \\[universal-argument] \\[universal-argument]
+specifies `saved', and a negative prefix argument specifies
+`register'."
(interactive "P")
(when (and (called-interactively-p 'any) x)
(setq x (prefix-numeric-value x)
@@ -3967,7 +3975,9 @@ a negative prefix argument specifies `register'."
((<= x 4) 'branch)
(t 'saved))))
(let ((current (undo-tree-current buffer-undo-tree))
+ (diff undo-tree-visualizer-diff)
r)
+ (undo-tree-visualizer-hide-diff)
(while (and (undo-tree-node-next current)
(or (undo-tree-visualize-redo) t)
(setq current (undo-tree-current buffer-undo-tree))
@@ -3983,7 +3993,8 @@ a negative prefix argument specifies `register'."
;; saved state
(and (or (null x) (eq x 'saved))
(undo-tree-node-unmodified-p current))
- ))))))
+ ))))
+ (when diff (undo-tree-visualizer-show-diff))))
(defun undo-tree-visualizer-toggle-timestamps ()
- [elpa] externals/undo-tree 0ba9a0f 134/195: Bump version number., (continued)
- [elpa] externals/undo-tree 0ba9a0f 134/195: Bump version number., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 17d2dee 141/195: Switch order of diff comparision in diff display., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree ffb7c02 140/195: Set inhibit-read-only when creating diff view., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree b2c020f 138/195: Fix defadvice code snippet in commentary., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree a041902 142/195: Fix inverted key bindings., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree f726f6e 149/195: Don't restore undo history from file when reverting buffer., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree d0273ec 144/195: Make undo-tree-visualizer-[undo|redo]-to-x work in selection mode., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree d0e8793 145/195: Fix diff after undo-tree-visualize-[undo|redo]-to-x in selection mode., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 7d12602 150/195: Fix formatting bug in absolute timestamps., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 01b4a86 151/195: Update comment about Emacs version required for persistent history., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 8105f5f 143/195: Temporarily disable diff wto speed up undoing-to-x.,
Stefan Monnier <=
- [elpa] externals/undo-tree aabc832 147/195: Remove unused variable., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 4cba00b 163/195: Fix one of the diagrams in the Commentary., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 3a772b7 170/195: Bump copyright year and version number., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree bf3a146 167/195: Disable undo-in-region by default., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree eec9edd 168/195: Silence some unused variable compiler warnings., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 77c29a6 171/195: Factor out canary checking into undo-list-found-canary-p., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 4a72a1e 172/195: Change undo-list-pop-changeset to macro taking buffer-undo-list argument., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree c39882f 177/195: Prevent misleading message about discarded undo history on first undo., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree e6f31a0 179/195: Use custom undo-[strong-|outer]-limit values in undo-tree-mode., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 2ac4eac 181/195: Improve messages displayed to user when undo history is discarded., Stefan Monnier, 2020/11/28