From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Clearing keybindings when redefining a minor mode map Date: Mon, 27 Dec 2010 21:57:25 -0500 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1293507667 14608 80.91.229.12 (28 Dec 2010 03:41:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 28 Dec 2010 03:41:07 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 28 04:41:03 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PXQQp-0004IB-0B for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Dec 2010 04:41:03 +0100 Original-Received: from localhost ([127.0.0.1]:56234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PXQQj-0000dp-7p for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Dec 2010 22:40:57 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!news.glorb.com!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 11 Injection-Info: mx01.eternal-september.org; posting-host="vVLY7BbminM2r0OBdDtBhQ"; logging-data="9784"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18gt7o+vxrOBukIi7PQa1jg" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:mUhP8eNA9shQI62yr/+m3eGRZnc= sha1:e0WOJpzDiZzZPLAO1qCFMIyEgKA= Original-Xref: usenet.stanford.edu gnu.emacs.help:183696 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:77927 Archived-At: > 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