GNU bug report logs -
#7466
24.0.50; (emacs) `Menu Mouse Clicks' conflicts with code obsolescence
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Mon, 22 Nov 2010 16:50:02 UTC
Severity: minor
Found in version 24.0.50
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
Message #47 received at 7466 <at> debbugs.gnu.org (full text, mbox):
>>> I assume that we're not asking people to bind mouse-3 to
>>> (mouse-menu-major-mode-map)?
>> Why would you assume so?
> Because I tried that, and it didn't give me the same menu that's
> currently on `C-mouse-3'. :-)
Oh, right it's not what I thought. Yes, it's a bit inconvenient to move
the mapping from C-mouse-3 to mouse-3 because you really want to put
onto mouse-3 the menu-item that's on C-mouse-3, but
(global-set-key [down-mouse-3] (key-binding [C-down-mouse-3]))
will only give you the keymap returned by mouse-menu-major-mode-map
rather than the menu-item itself. You'd like to be able to do:
(global-set-key [down-mouse-3] [C-down-mouse-3])
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?
Stefan
This bug report was last modified 3 years and 240 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.