From: David Kastrup <dak@gnu.org>
Subject: Re: key binding only when in a given minor mode and a given major mode?
Date: Sun, 13 Aug 2006 23:35:43 +0200 [thread overview]
Message-ID: <85psf4xqs0.fsf@lola.goethe.zz> (raw)
In-Reply-To: mailman.5150.1155503814.9609.help-gnu-emacs@gnu.org
"Drew Adams" <drew.adams@oracle.com> writes:
> I have a minor mode that binds some keys in its minor-mode map. In some
> cases, these shadow global bindings. When the mode is turned off, the
> minor-mode bindings are no longer in effect.
>
> That works fine, but what happens when the binding I want to shadow
> is not a global binding but a major-mode binding? What's a good way
> to create a binding that will only be effective when in both a
> particular major mode and a particular minor mode? When not in that
> minor mode, but still in the major mode, I want the major-mode
> binding to be in effect, and when not in that major mode, I want the
> global binding to be in effect.
Uh, minor modes are by default local. Are you using a global minor
mode for some reason?
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
next parent reply other threads:[~2006-08-13 21:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.5150.1155503814.9609.help-gnu-emacs@gnu.org>
2006-08-13 21:35 ` David Kastrup [this message]
2006-08-13 21:54 ` key binding only when in a given minor mode and a given majormode? Drew Adams
2006-08-13 22:43 ` key binding only when in a given minor mode and a given major mode? David Kastrup
2006-08-13 21:16 Drew Adams
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85psf4xqs0.fsf@lola.goethe.zz \
--to=dak@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).