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

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

[elpa] externals/ergoemacs-mode 270e6b7 041/325: Remove all of :modal


From: Stefan Monnier
Subject: [elpa] externals/ergoemacs-mode 270e6b7 041/325: Remove all of :modal
Date: Sat, 23 Oct 2021 18:48:17 -0400 (EDT)

branch: externals/ergoemacs-mode
commit 270e6b7dfc8e50829f5c7f343a2b630d6a9750af
Author: Walter Landry <wlandry@caltech.edu>
Commit: Walter Landry <wlandry@caltech.edu>

    Remove all of :modal
---
 ergoemacs-command-loop.el | 29 ++---------------------------
 ergoemacs-translate.el    |  4 +---
 2 files changed, 3 insertions(+), 30 deletions(-)

diff --git a/ergoemacs-command-loop.el b/ergoemacs-command-loop.el
index 3159484..955ef50 100644
--- a/ergoemacs-command-loop.el
+++ b/ergoemacs-command-loop.el
@@ -193,7 +193,7 @@ Returns the mode-line text."
   (let (tmp color text)
     (ergoemacs-save-buffer-state
      (cond
-      ((setq tmp (ergoemacs :modal-p))
+      ((setq tmp nil)
        (setq color (ergoemacs-translation-struct-modal-color tmp))
        (if color
            (set-cursor-color color)
@@ -813,7 +813,6 @@ read."
          (text (ergoemacs-translation-struct-text translation))
          (unchorded (ergoemacs-translation-struct-unchorded translation))
          (trans (ergoemacs-translation-struct-translation translation))
-         (modal (ergoemacs :modal-p))
          (keys nil)
          (blink-on nil)
          input
@@ -821,17 +820,6 @@ read."
          mod-keys tmp
          reset-key-p
          double)
-    ;; Setup modal translation
-    (when (and (eq type :normal) modal)
-      (setq type (ergoemacs-translation-struct-key modal)
-            local-keymap (ergoemacs-translation-struct-keymap-modal modal)
-            text (ergoemacs-translation-struct-text modal)
-            unchorded (ergoemacs-translation-struct-unchorded modal)
-            trans (ergoemacs-translation-struct-translation modal)
-            tmp translation
-            translation modal
-            modal tmp
-            tmp nil))
     
     ;; (ergoemacs-command-loop--read-key (read-kbd-macro "C-x" t) 
:unchorded-ctl)
     (when (functionp text)
@@ -920,17 +908,6 @@ read."
               ergoemacs-last-command-event last-command-event))
        (t
         ;; Translate the key appropriately.
-        (when (and modal (lookup-key ergoemacs-modal-ignored-keymap (vector 
input)))
-          ;; Swap back, or ignore the modal translation.
-          (setq type (ergoemacs-translation-struct-key modal)
-                local-keymap (ergoemacs-translation-struct-keymap-modal modal)
-                text (ergoemacs-translation-struct-text modal)
-                unchorded (ergoemacs-translation-struct-unchorded modal)
-                trans (ergoemacs-translation-struct-translation modal)
-                tmp translation
-                translation modal
-                modal tmp
-                tmp nil))
         (setq raw-input input
               input (ergoemacs-translate--event-mods input type)
               last-command-event input
@@ -1129,7 +1106,7 @@ appropriate value based on the COMMAND."
 TYPE is the type of command loop to check for.  By default this
 is the :full command loop."
   (and
-   (or (eq ergoemacs-command-loop-type (or type :full)) (ergoemacs :modal-p))
+   (eq ergoemacs-command-loop-type (or type :full))
    (ergoemacs-command-loop--minibuffer-supported-p)
    (catch 'excluded-variables
      (dolist (var ergoemacs-command-loop--excluded-variables)
@@ -1755,8 +1732,6 @@ Emacs versions)."
                         current-key (nth 1 raw-key)
                         raw-key (nth 0 raw-key)
                         continue-read nil)
-                 (when (setq modal-p (ergoemacs :modal-p))
-                   (setq local-keymap 
(ergoemacs-translation-struct-keymap-modal modal-p)))
                   (cond
                    ;; Handle quit commands
                    ((and last-current-key
diff --git a/ergoemacs-translate.el b/ergoemacs-translate.el
index d82529c..554123f 100644
--- a/ergoemacs-translate.el
+++ b/ergoemacs-translate.el
@@ -773,7 +773,6 @@ When NAME is a symbol, setup the translation function for 
the symbol."
         -universal-argument
         -negative-argument
         -digit-argument
-        -modal
         translation
         (local-keymap (or (plist-get plist :keymap) (make-sparse-keymap)))
        (trans-keymap (intern (concat "ergoemacs-translate--" (plist-get plist 
:name) "-map"))))
@@ -819,7 +818,6 @@ When NAME is a symbol, setup the translation function for 
the symbol."
            :universal-argument -universal-argument
            :negative-argument -negative-argument
            :digit-argument -digit-argument
-           :modal -modal
            :text (plist-get plist :text)
            :keymap local-keymap
            :keymap-modal (or (plist-get plist :keymap-modal) 
(make-sparse-keymap))
@@ -946,7 +944,7 @@ If there are no gui elements, retun nil."
 (defun ergoemacs-translate--keymap (&optional translation)
   "Get the keymap for TRANSLATION.
 This takes into consideration the modal state of `ergoemacs-mode'."
-  (let* ((modal (ergoemacs :modal-p))
+  (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))))



reply via email to

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