aboutsummaryrefslogtreecommitdiff
path: root/evil-integration.el
diff options
context:
space:
mode:
authorFrank Fischer <frank.fischer@mathematik.tu-chemnitz.de>2012-01-07 12:05:07 +0100
committerFrank Fischer <frank.fischer@mathematik.tu-chemnitz.de>2012-01-07 12:05:07 +0100
commita3623eb5b19c6f99650e40bbba322df2ab793581 (patch)
treeb7a3cd75860a4e49a61f53451b89230da3a829a3 /evil-integration.el
parent202b29d34c25ccae7c34a35d34b0d110af2090d3 (diff)
Disable `evil-esc-mode' during a call to `read-key-sequence' or `read-key-sequence-vector' (addresses #63)
This disables the special handling of the ESC key in terminals during those functions. It makes, e.g., `describe-key' work even in terminal mode as expected. But note that advising those important functions is very intrusive and may easily break something else.
Diffstat (limited to 'evil-integration.el')
-rw-r--r--evil-integration.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/evil-integration.el b/evil-integration.el
index 0654e58..814a905 100644
--- a/evil-integration.el
+++ b/evil-integration.el
@@ -49,6 +49,18 @@
(let (evil-esc-mode)
ad-do-it))
+;; disable evil-esc-mode during the read of a key-sequence
+;; TODO: should we handle the special ESC-delay, too?
+(defadvice read-key-sequence (around evil activate)
+ (let (evil-esc-mode)
+ ad-do-it))
+
+;; disable evil-esc-mode during the read of a key-sequence
+;; TODO: should we handle the special ESC-delay, too?
+(defadvice read-key-sequence-vector (around evil activate)
+ (let (evil-esc-mode)
+ ad-do-it))
+
;;; Buffer-menu
(evil-declare-key 'motion Buffer-menu-mode-map