Closed matsievskiysv closed 4 years ago
Added modalka-supress-global
option for suppression of global-mode keymap when in modalka mode. This is used to make sure that no characters will be self-inserted when they are not binded.
I'll be frank, I'm not inclined to merge this. The motivation for having more than one mode is not clear to me, and I'd like to keep the package as simple as it is right now. You still can fork or make your own.
This PR extends modalka functionality to support multiple states (or modes). This is done by creating multiple keymaps based on the optional
state
argument. These keymaps are assigned tomodalka-mode
inminor-mode-map-alist
whenmodalka-switch-state
is called.For example:
This code defines two states: default and
motion
. They have different key bindings. To switch between them one must call an interactive functionmodalka-switch-state
. Current state name will appear in lighter in square braces.Introduced changes are compatible with current configuration syntax.
Minimal Emacs version had to be set to
25.1
. Keyword was switched due to thepackage-lint
complains.