[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9417: digit-argument doesn't work with `key-translation-map'

From: Stefan Monnier
Subject: bug#9417: digit-argument doesn't work with `key-translation-map'
Date: Thu, 01 Sep 2011 22:37:44 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>>>>> "Le" == Le Wang <address@hidden> writes:

> repro:
> 1. emacs -Q
> 2. eval-region:

>   (define-key key-translation-map [(control x)] [(control j)])
>   (define-key key-translation-map [(control j)] [(control x)])

> 3. C-1 C-j C-f

> expectation: call `find-file'
> actual: call binding of C-j `eval-print-last-sexp'

> Emacs version: CVS Head built today on Windows 7.

I hope you meant "Bazaar head" since we stopped using CVS a few
years ago.

I think the problem is that universal-argument-other-key reads the key
just pressed with this-command-keys (which is the key after translation)
and then puts it into unread-command-events which will cause this key to
be re-translated.

My experience is that reading an event and putting it back into
unread-command-events is something fiendishly difficult to do right,
which prompted me to develop set-temporary-overlay-map, but this is not
ready for 24.1 (and it may never be ready, since it may come with
its own set of problems).

> In Emacs 23, the behavior is slightly different.  C-1 C-j calls
> `eval-print-last-sexp' withing the final C-f key chord.

And in both Emacs23 and current Bzr head, C-u 1 C-j gives me
 Args out of range: " C-x", 0, 5
tho it seems to depend on what I've done before.  This seems to be
a separate bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]