all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: Clearing keybindings when redefining a minor mode map
Date: Mon, 27 Dec 2010 21:57:25 -0500	[thread overview]
Message-ID: <jwvk4iuip19.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: mailman.6.1293434384.29764.help-gnu-emacs@gnu.org

> Suppose I have a keybinding that is shared by two minor modes (mode A
> and mode B).  I want to accomplish the following: if both modes A and B are
> active, then the keybinding should only invoke mode A's command.

Then you need to make sure that mode A's keymap appears before mode B's
in minor-mode-map-alist.  You might be able to do that by loading mode
B first, or else by adding a check somewhere to see which one's first
and reorder them when needed.


        Stefan


  parent reply	other threads:[~2010-12-28  2:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.6.1293434384.29764.help-gnu-emacs@gnu.org>
2010-12-27 13:58 ` Clearing keybindings when redefining a minor mode map Elena
2010-12-28  2:57 ` Stefan Monnier [this message]
2010-12-27  7:19 Leo Alekseyev

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvk4iuip19.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.