Subject: Re: bug#7466: 24.0.50; (emacs) `Menu Mouse Clicks' conflicts with code obsolescence

From: Lars Magne Ingebrigtsen <[email-masked]>
Date: Wed, 03 Aug 2011 22:39:30 +0200

Stefan Monnier <[email-masked]> writes:

> But that doesn't work because such remapping don't work right for events
> with parameters such as mouse clicks.  I guess you can do:
>
>   (global-set-key [down-mouse-3] (cdr (assq 'C-down-mouse-3 global-map)))
>
> but it's ugly.  Maybe we need a way to ask `key-binding' to return
> menu-items rather than the binding specified in them.  But key-binding
> already takes many parameters..maybe we could abuse the `no-remap' arg
> for that?

---
Like the normal command loop, `key-binding' will remap the command
resulting from looking up KEY by looking up the command in the
current keymaps.  However, if the optional third argument NO-REMAP
is non-nil, `key-binding' returns the unmapped command.
---

Using `no-remap' for that sounds like a reasonable thing to do.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/