From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "KARR, DAVID" Newsgroups: gmane.emacs.help Subject: RE: How to override key binding for groovy-mode? Date: Tue, 8 Sep 2015 18:32:17 +0000 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 1441737231 19575 80.91.229.3 (8 Sep 2015 18:33:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Sep 2015 18:33:51 +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 Sep 08 20:33:38 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 1ZZNhs-0004rs-Mc for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Sep 2015 20:33:24 +0200 Original-Received: from localhost ([::1]:36496 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZNhs-0000NF-7b for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Sep 2015 14:33:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZNh9-0007z5-C3 for help-gnu-emacs@gnu.org; Tue, 08 Sep 2015 14:32:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZNh3-0007VQ-Lc for help-gnu-emacs@gnu.org; Tue, 08 Sep 2015 14:32:39 -0400 Original-Received: from mx0b-00191d01.pphosted.com ([67.231.157.136]:52151) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZNh3-0007V3-Hf for help-gnu-emacs@gnu.org; Tue, 08 Sep 2015 14:32:33 -0400 Original-Received: from pps.filterd (m0049459.ppops.net [127.0.0.1]) by m0049459.ppops.net-00191d01. (8.15.0.59/8.15.0.59) with SMTP id t88ITnls017045 for ; Tue, 8 Sep 2015 14:32:32 -0400 Original-Received: from flpi408.enaf.ffdc.sbc.com (sbcsmtp9.sbc.com [144.160.128.153]) by m0049459.ppops.net-00191d01. with ESMTP id 1wqv7r07af-1 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 08 Sep 2015 14:32:32 -0400 Original-Received: from enaf.ffdc.sbc.com (localhost.localdomain [127.0.0.1]) by flpi408.enaf.ffdc.sbc.com (8.14.5/8.14.5) with ESMTP id t88IWVj6019393 for ; Tue, 8 Sep 2015 11:32:31 -0700 Original-Received: from flpi489.ffdc.sbc.com (flpi489.ffdc.sbc.com [130.4.162.183]) by flpi408.enaf.ffdc.sbc.com (8.14.5/8.14.5) with ESMTP id t88IWPIc019351 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 8 Sep 2015 11:32:26 -0700 Original-Received: from CAFRFD1MSGHUBAF.ITServices.sbc.com (CAFRFD1MSGHUBAF.itservices.sbc.com [130.4.169.177]) by flpi489.ffdc.sbc.com (RSA Interceptor) for ; Tue, 8 Sep 2015 18:32:18 GMT Original-Received: from CAFRFD1MSGUSRIA.ITServices.sbc.com ([169.254.1.232]) by CAFRFD1MSGHUBAF.ITServices.sbc.com ([130.4.169.177]) with mapi id 14.03.0248.002; Tue, 8 Sep 2015 11:32:17 -0700 Thread-Topic: How to override key binding for groovy-mode? Thread-Index: AQHQ6mKKc8JMHSiiS5izIaLC4w9Wtp4y9Gew In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [141.204.181.129] X-RSA-Inspected: yes X-RSA-Classifications: public X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2015-09-08_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_policy_notspam policy=outbound_policy score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1507310000 definitions=main-1509080257 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 67.231.157.136 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:107091 Archived-At: > -----Original Message----- > From: Drew Adams [mailto:drew.adams@oracle.com] > Sent: Tuesday, September 08, 2015 11:17 AM > To: KARR, DAVID; help-gnu-emacs@gnu.org > Subject: RE: How to override key binding for groovy-mode? >=20 > > What is the general procedure for overriding a key binding set by > a package? > > > > 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. > > > > What should I add in my "groovy-mode-hook" to make it use my > global binding > > instead? Or is there a "more correct" way to do this? >=20 > 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 > 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. >=20 > (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 Thanks, putting the first one into my mode hook disabled the Groovy binding= .