[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/undo-fu 6c31b8e565 59/82: Protect undo-fu from aggressive-
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/undo-fu 6c31b8e565 59/82: Protect undo-fu from aggressive-indent |
Date: |
Thu, 7 Jul 2022 12:04:54 -0400 (EDT) |
branch: elpa/undo-fu
commit 6c31b8e565312e940c7da29feca5904244c45299
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Protect undo-fu from aggressive-indent
Resolves issue #7, based on patch by @andschwa
---
undo-fu.el | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/undo-fu.el b/undo-fu.el
index ec6b2d49c3..a8807d9958 100644
--- a/undo-fu.el
+++ b/undo-fu.el
@@ -76,6 +76,8 @@ Instead, explicitly call `undo-fu-disable-checkpoint'."
;; Track the last undo/redo direction.
;; Use in conjunction with `undo-fu--was-undo-or-redo' to ensure the value
isn't stale.
(defvar-local undo-fu--was-redo nil)
+;; List of interactive commands.
+(defvar-local undo-fu--commands '(undo-fu-only-undo undo-fu-only-redo-all
undo-fu-only-redo undo-fu-disable-checkpoint))
;; ---------------------------------------------------------------------------
;; Back Port `undo-redo'
@@ -402,17 +404,13 @@ Optional argument ARG the number of steps to undo."
;; - Package lint complains about using this command,
;; however it's needed to avoid issues with `evil-mode'.
(declare-function evil-declare-not-repeat "ext:evil-common")
+(eval-after-load 'evil '(mapc #'evil-declare-not-repeat undo-fu--commands))
+
+;; `aggressive-indent-mode’ (setup if in use).
+(defvar aggressive-indent-protected-commands)
(eval-after-load
- 'evil
- '
- (progn
- (mapc
- #'evil-declare-not-repeat
- (list
- 'undo-fu-disable-checkpoint
- 'undo-fu-only-redo
- 'undo-fu-only-redo-all
- 'undo-fu-only-undo))))
+ 'aggressive-indent
+ '(nconc aggressive-indent-protected-commands undo-fu--commands))
(provide 'undo-fu)
- [nongnu] elpa/undo-fu 5c9aadad4b 27/82: Support using undo-fu-only-redo after regular undo/undo-only, (continued)
- [nongnu] elpa/undo-fu 5c9aadad4b 27/82: Support using undo-fu-only-redo after regular undo/undo-only, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 6e8095c449 29/82: Suppress compiler warnings about evil functions, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 7d600ab8f2 30/82: Fix 'success' assignment (internal variable), ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 3c366ef52a 33/82: Add '.elisp-autofmt' to enable auto-formatting, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 4d635722a3 34/82: readme: minor improvements to wording, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 88c4086e12 43/82: Add 'undo-fu-ignore-keyboard-quit' & 'undo-fu-disable-checkpoint', ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu 2b1e53285a 55/82: Fix checkpoint initialization with undo data from undo-fu-session, ELPA Syncer, 2022/07/07
- [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 <=
- [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, 2022/07/07
- [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