rigpa
rigpa copied to clipboard
enhancement: Use keybinding signals?
@countvajhula Aha, I've found your "mode-mode" at last! Here I think is huge potential for this idea
I really like corkey's idea of signals, which decouple conceptual operations (e.g. "eval current form") from concrete and mode-specific implementations.
There is a lightweight (57 sloc) package around this idea here: https://github.com/lilactown/kitten/blob/main/lisp/reflex.el
that let's you write code like this:
binding keys to signals: https://github.com/lilactown/kitten/blob/main/user/keybinds.el#L91-L112
providing functionality to the signals for a given mode: https://github.com/lilactown/kitten/blob/main/modules/kitten-clojure.el#L40-L57
See also https://github.com/drym-org/symex.el/issues/65