[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/undo-fu-session 5cc4b4f33d 12/53: Fix for linearizing an e
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/undo-fu-session 5cc4b4f33d 12/53: Fix for linearizing an empty undo-list disabling undo on reload |
Date: |
Thu, 7 Jul 2022 12:05:16 -0400 (EDT) |
branch: elpa/undo-fu-session
commit 5cc4b4f33d7213a555b429d33cd843f5ee9c4427
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Fix for linearizing an empty undo-list disabling undo on reload
---
undo-fu-session.el | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/undo-fu-session.el b/undo-fu-session.el
index 6105c5c090..7ac0f256aa 100644
--- a/undo-fu-session.el
+++ b/undo-fu-session.el
@@ -111,11 +111,14 @@ Enforcing removes the oldest files."
(setq undo-elt (pop undo-list))
(push undo-elt linear-list))))
- ;; Pass through 't', when there is no undo information.
- ;; Also convert '(list nil)' to 't', since this is no undo info too.
+ ;; Pass through 'nil', when there is no undo information.
+ ;; Also convert '(list nil)' to 'nil', since this is no undo info too.
+ ;;
+ ;; Note that we use 'nil' as this is what `buffer-undo-list' is set
+ ;; to when there are no undo steps yet.
(if (and linear-list (not (equal (list nil) linear-list)))
(nreverse linear-list)
- t)))
+ nil)))
;; ---------------------------------------------------------------------------
;; Undo Encode/Decode Functionality
@@ -492,6 +495,13 @@ Argument PENDING-LIST an `pending-undo-list'. compatible
list."
emacs-buffer-undo-list
emacs-pending-undo-list)))
+ ;; It's possible the history was saved with undo disabled.
+ ;; In this case simply reset the values so loading history never
disables undo.
+ (when (eq t emacs-buffer-undo-list)
+ (setq emacs-buffer-undo-list nil)
+ (setq emacs-pending-undo-list nil)
+ (setq emacs-undo-equiv-table '()))
+
;; Assign undo data to the current buffer.
(setq buffer-undo-list emacs-buffer-undo-list)
(setq pending-undo-list emacs-pending-undo-list)
- [nongnu] elpa/undo-fu-session a6a23301a4 30/53: Fix #2: resolve potential security issue with file permissions, (continued)
- [nongnu] elpa/undo-fu-session a6a23301a4 30/53: Fix #2: resolve potential security issue with file permissions, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 7bbc89a42f 36/53: Build linear-list in-order instead of reversing, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 2fe1efcfa1 37/53: Shorten message, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 5862b90b9c 38/53: Cleanup: use file-name-concat for clarity, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 56d3134287 40/53: Cleanup: use simpler syntax to construct the overlay list, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 4330e87aac 50/53: Remove undo-fu-session hooks when no buffers have the mode enabled, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 3e54374b37 52/53: Cleanup: use double-dash for private functions, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session fa4833d470 02/53: readme: update to reference other packages, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session fa62a9b9a1 03/53: Cleanup: messages & docstrings, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 049fe942f6 11/53: Cleanup: order buffer-undo-list before pending-undo-list, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 5cc4b4f33d 12/53: Fix for linearizing an empty undo-list disabling undo on reload,
ELPA Syncer <=
- [nongnu] elpa/undo-fu-session 56cdd3538a 16/53: Don't show common-place messages in the echo area, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 5135b5cb61 15/53: Update changelog, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session a038914736 18/53: Update readme, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 191babe23c 24/53: Cleanup: docstring width warnings, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 00bc3807d7 25/53: Cleanup: replace 'if' with 'cond', ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 7c095e863c 26/53: Cleanup: remove redundant groups, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session cbe37c6643 31/53: Alternate fix for #2, make the directory only readable by the user, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 4605b0cc2b 33/53: Tests: simplify execution, with & without the linear option set, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 3e810c7c9a 34/53: Tests: move into subdirectory, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 1a3d500d8b 39/53: Support different compression formats & format conversion, ELPA Syncer, 2022/07/07