unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: 'Juanma Barranquero' <lekktu@gmail.com>, 7466@debbugs.gnu.org
Subject: bug#7466: 24.0.50; (emacs) `Menu Mouse Clicks' conflicts with code obsolescence
Date: Wed, 03 Aug 2011 10:54:12 -0400	[thread overview]
Message-ID: <jwvy5zav9lb.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m3wrev9bwq.fsf@stories.gnus.org> (Lars Magne Ingebrigtsen's message of "Wed, 03 Aug 2011 09:44:53 +0200")

>>> 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





  reply	other threads:[~2011-08-03 14:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-22 16:51 bug#7466: 24.0.50; (emacs) `Menu Mouse Clicks' conflicts with code obsolescence Drew Adams
2011-07-14 14:53 ` Lars Magne Ingebrigtsen
2011-07-14 15:23   ` Juanma Barranquero
2011-07-14 15:28     ` Lars Magne Ingebrigtsen
2011-07-14 15:39       ` Juanma Barranquero
2011-07-15 15:57         ` Lars Magne Ingebrigtsen
2011-07-15 16:13           ` Juanma Barranquero
2011-07-16 13:50             ` Lawrence Mitchell
2011-07-16 20:47               ` Juanma Barranquero
2011-07-17  3:24   ` Stefan Monnier
2011-07-17 14:45     ` Drew Adams
2011-08-02 21:00       ` Lars Magne Ingebrigtsen
2011-08-03  1:18         ` Stefan Monnier
2011-08-03  7:44           ` Lars Magne Ingebrigtsen
2011-08-03 14:54             ` Stefan Monnier [this message]
2011-08-03 20:39               ` Lars Magne Ingebrigtsen
2021-09-25 20:44 ` Stefan Kangas
2021-09-25 21:13   ` bug#7466: [External] : " Drew Adams
2021-09-25 22:05     ` Stefan Kangas

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=jwvy5zav9lb.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=7466@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=lekktu@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).