From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Alekseyev Newsgroups: gmane.emacs.help Subject: Clearing keybindings when redefining a minor mode map Date: Sun, 26 Dec 2010 23:19:37 -0800 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1293434425 25729 80.91.229.12 (27 Dec 2010 07:20:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Dec 2010 07:20:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 27 08:20:18 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 1PX7NS-00065x-1H for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Dec 2010 08:20:18 +0100 Original-Received: from localhost ([127.0.0.1]:38424 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PX7NR-0000LM-0H for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Dec 2010 02:20:17 -0500 Original-Received: from [140.186.70.92] (port=49422 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PX7Mr-0000LH-NY for help-gnu-emacs@gnu.org; Mon, 27 Dec 2010 02:19:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PX7Mq-0000zK-RT for help-gnu-emacs@gnu.org; Mon, 27 Dec 2010 02:19:41 -0500 Original-Received: from mail-fx0-f41.google.com ([209.85.161.41]:44225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PX7Mq-0000zB-MD for help-gnu-emacs@gnu.org; Mon, 27 Dec 2010 02:19:40 -0500 Original-Received: by fxm12 with SMTP id 12so2346988fxm.0 for ; Sun, 26 Dec 2010 23:19:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=7XQn0eQZM9kPtbuy1d8DKUsKQ3uaf+GeqxTqRVbxs1A=; b=I9ZHPb17XQwKdzQvws1YyW5+Nc/3sd+vNcT/GqZtw4X22jeGTIlMaTzUEZDv4adiMv uordqNi/LdgwV/HZALg2FiqA5vSqEgN4fJbP1slTLd2X/TybBjJYJPSQZzH+461Z1nDw cf/qc2lIxEHSfFtU+ZcL9/2FM4//At/wr5wKo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=h+4VXCYQRjmt2SHndRT6AlvNIPjyHTmqIfpERvpd9Dtn9fzavN9Zy0vUWXqHvsMv3p d08ZSgYMJukmziZYzsIfGNRy+PZW5vLuHlXrtk9uGMNnnVOx8tbANBnkTV4bMB/0BixD BvdMw80Qb74f0DRarAQpVFTzgLTz5gmzRiYog= Original-Received: by 10.223.93.144 with SMTP id v16mr1992214fam.35.1293434377559; Sun, 26 Dec 2010 23:19:37 -0800 (PST) Original-Received: by 10.223.101.131 with HTTP; Sun, 26 Dec 2010 23:19:37 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:77904 Archived-At: Greetings all, 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. My original approach was to insert code in mode B's commands that checks if mode A is active, and if so, it creates a new keymap for mode B, with conflicts removed. Unfortunately, even though the new map is created properly, it doesn't remove the old keybindings that are in conflict with mode A. Is there an easy way to clear those keybindings? --Leo