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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/undo-fu 9bf729c727 09/82: Support pressing C-g before undo


From: ELPA Syncer
Subject: [nongnu] elpa/undo-fu 9bf729c727 09/82: Support pressing C-g before undo
Date: Thu, 7 Jul 2022 12:04:47 -0400 (EDT)

branch: elpa/undo-fu
commit 9bf729c7275c8a5b3a6c4a2209cab437bb7dfab6
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>

    Support pressing C-g before undo
    
    Allows to enter unconstrained mode before undo.
---
 undo-fu.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/undo-fu.el b/undo-fu.el
index 6320638896..2918069fde 100644
--- a/undo-fu.el
+++ b/undo-fu.el
@@ -210,6 +210,15 @@ Optional argument ARG the number of steps to undo."
     (when (or undo-fu--checkpoint-is-blocking (not was-undo-or-redo))
       (setq undo-fu--checkpoint (cdr buffer-undo-list)))
 
+    ;; Allow crossing the boundary, if we press [keyboard-quit].
+    ;; 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)
+        (message "Undo end-point ignored!")))
+
     (let*
       ;; Swap in 'undo' for our own function name.
       ;; Without this undo won't stop once the first undo step is reached.



reply via email to

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