branch: externals/ergoemacs-mode
commit b7f909a6fb55e5efd3c262f9f6cc321efd9b2cf9
Author: Matthew Fidler <[email protected]>
Commit: Matthew Fidler <[email protected]>
Some fixes
---
ergoemacs-advice.el | 39 ++++++++++++++++++++-------------------
ergoemacs-command-loop.el | 6 +++---
ergoemacs-mode.el | 2 +-
3 files changed, 24 insertions(+), 23 deletions(-)
diff --git a/ergoemacs-advice.el b/ergoemacs-advice.el
index 7e37bef..6e4f20f 100644
--- a/ergoemacs-advice.el
+++ b/ergoemacs-advice.el
@@ -130,22 +130,23 @@ When PERMANENT is non-nil, these replacements are
permanent, not temporary."
TYPE is the type of translation installed."
(let* ((keys (this-single-command-keys))
- (type (or type :normal))
- (translation (ergoemacs-translate--get type))
- (local-keymap (ergoemacs-translate--keymap translation))
- (local-key (substring keys -1))
- modal-p)
+ (type (or type :normal))
+ (translation (ergoemacs-translate--get type))
+ (local-keymap (ergoemacs-translate--keymap translation))
+ (local-key (substring keys -1))
+ modal-p)
(when (setq modal-p (ergoemacs :modal-p))
(setq local-keymap (ergoemacs-translation-struct-keymap-modal modal-p)))
+ ;; This starts the command loop when DEL or MENU is replaced in the proper
place.
(if (lookup-key local-keymap local-key)
- (let ((i 1)) ;; Setup history
- (setq ergoemacs-command-loop--history nil)
- (while (<= i (- (length keys) 1))
- (push (list (substring keys 0 i) :normal nil
- current-prefix-arg (aref (substring keys (- i 1) i) 0))
- ergoemacs-command-loop--history)
- (setq i (+ 1 i)))
- (ergoemacs-command-loop--internal keys nil nil nil
ergoemacs-command-loop--history))
+ (let ((i 1)) ;; Setup history
+ (setq ergoemacs-command-loop--history nil)
+ (while (<= i (- (length keys) 1))
+ (push (list (substring keys 0 i) :normal nil
+ current-prefix-arg (aref (substring keys (-
i 1) i) 0))
+ ergoemacs-command-loop--history)
+ (setq i (+ 1 i)))
+ (ergoemacs-command-loop--internal keys nil nil nil
ergoemacs-command-loop--history))
(ding)
(ergoemacs-command-loop--temp-message "%s does not do anything!"
(ergoemacs-key-description
(this-single-command-keys)))
@@ -157,12 +158,12 @@ TYPE is the type of translation installed."
(when (memq 'down (event-modifiers last-command-event))
current-prefix-arg)))))
-(ergoemacs-advice undefined ()
- "Allow `ergoemacs-mode' to display keys, and intercept ending <apps> keys."
- :type :around
- (if (not ergoemacs-mode)
- ad-do-it
- (ergoemacs-mode--undefined-advice)))
+;; (ergoemacs-advice undefined ()
+;; "Allow `ergoemacs-mode' to display keys, and intercept ending <apps>
keys."
+;; :type :around
+;; (if (not ergoemacs-mode)
+;; ad-do-it
+;; (ergoemacs-mode--undefined-advice)))
(ergoemacs-advice handle-shift-selection ()
"Allow `ergoemacs-mode' to do shift selection on keys like Alt+# to Alt+3."
diff --git a/ergoemacs-command-loop.el b/ergoemacs-command-loop.el
index 51666d0..8a225fe 100644
--- a/ergoemacs-command-loop.el
+++ b/ergoemacs-command-loop.el
@@ -1275,7 +1275,7 @@ from within the ergoemacs-mode command loop."
ergoemacs-command-loop--single-command-keys
(this-single-command-keys)
this-command 'ergoemacs-command-loop-start)))
-(add-hook 'ergoemacs-pre-command-hook
#'ergoemacs-command-loop--start-with-pre-command-hook)
+;;(add-hook 'ergoemacs-pre-command-hook
#'ergoemacs-command-loop--start-with-pre-command-hook)
(defvar ergoemacs-command-loop--internal-end-command-p nil)
@@ -1299,7 +1299,7 @@ to start with
(ergoemacs-command-loop-start))))
(push 'ergoemacs-ignore unread-command-events))))
-(add-hook 'ergoemacs-post-command-hook
#'ergoemacs-command-loop--start-with-post-command-hook)
+;; (add-hook 'ergoemacs-post-command-hook
#'ergoemacs-command-loop--start-with-post-command-hook)
(defvar ergoemacs-command-loop--point-motion-last-point nil
"Record the last point.")
@@ -1859,7 +1859,7 @@ Emacs versions)."
unread-command-events (or (and unread-command-events tmp
(append tmp unread-command-events)) tmp)
ergoemacs-command-loop--first-type first-type
ergoemacs-command-loop--history initial-history
- ergoemacs-command-loop-start nil)
+ ergoemacs-command-loop-start nil)
(while continue-read
(setq ergoemacs-last-command-was-ergoemacs-ignore-p nil)
(unless (eq ergoemacs-command-loop-type :read-key-sequence)
diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el
index 074be73..86dc6e6 100644
--- a/ergoemacs-mode.el
+++ b/ergoemacs-mode.el
@@ -624,7 +624,7 @@ When STORE-P is non-nil, save the tables."
ergoemacs-theme-engine
ergoemacs-translate
ergoemacs-macros
- ))
+ ergoemacs-calculate-bindings))
(unless (featurep pkg)
(ergoemacs-timing (intern (format "load-%s" pkg))
(load (symbol-name pkg)))))