unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
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	[thread overview]
Message-ID: <jwvbrirn3u5.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: bb3e39cd.0407060123.13e88991@posting.google.com

> 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	other threads:[~2004-07-07 17:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-02 15:10 How to translate M-kp-multiply to M-* before key is mapped to function? paul
2004-07-02 15:28 ` Kai Grossjohann
2004-07-02 16:32 ` Kevin Rodgers
2004-07-04 21:51   ` paul
2004-07-05  8:01     ` paul
2004-07-05 18:05     ` Stefan Monnier
2004-07-06  9:23       ` paul
2004-07-07 17:13         ` Stefan Monnier [this message]

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=jwvbrirn3u5.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    /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.
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).