From: Karoly Lorentey <karoly@lorentey.hu>
To: emacs-devel@gnu.org
Subject: Re: [multi-tty] Odd regression in vcursor mode in terminal
Date: Sun, 20 May 2007 19:31:51 +0200 [thread overview]
Message-ID: <46508607.1080402@lorentey.hu> (raw)
In-Reply-To: <op.tsfyz9u0d84skq@fiore.malebolge>
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
prev parent reply other threads:[~2007-05-20 17:31 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-16 22:49 [multi-tty] Odd regression in vcursor mode in terminal csant
2007-05-16 22:58 ` David Kastrup
2007-05-17 0:44 ` Dan Nicolaescu
2007-05-17 7:01 ` csant
2007-05-18 17:27 ` [multi-tty] xt-mouse.el does not work in emacsclient frames (was Re: Odd regression in vcursor mode in terminal) csant
2007-05-18 20:17 ` Dan Nicolaescu
2007-05-18 20:43 ` [multi-tty] xt-mouse.el does not work in emacsclient frames csant
2007-05-18 20:55 ` Dan Nicolaescu
2007-05-18 21:13 ` csant
2007-05-18 21:21 ` Dan Nicolaescu
2007-05-18 21:41 ` csant
2007-05-18 21:57 ` Dan Nicolaescu
2007-05-18 21:59 ` csant
2007-05-19 1:04 ` Robert J. Chassell
2007-05-19 2:12 ` Dan Nicolaescu
2007-05-19 2:28 ` Dan Nicolaescu
2007-05-19 14:03 ` Stefan Monnier
2007-05-19 16:00 ` csant
2007-05-19 18:50 ` David Kastrup
2007-05-21 12:39 ` Stefan Monnier
2007-05-21 13:02 ` David Kastrup
2007-05-21 14:12 ` Stefan Monnier
2007-05-20 17:31 ` [multi-tty] Odd regression in vcursor mode in terminal Karoly Lorentey
2007-05-20 17:31 ` Karoly Lorentey [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46508607.1080402@lorentey.hu \
--to=karoly@lorentey.hu \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).