branch: externals/ergoemacs-mode
commit 46f027ff3d7646f619b1538f173919eca2518fe2
Author: Walter Landry <[email protected]>
Commit: Walter Landry <[email protected]>
More modal removal
---
ergoemacs-macros.el | 2 --
ergoemacs-translate.el | 20 +++++---------------
2 files changed, 5 insertions(+), 17 deletions(-)
diff --git a/ergoemacs-macros.el b/ergoemacs-macros.el
index 8ddf345..9bea54e 100644
--- a/ergoemacs-macros.el
+++ b/ergoemacs-macros.el
@@ -706,8 +706,6 @@ When arg1 can be a property. The following properties are
supported:
`(ergoemacs-map-properties--before-ergoemacs))
((and arg1 (symbolp arg1) (eq arg1 :user-after) (not arg2) (not arg3))
`(ergoemacs-map-properties--before-ergoemacs t))
- ((and arg1 (symbolp arg1) (eq arg1 :modal-p))
- nil)
((and arg1 (symbolp arg1) (eq arg1 :combine) arg2 arg3)
`(ergoemacs-command-loop--combine ,arg2 ,arg3))
((and arg1 (symbolp arg1) (memq arg1 '(:unicode-or-alt :unicode)))
diff --git a/ergoemacs-translate.el b/ergoemacs-translate.el
index 554123f..09281d2 100644
--- a/ergoemacs-translate.el
+++ b/ergoemacs-translate.el
@@ -703,7 +703,6 @@ For keys, the list consists of:
(universal-argument nil)
(negative-argument nil)
(digit-argument nil)
- (modal nil)
(text "")
(keymap (make-sparse-keymap))
(keymap-modal (make-sparse-keymap))
@@ -942,25 +941,16 @@ If there are no gui elements, retun nil."
;; (add-hook 'ergoemacs-mode-intialize-hook
#'ergoemacs-translate--keymap-reset)
(defun ergoemacs-translate--keymap (&optional translation)
- "Get the keymap for TRANSLATION.
-This takes into consideration the modal state of `ergoemacs-mode'."
- (let* ((modal nil)
- (translation (or (and (ergoemacs-translation-struct-p translation)
- (or (not modal) ;; prefer modal when :normal
- (not (eq :normal
(ergoemacs-translation-struct-key translation))))
+ "Get the keymap for TRANSLATION."
+ (let* ((translation (or (and (ergoemacs-translation-struct-p translation)
translation)
- modal
(ergoemacs-translate--get (or translation :normal))))
- (key (or (and modal (intern (concat ":"
(ergoemacs-translation-struct-name translation) "-modal")))
- (ergoemacs-translation-struct-key translation)))
+ (key (ergoemacs-translation-struct-key translation))
(ret (ergoemacs-gethash key ergoemacs-translate--keymap-hash))
keymap)
(unless ret
- (if modal
- (setq keymap (ergoemacs-translation-struct-keymap-modal translation)
- ret keymap)
- (setq keymap (ergoemacs-translation-struct-keymap translation)
- ret (make-composed-keymap (ergoemacs keymap) (ergoemacs
ergoemacs-translate--parent-map))))
+ (setq keymap (ergoemacs-translation-struct-keymap translation)
+ ret (make-composed-keymap (ergoemacs keymap) (ergoemacs
ergoemacs-translate--parent-map)))
(puthash key ret ergoemacs-translate--keymap-hash))
ret))