emacs-devel
[Top][All Lists]
Advanced

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

Re: Precise behavior of function-key-map and friends


From: Richard Stallman
Subject: Re: Precise behavior of function-key-map and friends
Date: Thu, 6 Jun 2002 18:45:06 -0600 (MDT)

    1 - The documentation says that function-key-map bindings only apply
      if there is no corresponding binding in the global map.

(Not just in the global map; in any active map.  Where does
the documentation say only the global map?)

      What about the case where I have a function-key-map binding that
      turns C-x into C-c.  Clearly C-x C-c will stays as it is, but
      what about C-x w (which has no binding) ?

      Currently C-x w is left as is.  Should function-key-map remap it
      to C-c w ?

No it should not.  C-x does have a binding, as a prefix key,
so function-key-map should not affect it.

    2 - key-translation-map says that the translation is always done, whether
      or not it has a binding in the normal maps.
      Among other things, this means that when you hit C-x 8 it will
      keep reading input because there's a chance that it will end up
      in a sequence of keys that can be translated by key-translation-map.
      So you can hit C-c C-x 8 ' e to enter the (unbound) C-c é key sequence.
      But note that C-x C-x 8 ' e does not work, because C-x C-x is bound
      and read-key-sequence will not keep reading input in this case.

We clearly do not want to change the behavior of C-x C-x.  It might be
ok to change the behavior of C-c C-x in regard to key-translation-map.
However, that behavior in the case of function-key-map is vital
for C-x F1 to work.

So I think you should not change any of this.

    3 - function-key-map applies only if the current key-sequence has
      no binding in the normal maps.  But since key-translation-map
      is applied unconditionally afterwards, the "has a binding" condition
      is not easy to decide (and is done incorrectly).

There is no need to define "correctly" to take account of
key-translation-map in this way.  In theory, it is a higher level of
"correct", but I doubt it ever matters to anyone in practice.  I
wouldn't spend five minutes trying to make this more abstractly
correct.






reply via email to

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