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

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

[elpa] 23/35: Start modal shift-select (Issue #215)


From: Matthew Fidler
Subject: [elpa] 23/35: Start modal shift-select (Issue #215)
Date: Fri, 11 Jul 2014 22:33:28 +0000

mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.

commit 6c10b380ca742940e69e76a8fea5bcbc87ee1f48
Author: Matthew L. Fidler <address@hidden>
Date:   Wed Jul 9 18:29:45 2014 -0500

    Start modal shift-select (Issue #215)
---
 ergoemacs-modal.el |   28 +++++++++++++++++++++++++---
 ergoemacs-mode.el  |    2 ++
 2 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/ergoemacs-modal.el b/ergoemacs-modal.el
index cdf3a3e..bbef53e 100644
--- a/ergoemacs-modal.el
+++ b/ergoemacs-modal.el
@@ -262,11 +262,11 @@ If so return the hash of translation values."
 (defvar ergoemacs-translation-text)
 (declare-function ergoemacs-read-key "ergoemacs-shortcuts.el")
 (declare-function ergoemacs-mode-line "ergoemacs-mode.el")
-(defun ergoemacs-modal-default (&optional arg)
+
+(defun ergoemacs-modal--internal (&optional arg)
   "The default command for `ergoemacs-mode' modal.
 It sends `this-single-command-keys' to `ergoemacs-read-key' with
 the translation type defined by `ergoemacs-modal-list' as long as it should."
-  (interactive "^P")
   (let* ((type (nth 0 ergoemacs-modal-list))
          (hash (gethash type ergoemacs-translations))
          tmp
@@ -297,7 +297,29 @@ the translation type defined by `ergoemacs-modal-list' as 
long as it should."
           (when ergoemacs-default-cursor
             (set-cursor-color ergoemacs-default-cursor))
           (ergoemacs-mode-line)))))))
-(put 'ergoemacs-modal-default 'CUA 'move) ;; Fake movement command
+
+(defun ergoemacs-modal-default (&optional arg)
+  "The default command for `ergoemacs-mode' modal.
+It sends `this-single-command-keys' to `ergoemacs-read-key' with
+the translation type defined by `ergoemacs-modal-list' as long as it should."
+  (interactive "P")
+  (ergoemacs-modal--internal arg))
+
+(defun ergoemacs-modal-movement (&optional arg)
+  "The default command for `ergoemacs-mode' modal.
+It sends `this-single-command-keys' to `ergoemacs-read-key' with
+the translation type defined by `ergoemacs-modal-list' as long as it should."
+  (interactive "^P")
+  (ergoemacs-modal--internal arg))
+(put 'ergoemacs-modal-movement 'CUA 'move) ;; Fake movement command
+
+
+(defun ergoemacs-modal-movement-no-shift-select (&optional arg)
+  "The default command for `ergoemacs-mode' modal.
+It sends `this-single-command-keys' to `ergoemacs-read-key' with
+the translation type defined by `ergoemacs-modal-list' as long as it should."
+  (interactive "P")
+  (ergoemacs-modal--internal arg))
 
 (defvar ergoemacs-modal-save nil)
 (defvar ergoemacs-modal nil
diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el
index 5858132..9294684 100644
--- a/ergoemacs-mode.el
+++ b/ergoemacs-mode.el
@@ -659,6 +659,8 @@ This is done by checking if this is a command that supports 
shift selection or c
     ergoemacs-shortcut-movement
     ergoemacs-read-key
     ergoemacs-modal-default
+    ergoemacs-modal-movement
+    ergoemacs-modal-movement-no-shift-select
     ergoemacs-read-key-default))
 
 (defun ergoemacs-smart-function-p (var)



reply via email to

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