[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [multi-tty] Odd regression in vcursor mode in terminal
From: |
Karoly Lorentey |
Subject: |
Re: [multi-tty] Odd regression in vcursor mode in terminal |
Date: |
Sun, 20 May 2007 19:31:39 +0200 |
User-agent: |
Thunderbird 1.5.0.10 (X11/20070403) |
csant wrote:
> Taking the freedom to report bugs specific to the multi-tty branch
> directly to the emacs-devel list - I noticed an odd regression with
> vcursor in the multi-tty branch . I have managed to boil it down to
> this snippet from my ~/.emacs :
>
> (setq vcursor-key-bindings 't)
> (load "vcursor")
> (xterm-mouse-mode 1)
>
> When loading this in ~/.emacs on a startup with
> $ ./src/emacs -nw
> of a fresh compile of a checkout of the multi-tty branch, C-S-up
> produces the character `A' instead of vcursor-previous-line . However,
> when starting
> $ ./src/emacs -Q -nw
> and then finding that file and doing a `M-x eval-last-sexp' on each of
> the three items above, everything works as expected . Also running in X
> gives no problems .
This doesn't seem related to vcursor at all. The simplest way to reproduce this
that I could find is just having the following in .emacs:
(load-library "xt-mouse")
The bug is caused by some problem related to `local-function-key-map' during
terminal initialization. .emacs is loaded *before* term/xterm.el sets up the
local-function-key-map on the terminal, and apparently changing
`function-key-map' before that breaks function keys.
I think this may be related to keymap inheritance. On the multi-tty branch,
`function-key-map' is the common parent of all terminal-local keymaps
(`local-function-key-map'). To speed up terminal initialization, term/xterm.el
prepares a third keymap with the terminal-dependent function keys (such as
`xterm-function-map'), and set a copy of that as the intermediate parent of
`local-function-key-map'. The result is as follows:
function-key-map
^
|
anonymous copy of xterm-function-map
^
|
local-function-key-map
Xterm-mouse-mode simply adds a new define-key in function-key-map. Apparently
this doesn't work right when it does this before the above chain is created.
`local-function-key-map' is different depending on whether xt-mouse is loaded
before or after terminal initialization. This shouldn't happen.
Unfortunately, I don't have time to debug this now. I'll return to this later,
unless somebody else fixes it in the meantime. (It is very much possible that I
simply misunderstood how keymap inheritance works when I wrote the above code.)
--
Karoly
- Re: [multi-tty] xt-mouse.el does not work in emacsclient frames, (continued)
- Re: [multi-tty] xt-mouse.el does not work in emacsclient frames, Dan Nicolaescu, 2007/05/18
- Re: [multi-tty] xt-mouse.el does not work in emacsclient frames, Robert J. Chassell, 2007/05/18
- Re: [multi-tty] xt-mouse.el does not work in emacsclient frames, Dan Nicolaescu, 2007/05/18
- Re: [multi-tty] xt-mouse.el does not work in emacsclient frames, Dan Nicolaescu, 2007/05/18
- Re: [multi-tty] xt-mouse.el does not work in emacsclient frames, Stefan Monnier, 2007/05/19
- Re: [multi-tty] xt-mouse.el does not work in emacsclient frames, csant, 2007/05/19
- Re: [multi-tty] xt-mouse.el does not work in emacsclient frames, David Kastrup, 2007/05/19
- Re: [multi-tty] xt-mouse.el does not work in emacsclient frames, Stefan Monnier, 2007/05/21
- Re: [multi-tty] xt-mouse.el does not work in emacsclient frames, David Kastrup, 2007/05/21
- Re: [multi-tty] xt-mouse.el does not work in emacsclient frames, Stefan Monnier, 2007/05/21
Re: [multi-tty] Odd regression in vcursor mode in terminal,
Karoly Lorentey <=
Re: [multi-tty] Odd regression in vcursor mode in terminal, Karoly Lorentey, 2007/05/20