bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: define-key #2 ---> ineffective if key is bound...


From: D. Goel
Subject: Re: define-key #2 ---> ineffective if key is bound...
Date: 21 May 2002 09:02:07 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

>     By viewing lossage, it emerges that when i press up-arrow, emacs sees
>     ESC o A instead of ESC O A.
> 
>     This shoudl not have happened, because if you look at the
>     function-key-map in the parent-mail, the function-key-map should have
>     translated this ESC O A into 'up' before this key-combination could
>     have ever reached key-translation-map. 
> 
> As soon as Emacs receives ESC O, key-translation-map goes to work.
> function-key-map cannot go to work yet because Emacs has received only
> part of the sequence that translates into the function key.


RMS

i had suspected the same..  i was looking at keyboard.c --- this is
from line 8078:

(this is where function-key-map is doing its work)---->
+----
|   /* If the best binding for the current key sequence is a keymap, or
|      we may be looking at a function key's escape sequence, keep on
|      reading.  */
+----


It seems to me that the intention was: 

keep reading if we are in the middle of a possible
function-key-sequence and if there are input-characters waiting.. 

.. and that IMHO, seems to be the way to do it..  when it will keep
reading, it will see the next A and then it will convert the ESC O A
into 'up before the thing ever reaches key-translation-map. 



Moreover, from the doc of the elisp-manual, 

+----
|  - Variable: keyboard-translate-table
|      This variable is the translate table for keyboard characters.  It
|      lets you reshuffle the keys on the keyboard without changing any
|      command bindings.  Its value is normally a char-table, or else
|      `nil'
+----

<-- 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.  Shouldn't one of the two (key-translation-map
and keyboard-translate-table) allow us this side-effect-free
shiffling?



if i got that right conceptually, would you like me to try to trace
the 'bug' in keyboard.c ? 




D                                  <http://www.glue.umd.edu/~deego/>
-- 
help get my Debian GNU/Linux see the surfboard-cable-modem? anyone?




reply via email to

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