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

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

Re: How to translate M-kp-multiply to M-* before key is mapped to functi


From: Stefan Monnier
Subject: Re: How to translate M-kp-multiply to M-* before key is mapped to function?
Date: Wed, 07 Jul 2004 17:13:28 GMT
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> Although it indeed remaps the key unto the correct key, it does *NOT* call
> the function bound to that key.  This is due to the order in which this
> remapping is done, it happens *after* the effects of global-set-key, as
> far as I can tell (at least it does for M-*, pop-tag-mark).

No, you are mistaken.  The problem you're seeing must be due to
something else.  The way it works is:

- if the key is bound in the normal maps, use the binding.
- else if the key has a binding is function-key-map, do the rebinding
  and then look up the result in the normal maps.

So one problem may be if you have M-kp-multiply bound to a function
in one of the normal maps (global, of buffer-local), in which case
function-key-map will indeed be ignored.

Another problem might be if M-kp-multiply is not coming directly from the
keyboard but is itself the result of mapping some keyboard's input through
function-key-map, in which case it will not go through function-key-map
again.  This can happen e.g. if you run in a text terminal.

You can also try (define-key key-translation-map [M-kp-multiply] [?\M-*])
because key-translation-map does the translation whether there is a normal
binding or not.


        Stefan


reply via email to

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