[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/undo-fu fdd806d95c 13/82: Cleanup: make a function to disa
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/undo-fu fdd806d95c 13/82: Cleanup: make a function to disable the checkpoint |
Date: |
Thu, 7 Jul 2022 12:04:49 -0400 (EDT) |
branch: elpa/undo-fu
commit fdd806d95c145e2a47aadaf447f2d8a81a7d8a42
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Cleanup: make a function to disable the checkpoint
---
undo-fu.el | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/undo-fu.el b/undo-fu.el
index b9a90fc085..8e93ac9288 100644
--- a/undo-fu.el
+++ b/undo-fu.el
@@ -56,6 +56,13 @@
;; Internal functions/macros.
+(defun undo-fu--checkpoint-disable ()
+ "Disable check to prevent crossing the initial boundary when redoing."
+ (setq undo-fu--respect nil)
+ (setq undo-fu--checkpoint-is-blocking nil)
+ (setq undo-fu--checkpoint nil))
+
+
(defmacro undo-fu--with-message-suffix (suffix &rest body)
"Add text after the message output."
(declare (indent 1))
@@ -149,8 +156,7 @@ Optional argument ARG The number of steps to redo."
;; This allows explicitly over-stepping the boundary, in cases where it's
needed.
(when undo-fu--respect
(when (string-equal last-command 'keyboard-quit)
- (setq undo-fu--respect nil)
- (setq undo-fu--checkpoint-is-blocking nil)
+ (undo-fu--checkpoint-disable)
(message "Redo end-point stepped over!")))
(when undo-fu--respect
@@ -234,9 +240,7 @@ Optional argument ARG the number of steps to undo."
;; This allows explicitly over-stepping the boundary, in cases where it's
needed.
(when undo-fu--respect
(when (string-equal last-command 'keyboard-quit)
- (setq undo-fu--respect nil)
- (setq undo-fu--checkpoint-is-blocking nil)
- (setq undo-fu--checkpoint nil)
+ (undo-fu--checkpoint-disable)
(message "Undo end-point ignored!")))
(let*
- [nongnu] elpa/undo-fu a651bb3035 57/82: Complete docstring, (continued)
- [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
- [nongnu] elpa/undo-fu 7cbc3f852b 63/82: readme: move details into own top-level heading, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu e0ad06b5ef 64/82: Cleanup: formatting, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 1d60424680 50/82: Raise error when using undo-fu commands when undo has been disabled, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 06b52a11d9 69/82: Cleanup: replace 'if' with 'cond', ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 3ae95e60f6 65/82: Update readme example, remove call to disable undo-tree, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 3957d8d188 79/82: Cleanup: replace member with memq, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu fdd806d95c 13/82: Cleanup: make a function to disable the checkpoint,
ELPA Syncer <=
- [nongnu] elpa/undo-fu ed5af4d0ff 18/82: Merge branch 'add-autoload-cookie' into 'master', ELPA Syncer, 2022/07/07
- [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