[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/undo-fu 5c9aadad4b 27/82: Support using undo-fu-only-redo
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/undo-fu 5c9aadad4b 27/82: Support using undo-fu-only-redo after regular undo/undo-only |
Date: |
Thu, 7 Jul 2022 12:04:51 -0400 (EDT) |
branch: elpa/undo-fu
commit 5c9aadad4b197d3cf357da8ab23c9b9ec51eb99d
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Support using undo-fu-only-redo after regular undo/undo-only
While this wont support linear undo functionality,
it at least wont error.
---
undo-fu.el | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/undo-fu.el b/undo-fu.el
index 44c143d142..9f3de862ef 100644
--- a/undo-fu.el
+++ b/undo-fu.el
@@ -185,6 +185,12 @@ Optional argument ARG The number of steps to redo."
(undo-fu--checkpoint-disable)
(message "Redo end-point stepped over!")))
+ ;; Ensure the undo checkpoint is usable.
+ (when undo-fu--respect
+ (when (eq last-command 'undo)
+ (undo-fu--checkpoint-disable)
+ (message "Redo 'undo' called, not 'undo-fu-only-undo', checkpoint
disabled!")))
+
(when undo-fu--respect
(unless
;; Ensure the next steps is a redo action.
@@ -207,7 +213,14 @@ Optional argument ARG The number of steps to redo."
;; the redo action will undo, which isn't so useful.
;; This makes redo-only the reverse of undo-only.
- (when (not (eq t pending-undo-list))
+ (when
+ (and
+ ;; Not the first redo action.
+ (not (eq t pending-undo-list))
+ ;; Sanity check, since it's not just being used as a marker
+ ;; any (unlikely) issues here would error.
+ (not (null undo-fu--checkpoint)))
+
;; Skip to the last matching redo step before the checkpoint.
(let
(
- [nongnu] branch elpa/undo-fu created (now 97e7f4f6e0), ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 85fa6556e9 04/82: Add evil-mode key binding example, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu c20637ffe3 11/82: Fix typo, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 9cfc95948a 19/82: Cleanup: remove unnecessary calculation, auto-load redo-all, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu f8f416c0d4 25/82: readme: capitalize 'Emacs', ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu f53b3e3963 26/82: Use eval-after-load instead of with-eval-after-load for Emacs 24.3, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 5c9aadad4b 27/82: Support using undo-fu-only-redo after regular undo/undo-only,
ELPA Syncer <=
- [nongnu] elpa/undo-fu 6e8095c449 29/82: Suppress compiler warnings about evil functions, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 7d600ab8f2 30/82: Fix 'success' assignment (internal variable), ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 3c366ef52a 33/82: Add '.elisp-autofmt' to enable auto-formatting, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 4d635722a3 34/82: readme: minor improvements to wording, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 88c4086e12 43/82: Add 'undo-fu-ignore-keyboard-quit' & 'undo-fu-disable-checkpoint', ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 2b1e53285a 55/82: Fix checkpoint initialization with undo data from undo-fu-session, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu a651bb3035 57/82: Complete docstring, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 46de023b5f 58/82: Use logic back-ported from emacs-28 'undo-redo', ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 8b00b16fa8 46/82: Non-destructive commands no longer break the undo-chain, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 6c31b8e565 59/82: Protect undo-fu from aggressive-indent, ELPA Syncer, 2022/07/07