branch: elpa/undo-fu
commit 20c9d6170a5d4873a2461581aef136f34ff94cd9
Author: Campbell Barton <[email protected]>
Commit: Campbell Barton <[email protected]>
Cleanup: simplify checks for clearing the checkpoint
---
undo-fu.el | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/undo-fu.el b/undo-fu.el
index c97f357a05..e06d241dfb 100644
--- a/undo-fu.el
+++ b/undo-fu.el
@@ -176,11 +176,13 @@ since in this case `keyboard-quit' cannot be used
to perform unconstrained undo/redo actions."
(interactive)
;; Display an appropriate message.
- (if (undo-fu--was-undo-or-redo)
- (if (and undo-fu--respect)
- (message "Undo checkpoint cleared!")
+ (cond
+ ((not (undo-fu--was-undo-or-redo))
+ (message "Undo checkpoint disabled for next undo action!"))
+ ((not undo-fu--respect)
(message "Undo checkpoint already cleared!"))
- (message "Undo checkpoint disabled for next undo action!"))
+ (t
+ (message "Undo checkpoint cleared!")))
(undo-fu--checkpoint-disable))