Support for set-keymap-parent
Closed this issue · 2 comments
I admittedly am quite new to emacs and to this package as well. My situation is that I have some bindings that should appear under a prefix for certain modes only, which are not known at the time the bindings are created. Additionally, these modes should be able to add additional bindings under the same prefix for mode-specific operations.
What I was imagining was to create a keymap for the shared bindings and inherit a new keymap from it if additional bindings need to be set, and then assigning the prefix to the whichever map I want on a per mode basis.
Let me know what would be the best way to achieve this, should I just use set-keymap-parent after defining the new keymap or is there a more general "idiomatic way of achieving this functionality.
I think you could just bind a key globally to the prefix map with the shared bindings and then bind your mode specific keys in the mode's keymap. If that wouldn't do what you want, could you provide concrete example keybindings?
Does not quite do what I want I don't want the commands to be available globally, but my extra functionality made sense as a minor mode so I went that route, and bound the commands in the minor mode map.