unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@gnu.org>
Subject: Re: define-key #2 ---> ineffective if key is bound...
Date: Tue, 21 May 2002 13:33:18 GMT	[thread overview]
Message-ID: <87k7pxpqw2.fsf@tc-1-100.kawasaki.gol.ne.jp> (raw)
In-Reply-To: ap3bsb9ejsg.fsf@poynting.umd.edu

"D. Goel" <deego@glue.umd.edu> writes:
> <-- thus, if the user wants to shuffle his O with P, then
> key-translation-map (rather than keyboard-translate-table) is the way to
> go.  In the current version, it seems that there is no way for me to
> shuffle O with P without side-effects, either by using
> keyboard-translate-table or by using key-translation-map, because in
> both cases, the function-key-map's up-arrow conversion (and other
> arrows) gets broken.

I agree with you, mostly because my mental model of the relationship
between these various translation-maps (function-key-map ->
key-translation-map -> normal keymaps) is a pipeline, where later stages
cannot influence earlier ones.

However, in practice, this is not true, except for simple cases, because
function-key-map and key-translation-map work by modifying the tail of a
growing data structure, character by character, and pay attention to more
than one character at the end.

I suppose it could be worked around, by having two copies of the current
input sequence, one which holds the original input events, and which
function-key-map also modifies, which would be copied before
key-translation-map was applies (and presumably would have to be re-run
from either the beginning or some other synchronization point if
function-key-map actually shrunk the input).

But the key-lookup machinery seems very complicated and fragile to me, so
it may not be so easy to make such a change...

-Miles
-- 
`...the Soviet Union was sliding in to an economic collapse so comprehensive
 that in the end its factories produced not goods but bads: finished products
 less valuable than the raw materials they were made from.'  [The Economist]

  reply	other threads:[~2002-05-21 13:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-19 18:25 define-key #2 ---> ineffective if key is bound D. Goel
2002-05-19 20:04 ` D. Goel
2002-05-20 21:34   ` Richard Stallman
2002-05-21 13:02     ` D. Goel
2002-05-21 13:33       ` Miles Bader [this message]
2002-05-20 14:48 ` Richard Stallman
2002-05-20 14:55   ` D. Goel

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=87k7pxpqw2.fsf@tc-1-100.kawasaki.gol.ne.jp \
    --to=miles@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).