[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/undo-fu-session 4b14cea4a9 44/53: Fix integer comparison a
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/undo-fu-session 4b14cea4a9 44/53: Fix integer comparison and use assoc instead of assoc-default |
Date: |
Thu, 7 Jul 2022 12:05:30 -0400 (EDT) |
branch: elpa/undo-fu-session
commit 4b14cea4a9ea548f6e28ff1bdfe28814cabc5b2b
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Fix integer comparison and use assoc instead of assoc-default
In practice comparing the file size worked with `eq` however
this isn't guaranteed to work with big-num, so use `=` instead.
---
undo-fu-session.el | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/undo-fu-session.el b/undo-fu-session.el
index 67768eaa9f..85f6b118e8 100755
--- a/undo-fu-session.el
+++ b/undo-fu-session.el
@@ -597,13 +597,13 @@ Argument PENDING-LIST an `pending-undo-list' compatible
list."
;; These issues are common when working with others on documents.
;; This way users may find out why undo didn't load if they need,
;; without distracting them with noisy info.
- (unless (eq (buffer-size buffer) (assoc-default 'buffer-size
content-header))
+ (unless (= (buffer-size buffer) (cdr (assoc 'buffer-size
content-header)))
(undo-fu-session--message-without-echo
"Undo-Fu-Session discarding: file length mismatch for %S"
filename)
(throw 'exit nil))
- (unless (string-equal (sha1 buffer) (assoc-default 'buffer-checksum
content-header))
+ (unless (string-equal (sha1 buffer) (cdr (assoc 'buffer-checksum
content-header)))
(undo-fu-session--message-without-echo
"Undo-Fu-Session discarding: file checksum mismatch for %S"
filename)
@@ -614,16 +614,16 @@ Argument PENDING-LIST an `pending-undo-list' compatible
list."
(when content-data
(let*
- (
+ ( ;; `emacs-buffer-undo-list' may not exist, nil is OK.
(emacs-buffer-undo-list
- (undo-fu-session--decode
- (assoc-default 'emacs-buffer-undo-list content-data #'eq nil)))
+ (undo-fu-session--decode (cdr (assoc 'emacs-buffer-undo-list
content-data))))
+ ;; `emacs-pending-undo-list' may not exist, nil is OK.
(emacs-pending-undo-list
- (undo-fu-session--decode
- (assoc-default 'emacs-pending-undo-list content-data #'eq nil)))
+ (undo-fu-session--decode (cdr (assoc 'emacs-pending-undo-list
content-data))))
+ ;; `emacs-undo-equiv-table' may not exist, nil is OK as it's treated
as an empty list.
(emacs-undo-equiv-table
(undo-fu-session--equivtable-decode
- (assoc-default 'emacs-undo-equiv-table content-data #'eq '())
+ (cdr (assoc 'emacs-undo-equiv-table content-data))
emacs-buffer-undo-list
emacs-pending-undo-list)))
- [nongnu] elpa/undo-fu-session 00bc3807d7 25/53: Cleanup: replace 'if' with 'cond', (continued)
- [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
- [nongnu] elpa/undo-fu-session b492c07573 43/53: Fix bzip2 and Z-standard compression types, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session d2a5ca1299 45/53: Use 600 for the mode instead of 700, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session e4cf026fd5 47/53: Use GPL 3 license in header, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 703ea8d000 46/53: Fix incorrect mode for the undo-fu-session directory, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 4b14cea4a9 44/53: Fix integer comparison and use assoc instead of assoc-default,
ELPA Syncer <=
- [nongnu] elpa/undo-fu-session 36e3bbabfa 51/53: Always ensure the target directory exists before saving, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session b2d8874bc8 20/53: readme: update evil mode notes, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session e6ba8d6330 41/53: Cleanup: expand on comment, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session ee3879e469 48/53: Fix #3 by ensuring the undo data uses compatible encoding, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session a016920750 06/53: readme: correct minor typos., ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 51e09de000 05/53: Use forward slash in filename regex, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 0400f15f2a 09/53: Fix for loading undo session overwriting other buffers data, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 702210384a 17/53: Cleanup: quote emacs symbols, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 579936966b 23/53: Cleanup: use group for globalized minor mode, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 8567a0c64e 19/53: Cleanup: quiet warnings, ELPA Syncer, 2022/07/07