[PATCH] Introduce `evil-echo-state' to suppress state changes being echoed

Frank Terbeck ft at bewatermyfriend.org
Sat Oct 29 20:57:09 CEST 2011


Signed-off-by: Frank Terbeck <ft at bewatermyfriend.org>
---
 evil-core.el   |    3 ++-
 evil-vars.el   |    5 +++++
 evil-visual.el |    2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/evil-core.el b/evil-core.el
index b2900aa..84badc6 100644
--- a/evil-core.el
+++ b/evil-core.el
@@ -872,7 +872,8 @@ If ARG is nil, don't display a message in the echo area.%s" name doc)
                    (redisplay)))
                , at body
                (run-hooks ',entry-hook)
-               (when (and arg (not evil-locked-display) ,message)
+               (when (and arg (not evil-locked-display)
+                          evil-echo-state ,message)
                  (if (functionp ,message)
                      (funcall ,message)
                    (evil-echo ,message))))))))
diff --git a/evil-vars.el b/evil-vars.el
index cbdd658..15074f4 100644
--- a/evil-vars.el
+++ b/evil-vars.el
@@ -149,6 +149,11 @@ which causes the parenthesis to be highlighted."
   :type 'function
   :group 'evil)
 
+(defcustom evil-echo-state t
+  "If non-nil (default), echo state in the minibuffer."
+  :type 'boolean
+  :group 'evil)
+
 (defcustom evil-complete-previous-func
   (lambda (arg)
     (let ((dabbrev-search-these-buffers-only (list (current-buffer)))
diff --git a/evil-visual.el b/evil-visual.el
index b72d00e..248063e 100644
--- a/evil-visual.el
+++ b/evil-visual.el
@@ -230,7 +230,7 @@ If MESSAGE is given, display it in the echo area."
     (evil-active-region 1)
     (setq evil-visual-region-expanded nil)
     (evil-visual-refresh type mark point)
-    (when (stringp message)
+    (when (and (stringp message) evil-echo-state)
       (evil-echo message))))
 
 (defun evil-visual-expand-region (&optional no-trailing-newline)
-- 
1.7.6.447.gb9176





More information about the implementations-list mailing list