[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ergoemacs-mode d7b86f6 279/325: Add urgoemacs-redo that
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ergoemacs-mode d7b86f6 279/325: Add urgoemacs-redo that requires undo-fu or emacs 28 |
Date: |
Sat, 23 Oct 2021 18:49:11 -0400 (EDT) |
branch: externals/ergoemacs-mode
commit d7b86f67887c19e2c693cd0919df7404732dbce7
Author: Matthew Fidler <514778+mattfidler@users.noreply.github.com>
Commit: Matthew Fidler <514778+mattfidler@users.noreply.github.com>
Add urgoemacs-redo that requires undo-fu or emacs 28
---
ergoemacs-functions.el | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/ergoemacs-functions.el b/ergoemacs-functions.el
index f50662e..c8ebaee 100644
--- a/ergoemacs-functions.el
+++ b/ergoemacs-functions.el
@@ -108,13 +108,24 @@
;;;###autoload
(defun ergoemacs-undo ()
- "Run `undo'. If in calc-mode, run `calc-undo'"
+ "Run `undo'. Prefer running undo-fo if present"
(interactive)
- (if (eq major-mode 'calc-mode)
- (calc-undo 1)
- (undo)
- )
- )
+ (cond
+ ((eq major-mode 'calc-mode)
+ (calc-undo 1))
+ ((fboundp 'undo-fu-only-undo)
+ (call-interactively ''undo-fu-only-undo))
+ (t (undo))))
+
+(defun ergoemacs-redo()
+ "Run `redo' when present."
+ (interactive)
+ (cond
+ ((fboundp 'undo-fu-only-redo)
+ (call-interactively ''undo-fu-only-redo))
+ ((fboundp 'undo-redo) ; should be in emacs 28
+ (call-interactively 'undo-redo))
+ (t (message "Redo support not present. Try `undo-fu'"))))
(defvar ergoemacs-revert-buffer 0)
(defun ergoemacs-revert-buffer ()
- [elpa] externals/ergoemacs-mode b7f909a 254/325: Some fixes, (continued)
- [elpa] externals/ergoemacs-mode b7f909a 254/325: Some fixes, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode f28dc66 255/325: Add some active keymaps to ergoemacs-mode (like before), Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode ecb9ac7 256/325: Align some more of the keys with what was there before. Add redo, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 9e58dd5 261/325: Simplify, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode b4b14f2 260/325: Remove ergoemacs-component, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode bde293e 263/325: Drop cache and hashkey, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 4250fae 267/325: Remove more outdated keys, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode b815b1d 273/325: Merge branch 'master' of https://github.com/mattfidler/ergoemacs-mode into mattfidler-master, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode f46ac1c 276/325: Fix typo, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode e81daf4 283/325: Require comit-mode See #505, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode d7b86f6 279/325: Add urgoemacs-redo that requires undo-fu or emacs 28,
Stefan Monnier <=
- [elpa] externals/ergoemacs-mode 2fcad48 282/325: Allow toggling of ergoemacs-mode-term-raw-mode, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 59c8ab0 285/325: Remove ergoemacs substitute command keys, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 1ef93b5 277/325: Add major modes menu again, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 821a910 287/325: Fix undo-fu, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode d2d29aa 289/325: Another fix for mark-active indent region, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 97623ad 286/325: Remove cua-mode again, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 87fe6ff 292/325: Remove shift C-c and C-x for now, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 2ae2ebf 294/325: Remove command loop, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 5689999 299/325: Fix CUA interference, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 9b72665 304/325: Use passthrough for kill-line, Stefan Monnier, 2021/10/23