unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org, ponced16@netscape.net (David Ponce)
Subject: Re: Old CUA and new keyboard.c (was: Problem with latest CVS version of keyboard.c (solved) )
Date: 14 Jun 2002 01:44:34 +0200	[thread overview]
Message-ID: <5xofeehhgd.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <200206122349.g5CNn2221537@rum.cs.yale.edu>

"Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes:

> > > I was wondering why you need to wait for the next character after a
> > > C-x or C-c to see if they start a function key...  I don't think those
> > > specific keys will ever do that, so maybe you should only delay the
> > > use of key-translation-map in case the key is actually a potential
> > > candidate for starting a function key.
> > 
> > That sounds like a good approach.  I'll see what I can do with it.
> 
> Actually, C-x is already bound in function-key-map in the dumped
> Emacs because of the `C-x @ m', `C-x @ a', ... feature.

So in the future, we cannot remap [C-x] through key-translation-map.
I don't know whether that's critical.  It's not important for me
anymore.

> 
> The change in the code is pretty simple and feels right, so I might
> install it when I've tested it some more, but it doesn't solve the
> problem at hand.
> 

I doubt anyone will notice!

> It seems there's a fundamental incompatibility here.
> On the one hand key-translation-map needs to be applied as soon as C-x
> is pressed and on the other, it should not be applied if the user hits
> C-x @ m.
> 
> Anybody has a good idea how to reconcile those two constraints ?
> Why did cua use key-translation-map rather than a minor-mode keymap ?

Because I didn't know better at the time...

The tricky part was to differentiate between three cases:
1) Normal C-x/C-c when no highlighed region
2) The C-x/C-c cut&copy functionality on highlighted region
3) Retaining the normal prefix meaning if C-x X / C-c X 
   was typed quickly even with highlighted region.

Since key-translation-map allowed mapping to a function,
it seemed logical to use a function which handled all of
these situations.

The new cua does indeed use (several) minor-mode keymaps to
deal with this.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  parent reply	other threads:[~2002-06-13 23:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-12 14:33 Problem with latest CVS version of keyboard.c (solved) David Ponce
2002-06-12 15:19 ` Old CUA and new keyboard.c (was: Problem with latest CVS version of keyboard.c (solved) ) Stefan Monnier
2002-06-12 22:06   ` Kim F. Storm
2002-06-12 22:31     ` Stefan Monnier
2002-06-12 23:49       ` Stefan Monnier
2002-06-13  5:29         ` Eli Zaretskii
2002-06-13 23:45           ` Kim F. Storm
2002-06-13 23:44         ` Kim F. Storm [this message]
2002-06-14 15:14           ` Stefan Monnier

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=5xofeehhgd.fsf@kfs2.cua.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    --cc=ponced16@netscape.net \
    /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).