[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: key binding only when in a given minor mode and a given major mode?
From: |
David Kastrup |
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 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
"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
- Re: key binding only when in a given minor mode and a given major mode?,
David Kastrup <=