From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: How to override key binding for groovy-mode? Date: Tue, 8 Sep 2015 11:16:54 -0700 (PDT) Message-ID: References: <> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1441736250 2767 80.91.229.3 (8 Sep 2015 18:17:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Sep 2015 18:17:30 +0000 (UTC) To: "KARR, DAVID" , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 08 20:17:16 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZZNSE-0005bW-2g for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Sep 2015 20:17:14 +0200 Original-Received: from localhost ([::1]:36434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZNSE-0003vn-D1 for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Sep 2015 14:17:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZNS3-0003vT-97 for help-gnu-emacs@gnu.org; Tue, 08 Sep 2015 14:17:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZNRz-0000YE-1i for help-gnu-emacs@gnu.org; Tue, 08 Sep 2015 14:17:03 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:25607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZNRy-0000XS-Qa for help-gnu-emacs@gnu.org; Tue, 08 Sep 2015 14:16:58 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t88IGvul005732 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 8 Sep 2015 18:16:57 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t88IGtUR007217 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 8 Sep 2015 18:16:55 GMT Original-Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t88IGtqG026746; Tue, 8 Sep 2015 18:16:55 GMT In-Reply-To: <> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:107090 Archived-At: > What is the general procedure for overriding a key binding set by a packa= ge? >=20 > I have a global key binding for a function I wrote (using "global-set-key= "). > I recently started using "groovy-mode", but I noticed that this mode is > using my key to bind to something else. >=20 > What should I add in my "groovy-mode-hook" to make it use my global bindi= ng > instead? Or is there a "more correct" way to do this? Look for a `groovy-mode-map', i.e., a keymap that groovy-mode binds its keys in. It might have a different name. Then use `define-key' to=20 remove that binding (bind to nil to remove a binding). You can also use `define-key' to bind the groovy command to some other key in that map. (define-key groovy-mode-map THE-KEY nil) ; Remove binding (define-key groovy-mode-map OTHER-KEY THE-GROOVY-COMMAND) ; Move to a diff = key