[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/undo-fu a2241d3b52 76/82: Cleanup: simplify unconstrained
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/undo-fu a2241d3b52 76/82: Cleanup: simplify unconstrained undo checks |
Date: |
Thu, 7 Jul 2022 12:04:56 -0400 (EDT) |
branch: elpa/undo-fu
commit a2241d3b52c64ed298de3603041c58ac46fb9716
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Cleanup: simplify unconstrained undo checks
---
undo-fu.el | 30 ++++++++++++++----------------
1 file changed, 14 insertions(+), 16 deletions(-)
diff --git a/undo-fu.el b/undo-fu.el
index 0da8f30e66..c97f357a05 100644
--- a/undo-fu.el
+++ b/undo-fu.el
@@ -281,14 +281,13 @@ Optional argument ARG The number of steps to redo."
(success
(condition-case err
(progn
- (undo-fu--with-message-suffix
- (if undo-fu--respect
- ""
- " (unconstrained)")
- (if undo-fu--respect
- (undo-fu--backport-undo-redo steps)
- (let ((undo-no-redo nil))
- (undo steps))))
+ (cond
+ (undo-fu--respect
+ (undo-fu--backport-undo-redo steps))
+ (t
+ (undo-fu--with-message-suffix " (unconstrained)"
+ (let ((undo-no-redo nil))
+ (undo steps)))))
t)
(error
(progn
@@ -372,14 +371,13 @@ Optional argument ARG the number of steps to undo."
(success
(condition-case err
(progn
- (undo-fu--with-message-suffix
- (if undo-fu--respect
- ""
- " (unconstrained)")
- (if (or (not undo-fu--respect) undo-fu--in-region)
- (let ((undo-no-redo nil))
- (undo steps))
- (undo-only steps)))
+ (cond
+ ((and undo-fu--respect (not undo-fu--in-region))
+ (undo-only steps))
+ (t
+ (undo-fu--with-message-suffix " (unconstrained)"
+ (let ((undo-no-redo nil))
+ (undo steps)))))
t)
(error
(progn
- [nongnu] elpa/undo-fu 61d6cda0a0 35/82: Cleanup: add checkpoint set/clear functions, (continued)
- [nongnu] elpa/undo-fu 61d6cda0a0 35/82: Cleanup: add checkpoint set/clear functions, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu e3e6750c95 37/82: readme: update to reference other packages, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu afa5685743 39/82: Cleanup: minor improvements to comments and error strings, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu d5dd79c454 40/82: readme: add link to melpa, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu ea41b40601 54/82: Use 'undo' instead of 'undo-only' when unconstrained mode is in use, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 7fc9505561 61/82: Update evil-mode section in readme, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 8c461a00a0 51/82: Cleanup: comments, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 34b27c01da 66/82: Cleanup: use constant instead of local-variable for command list, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 7ec3cc558e 68/82: Cleanup: use defgroup, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 71c474e29f 71/82: Cleanup: docstring, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu a2241d3b52 76/82: Cleanup: simplify unconstrained undo checks,
ELPA Syncer <=
- [nongnu] elpa/undo-fu d26b64530a 02/82: Support undo/redo multiple times, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 374a62cba0 08/82: Disable undo-in-region support, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu be82f88630 07/82: Add installation section, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 9cc8c64f16 12/82: Merge branch 'patch-1' into 'master', ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 6f876014dc 14/82: Cleanup: complete doc string for message override macro, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 769789d742 17/82: Add autoload cookie, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu c5bb7b0402 22/82: Evil Mode: mark undo commands not to repeat, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu fd2e9952f9 31/82: Merge branch 'compiler-warnings' into 'master', ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu c2be4ae43e 41/82: Cleanup: blank lines, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu d03de12298 44/82: Cleanup: use the term 'checkpoint' instead of 'end-point', ELPA Syncer, 2022/07/07