From: Drew Adams <drew.adams@oracle.com>
To: "KARR, DAVID" <dk068x@att.com>, help-gnu-emacs@gnu.org
Subject: RE: How to override key binding for groovy-mode?
Date: Tue, 8 Sep 2015 11:16:54 -0700 (PDT) [thread overview]
Message-ID: <ef75fa4c-d044-45ac-aefb-ad88275dff04@default> (raw)
In-Reply-To: <<B8D164BED956C5439875951895CB4B223BEA2626@CAFRFD1MSGUSRIA.ITServices.sbc.com>>
> 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?
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.
(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
next parent reply other threads:[~2015-09-08 18:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <<B8D164BED956C5439875951895CB4B223BEA2626@CAFRFD1MSGUSRIA.ITServices.sbc.com>
2015-09-08 18:16 ` Drew Adams [this message]
2015-09-08 18:32 ` How to override key binding for groovy-mode? KARR, DAVID
2015-09-08 18:13 KARR, DAVID
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=ef75fa4c-d044-45ac-aefb-ad88275dff04@default \
--to=drew.adams@oracle.com \
--cc=dk068x@att.com \
--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.