[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Overriding major mode key bindings
From: |
Tim Johnson |
Subject: |
Overriding major mode key bindings |
Date: |
Sun, 4 Sep 2016 16:02:21 -0800 |
User-agent: |
Mutt/1.7.0 (2016-08-17) |
using GNU Emacs 24.3. on ubuntu 14.04
I have keybindings established using 'global-set-key.
Some are being clobbered by a major mode (python and elpy).
I've tried the following with a mode-hook function:
1) unsetting those key sequences
or
2) defining those key sequences as 'nil
3) remapping the mode functions to a keymap of my own device:
i.e. a C-c n prefix.
1) and 2) fail to override the elpy bindings
3) works.
After some research, it looks like what I really should do is
to create my own minor mode and and bind the keys the I want to
"protect" to that minor mode.
See
http://emacs.stackexchange.com/questions/352/how-to-override-major-mode-bindings/358#358
Am I on the right track? I am soliciting a second opinion.
If that's the way to go, I'm game to procede...
thanks
--
Tim
http://www.akwebsoft.com, http://www.tj49.com
- Overriding major mode key bindings,
Tim Johnson <=