[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ergoemacs-mode 683020a92b 02/13: Fix `ergoemacs-read-ke
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ergoemacs-mode 683020a92b 02/13: Fix `ergoemacs-read-key` advice to work better with `magit` |
Date: |
Wed, 19 Jan 2022 18:58:19 -0500 (EST) |
branch: externals/ergoemacs-mode
commit 683020a92bbcb4a9135f277c6e90a338a49f224e
Author: Matthew Fidler <514778+mattfidler@users.noreply.github.com>
Commit: Matthew Fidler <514778+mattfidler@users.noreply.github.com>
Fix `ergoemacs-read-key` advice to work better with `magit`
---
ergoemacs-advice.el | 16 ++++++++++++----
ergoemacs-mode.el | 4 ++--
ergoemacs-themes.el | 1 +
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/ergoemacs-advice.el b/ergoemacs-advice.el
index 39da47e911..de7756f9f8 100644
--- a/ergoemacs-advice.el
+++ b/ergoemacs-advice.el
@@ -99,10 +99,18 @@ TYPE is the type of translation installed."
(if (and ergoemacs-mode (not ergoemacs--temporary-disable))
(ergoemacs-mode--undefined-advice)
(call-interactively orig-fun)))
-
-(defun ergoemacs-advice-read-key ()
- "Drop single command keys for read-key." ; For compataiblity with emacs 25.5
- (setq ergoemacs-command-loop--single-command-keys nil))
+
+(defun ergoemacs-read-key (orig-fun &rest args)
+ "Allow `ergoemacs-mode' to add put prompt into original keys."
+ (if (not (and ergoemacs-mode (not ergoemacs--temporary-disable)))
+ (apply orig-fun args)
+ (if (not (= 1 (length args)))
+ (apply orig-fun args)
+ (setq ergoemacs-command-loop--read-key-prompt
+ (nth 0 args))
+ (unwind-protect
+ (apply orig-fun args)
+ (setq ergoemacs-command-loop--read-key-prompt "")))))
(provide 'ergoemacs-advice)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el
index 7543ac9d66..32a32eadf9 100644
--- a/ergoemacs-mode.el
+++ b/ergoemacs-mode.el
@@ -483,13 +483,13 @@ after initializing ergoemacs-mode.
(ergoemacs-mode-send-emacs-keys .
,ergoemacs--send-emacs-keys-map)))
(add-hook 'emulation-mode-map-alists ergoemacs-override-alist)
(advice-add 'undefined :around #'ergoemacs-advice-undefined)
- (advice-add 'read-key :before #'ergoemacs-advice-read-key))
+ (advice-add 'read-key :around #'ergoemacs-read-key))
(defun ergoemacs-remove-override-keymap ()
"Remove `ergoemacs-mode' keymaps."
(remove-hook 'emulation-mode-map-alists 'ergoemacs-override-alist)
(advice-remove 'undefined #'ergoemacs-advice-undefined)
- (advice-remove 'read-key #'ergoemacs-advice-read-key))
+ (advice-remove 'read-key #'ergoemacs-read-key))
;;; Frequently used commands as aliases
diff --git a/ergoemacs-themes.el b/ergoemacs-themes.el
index 3138f75fa5..00e7a38e3b 100644
--- a/ergoemacs-themes.el
+++ b/ergoemacs-themes.el
@@ -1456,6 +1456,7 @@ In a terminal, this can be either arrow keys (e.g. meta+O
A == <up>) or regular
(defvar calc-mode-map)
(defun ergoemacs-install-calc-bindings ()
"Install `calc-mode' bindings."
+ ;; These are above `ergoemacs-mode'
(ergoemacs-save-key-state
'comint-mode-map
(define-key calc-mode-map [remap ergoemacs-undo] 'calc-undo)
- [elpa] externals/ergoemacs-mode updated (5692fc1f1e -> b0ede648b6), ELPA Syncer, 2022/01/19
- [elpa] externals/ergoemacs-mode f101841c20 07/13: Describe the current `ergoemacs-mode` better, ELPA Syncer, 2022/01/19
- [elpa] externals/ergoemacs-mode cd8f2fa828 09/13: Make sure temporary disable is off when switching off term, ELPA Syncer, 2022/01/19
- [elpa] externals/ergoemacs-mode df8d4253c4 11/13: Add alt+f4, ELPA Syncer, 2022/01/19
- [elpa] externals/ergoemacs-mode 63fe57790e 10/13: Fix the typo; See #511, ELPA Syncer, 2022/01/19
- [elpa] externals/ergoemacs-mode 683020a92b 02/13: Fix `ergoemacs-read-key` advice to work better with `magit`,
ELPA Syncer <=
- [elpa] externals/ergoemacs-mode 739ca23a32 03/13: Do not send emacs keys when in `term-mode`. Fix #510, ELPA Syncer, 2022/01/19
- [elpa] externals/ergoemacs-mode d33f63a3c6 01/13: Remove comit because the bindings are overwritten by `ergoemacs-mode', ELPA Syncer, 2022/01/19
- [elpa] externals/ergoemacs-mode d719e7ee83 04/13: Add menu keys back to standard `ergoemacs-mode' theme, ELPA Syncer, 2022/01/19
- [elpa] externals/ergoemacs-mode 8cf95f4beb 06/13: Spacing changes, ELPA Syncer, 2022/01/19
- [elpa] externals/ergoemacs-mode d8d4d309db 08/13: Move to swap keymaps #510, ELPA Syncer, 2022/01/19
- [elpa] externals/ergoemacs-mode 84289722f4 05/13: Remove outdated documenation, ELPA Syncer, 2022/01/19
- [elpa] externals/ergoemacs-mode df6bdfc55d 12/13: Support for Polish Programmers QWERTY in layouts, ELPA Syncer, 2022/01/19
- [elpa] externals/ergoemacs-mode b0ede648b6 13/13: Merge pull request #513 from sobkas/master, ELPA Syncer, 2022/01/19