Subject: Re: bug#1072: Viper version is 3.14 of April 06, 2008; can't exit viper insert mode with ESC using emacsclient -t

From: Michael Kifer <[email-masked]>
Date: Fri, 14 Nov 2008 15:55:20 -0500

On Fri, 14 Nov 2008 12:40:21 -0800 (PST)
Dan Nicolaescu <[email-masked]> wrote:

> Michael Kifer <[email-masked]> writes:
> 
>   > On Fri, 14 Nov 2008 14:48:14 +0100
>   > Stefano Zacchiroli <[email-masked]> wrote:
>   > 
>   > > 1) viper-ESC-keyseq-timeout is a global variable, shared by all Emacs
>   > >    clients, can it be made local to a buffer (actually it would be
>   > >    enough to make it local to a client, but I don't believe it is
>   > >    possible), or there is some Viper magic which would defeat this
>   > >    solution not work?
>   > 
>   > I don't see a reason why this variable cannot be buffer-local.
> 
> Disclaimer: I don't know anything about viper.
> 
> But the above does not sound right: a buffer can be used in both an X11
> frame and a tty frame at the same time, so a buffer-local value won't
> work.

Yes, you are right. If there is a way to find out whether the selected window
is in a terminal frame or X frame then viper-ESC-keyseq-timeout can be made
into a function.