bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#13793: 24.3.50; M-x broken in viper and X


From: Frank Fischer
Subject: bug#13793: 24.3.50; M-x broken in viper and X
Date: Tue, 26 Feb 2013 21:17:14 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On 02/26, Stefan Monnier wrote:
> I think what we really care about is to detect "called from
> read-key-sequence".  How 'bout:
> 
> (defvar evil-normal-esc-map (lookup-key input-decode-map [?\e]))
> (define-key input-decode-map
>   [?\e] `(menu-item "" ,evil-normal-esc-map
>           :filter ,(λ (map)
>                      (if (and (not evil-inhibit-escape)
>                               (equal (this-single-command-keys) [?\e])
>                               (sit-for 0.1))
>                          [escape] map))))
> 
> So the special ESC=>escape mapping only takes place if the whole
> last key-sequence so far is just [?\e], i.e. either we're still in
> read-key-sequence, or the last read-key-sequence only read [?\e], which
> should ideally never happen because it should have been mapped to [escape].

Sounds good to me. At least, I can't think of a problematic situation,
currently. Let's how it works in practise.

Thank you for your efforts. I would never have thought of this
solution on my own.

Best regards,
Frank





reply via email to

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