[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/undo-tree 36b341b 112/195: Cope better if undo boundary
From: |
Stefan Monnier |
Subject: |
[elpa] externals/undo-tree 36b341b 112/195: Cope better if undo boundary before undo-tree-canary is missing. |
Date: |
Sat, 28 Nov 2020 13:41:33 -0500 (EST) |
branch: externals/undo-tree
commit 36b341ba89449367a3bd4102698b1f791d6f7bf3
Author: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Commit: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Cope better if undo boundary before undo-tree-canary is missing.
Modified undo-list-transfer-to-tree and undo-list-pop-changeset so they
don't
depend on there being an undo boundary before the undo-tree-canary.
E.g. org-mode's org-self-insert-cluster-for-undo removes this undo boundary.
---
undo-tree.el | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/undo-tree.el b/undo-tree.el
index a4e9cf2..b650233 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2009-2012 Free Software Foundation, Inc
;; Author: Toby Cubitt <toby-undo-tree@dr-qubit.org>
-;; Version: 0.5.2
+;; Version: 0.5.3
;; Keywords: convenience, files, undo, redo, history, tree
;; URL: http://www.dr-qubit.org/emacs.php
;; Repository: http://www.dr-qubit.org/git/undo-tree.git
@@ -690,6 +690,12 @@
;;; Change Log:
;;
+;; Version 0.5.3
+;; * modified `undo-list-transfer-to-tree' and `undo-list-pop-changeset' to
+;; cope better if undo boundary before undo-tree-canary is missing
+;; (e.g. org-mode's `org-self-insert-cluster-for-undo' removes this undo
+;; boundary)
+;;
;; Version 0.5.2
;; * added `~' to end of default history save-file name
;; * avoid error in `undo-tree-save-history' when undo is disabled in buffer
@@ -1673,7 +1679,8 @@ Comparison is done with `eq'."
(undo-tree-move-GC-elts-to-pool (car p))
(while (and discard-pos (integerp (car buffer-undo-list)))
(setq buffer-undo-list (cdr buffer-undo-list)))
- (car buffer-undo-list))
+ (and (car buffer-undo-list)
+ (not (eq (car buffer-undo-list) 'undo-tree-canary))))
(setcdr p (list (pop buffer-undo-list)))
(setq p (cdr p)))
changeset)))
@@ -1711,7 +1718,8 @@ Comparison is done with `eq'."
(when (null buffer-undo-list)
(setq buffer-undo-list '(nil undo-tree-canary)))
- (unless (eq (cadr buffer-undo-list) 'undo-tree-canary)
+ (unless (or (eq (cadr buffer-undo-list) 'undo-tree-canary)
+ (eq (car buffer-undo-list) 'undo-tree-canary))
;; create new node from first changeset in `buffer-undo-list', save old
;; `buffer-undo-tree' current node, and make new node the current node
(let* ((node (undo-tree-make-node nil (undo-list-pop-changeset)))
@@ -1727,7 +1735,8 @@ Comparison is done with `eq'."
;; if no undo history has been discarded from `buffer-undo-list' since
;; last transfer, splice new tree fragment onto end of old
;; `buffer-undo-tree' current node
- (if (eq (cadr buffer-undo-list) 'undo-tree-canary)
+ (if (or (eq (cadr buffer-undo-list) 'undo-tree-canary)
+ (eq (car buffer-undo-list) 'undo-tree-canary))
(progn
(setf (undo-tree-node-previous node) splice)
(push node (undo-tree-node-next splice))
- [elpa] externals/undo-tree a220a42 097/195: Added registerv-make and registerv-data compatibility macros in Emacs <= 23., (continued)
- [elpa] externals/undo-tree a220a42 097/195: Added registerv-make and registerv-data compatibility macros in Emacs <= 23., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 95599db 100/195: Fixed bug in visualizer selection mode when timestamps are displayed., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 81f1417 098/195: Added diff-no-select and diff-file-local-copy compatibility hacks, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree aa7202c 103/195: Fix the way keymaps are defined., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree e69adb3 109/195: Remove now unnecessary compatibility hack for called-interactively-p., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 00ffbb6 121/195: Bump version number below which we warn against enabling persistent storage., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 5df6374 128/195: Switch to lexical binding., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 9b55464 126/195: Make undo history filename match docs., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree f566beb 106/195: Add customization option allowing timestamps to be displayed by default, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree f3e0d93 119/195: Remove ChangeLog section from package headers., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 36b341b 112/195: Cope better if undo boundary before undo-tree-canary is missing.,
Stefan Monnier <=
- [elpa] externals/undo-tree 98dbabd 125/195: Implement visualizer commands to redo/undo to branch/register., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 85efe23 116/195: Ensure auto-compression-mode is enabled when reading undo history file., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 181e84b 124/195: Minor bug fix and tweak to visualizer register display., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 0ba2d37 122/195: Fix bug in undo-tree-clear-visualizer-data., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 443d74c 111/195: Avoid triggering error when saving undo history when there's nothing to save., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 5d06288 130/195: Implement lazy undo-tree drawing in visualizer., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 4c14173 115/195: Fix undo history auto-saving., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree e352286 131/195: Fix incompatiblity with newer high-resolution timestamps., Stefan Monnier, 2020/11/28
- [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