[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/undo-tree b42fe10 076/195: Fixed bug in undo-list-trans
From: |
Stefan Monnier |
Subject: |
[elpa] externals/undo-tree b42fe10 076/195: Fixed bug in undo-list-transfer-to-tree. |
Date: |
Sat, 28 Nov 2020 13:41:25 -0500 (EST) |
branch: externals/undo-tree
commit b42fe10a14b7528cfbcc469f09fffdb3a1f2b487
Author: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Commit: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Fixed bug in undo-list-transfer-to-tree.
---
undo-tree.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/undo-tree.el b/undo-tree.el
index 4a3b780..7b9886f 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -608,6 +608,7 @@
;; Version 0.3.2
;; * added additional check in `undo-list-GCd-marker-elt-p' to guard against
;; undo elements being mis-identified as marker elements.
+;; * fixed bug in `undo-list-transfer-to-tree'
;;
;; Version 0.3.1
;; * use `get-buffer-create' when creating the visualizer buffer in
@@ -1298,7 +1299,8 @@ Comparison is done with `eq'."
;; cells with a symbol in the car (replacing the marker), and a number in
;; the cdr. However, to guard against future changes to undo element
;; formats, we perform an additional redundant check on the symbol name.
- `(and (symbolp (car-safe ,elt))
+ `(and (car-safe ,elt)
+ (symbolp (car ,elt))
(let ((str (symbol-name (car ,elt))))
(and (> (length str) 12)
(string= (substring str 0 12) "undo-tree-id")))
@@ -1397,11 +1399,8 @@ Comparison is done with `eq'."
;; if `buffer-undo-tree' is empty, create initial undo-tree
(when (null buffer-undo-tree) (setq buffer-undo-tree (make-undo-tree)))
;; make sure there's a canary at end of `buffer-undo-list'
- (if (null buffer-undo-list)
- (setq buffer-undo-list '(nil undo-tree-canary))
- (let ((elt (last buffer-undo-list)))
- (unless (eq (car elt) 'undo-tree-canary)
- (setcdr elt '(nil undo-tree-canary)))))
+ (when (null buffer-undo-list)
+ (setq buffer-undo-list '(nil undo-tree-canary)))
(unless (eq (cadr buffer-undo-list) 'undo-tree-canary)
;; create new node from first changeset in `buffer-undo-list', save old
@@ -1430,7 +1429,8 @@ Comparison is done with `eq'."
(setq node (undo-tree-grow-backwards node nil))
(setf (undo-tree-root buffer-undo-tree) node)
(setq buffer-undo-list '(nil undo-tree-canary))
- (setf (undo-tree-size buffer-undo-tree) size)))
+ (setf (undo-tree-size buffer-undo-tree) size)
+ (setq buffer-undo-list '(nil undo-tree-canary))))
;; discard undo history if necessary
(undo-tree-discard-history)))
- [elpa] externals/undo-tree db55cea 068/195: Bumped compyright year and corrected license wording., (continued)
- [elpa] externals/undo-tree db55cea 068/195: Bumped compyright year and corrected license wording., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 3255044 065/195: Fixed bugs in undo-list-transfer-to-tree and undo-list-rebuild-from-tree, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 07e934a 080/195: Added term-mode to undo-tree-incompatible-major-modes., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree acd7549 070/195: Prevent global-undo-tree-mode being enabled in incompatible major-modes., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 79b382b 083/195: Fixed bug in undo-list-pop-changeset when called with non-null DISCARD-POS., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 6680aab 086/195: Create proper registerv structure when storing undo state in register., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree cd06456 073/195: Modified slightly misleading message in turn-on-undo-tree-mode., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 98170c6 075/195: Added additional check to more reliably identify marker undo elements., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 89bf725 081/195: Prevent undo history being discarded on major-mode switch, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 2b0395a 096/195: Added called-interactively-p compatibility hack for Emacs <= 23.1, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree b42fe10 076/195: Fixed bug in undo-list-transfer-to-tree.,
Stefan Monnier <=
- [elpa] externals/undo-tree 897f2ff 089/195: Let-bind inhibit-read-only instead of setting and restoring buffer-read-only., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree adca566 094/195: Allow undo-tree-visualizer-diff variable to be customized., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree da54994 117/195: When discarding root, erase previous link of new root., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 4c6280b 101/195: Fixed bug preventing registers being displayed in visualizer., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 3ab4581 107/195: Avoid error if point was moved manually in visualizer selection mode, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 824b904 129/195: Preparatory changes for lazy tree drawing., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 40c7065 108/195: Added undo-tree-visualizer-abort command, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 107d4c8 102/195: Allow visualizer to display relative timestamps., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 1561d8f 099/195: Preserve timestamps when generating diff for visualizer diff view., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 08db836 123/195: Fix bug in undo-tree-visualizer-select-left/right., Stefan Monnier, 2020/11/28