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

[Emacspeak] Re: Emacspeak evil mode



From 0fd3f5b237663c9bfe282309b17717780346f3b1 Mon Sep 17 00:00:00 2001
From: Tim Cross <theophilusx@xxxxxxxxxxx>
Date: Thu, 11 Feb 2021 08:22:15 +1100
Subject: [PATCH 2/2] Add additional commands for evil mode

---
 lisp/emacspeak-evil.el | 35 +++++++++++++++++++++++++++++------
 1 file changed, 29 insertions(+), 6 deletions(-)

diff --git a/lisp/emacspeak-evil.el b/lisp/emacspeak-evil.el
index aeb58d2dd..ec223115f 100644
--- a/lisp/emacspeak-evil.el
+++ b/lisp/emacspeak-evil.el
@@ -73,7 +73,6 @@
  for f in
  '(
    evil-beginning-of-line evil-end-of-line
-   evil-next-line evil-previous-line
    evil-ret evil-window-top)
  do
  (eval
@@ -83,6 +82,20 @@
        (emacspeak-auditory-icon 'select-object)
        (emacspeak-speak-line)))))
 
+;; we want the next set to be a little less noisy and not play
+;; auditory icons when they execute
+(cl-loop
+ for f in
+ '(
+   evil-next-line evil-previous-line
+   evil-next-visual-line evil-previous-visual-line)
+ do
+ (eval
+  `(defadvice ,f (after emacspeak pre act comp)
+     "Provide auditory feedback."
+     (when (ems-interactive-p)
+       (emacspeak-speak-line)))))
+
 (cl-loop
  for f in
  '(
@@ -106,6 +119,17 @@
          (emacspeak-auditory-icon 'large-movement)
          (emacspeak-speak-line))))))
 
+(cl-loop
+ for f in
+ '(evil-scroll-down evil-scroll-up)
+ do
+ (eval
+  `(defadvice ,f (after emacspeak pre act comp)
+     "Provide auditory feedback."
+     (when (ems-interactive-p)
+       (emacspeak-auditory-icon 'large-movement)
+       (emacspeak-speak-current-window)))))
+
 ;;}}}
 ;;{{{ Word Motion
 
@@ -237,7 +261,8 @@
 (cl-declaim (special
              evil-normal-state-map evil-insert-state-map
              evil-visual-state-map evil-replace-state-map
-             evil-operator-state-map evil-motion-state-map))
+             evil-operator-state-map evil-motion-state-map
+             evil-evilified-state-map))
 
 (eval-after-load
     "evil-maps"
@@ -251,14 +276,12 @@
      (emacspeak-keymap-recover-eol)))
 
 (eval-after-load
-    "evil-maps"
+    "evil-evilified-state"
   `(progn
      (mapc
       #'emacspeak-evil-fix-emacspeak-prefix
       (list
-       evil-normal-state-map evil-insert-state-map
-       evil-visual-state-map evil-replace-state-map
-       evil-operator-state-map evil-motion-state-map))
+       evil-evilified-state-map))
      (emacspeak-keymap-recover-eol)))
 
 ;;}}}
-- 
2.27.0



|May 1995 - Last Year|Current Year|


If you have questions about this archive or had problems using it, please contact us.

Contact Info Page