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

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

[nongnu] elpa/undo-fu-session 0400f15f2a 09/53: Fix for loading undo ses


From: ELPA Syncer
Subject: [nongnu] elpa/undo-fu-session 0400f15f2a 09/53: Fix for loading undo session overwriting other buffers data
Date: Thu, 7 Jul 2022 12:05:15 -0400 (EDT)

branch: elpa/undo-fu-session
commit 0400f15f2a0cfcedb69c06c3ff62f3f8814b62fb
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>

    Fix for loading undo session overwriting other buffers data
    
    The `undo-equiv-table` needs to be added to, not replaces
    since it's shared.
---
 undo-fu-session.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/undo-fu-session.el b/undo-fu-session.el
index 4736b90881..5267353416 100644
--- a/undo-fu-session.el
+++ b/undo-fu-session.el
@@ -446,9 +446,10 @@ Argument PENDING-LIST an `pending-undo-list'. compatible 
list."
         ;; Assign undo data to the current buffer.
         (setq pending-undo-list emacs-pending-undo-list)
         (setq buffer-undo-list emacs-buffer-undo-list)
-        (if (hash-table-p emacs-undo-equiv-table)
-          (setq undo-equiv-table emacs-undo-equiv-table)
-          (clrhash undo-equiv-table))
+        ;; Merge the the hash-table since this is a global-variable, share 
between
+        ;; buffers otherwise this interferes with other buffers undo-only/redo.
+        (when (hash-table-p emacs-undo-equiv-table)
+          (maphash (lambda (key val) (puthash key val undo-equiv-table)) 
emacs-undo-equiv-table))
         t))))
 
 (defun undo-fu-session-recover-safe ()



reply via email to

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