[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7466: 24.0.50; (emacs) `Menu Mouse Clicks' conflicts with code obsol
From: |
Lars Magne Ingebrigtsen |
Subject: |
bug#7466: 24.0.50; (emacs) `Menu Mouse Clicks' conflicts with code obsolescence |
Date: |
Wed, 03 Aug 2011 22:39:30 +0200 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> 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/