emacs-elpa-diffs
[Top][All Lists]
Advanced

[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*



reply via email to

[Prev in Thread] Current Thread [Next in Thread]