how to bind to an existing keymap?
Opened this issue · 1 comments
Zoybean commented
ryo-modal-key
is documented as accepting a keymap as an argument, but passing one causes various kinds of "Wrong type argument" error.
I wasn't sure if I was meant to quote the name of the keymap, and I'm getting mixed results when I do.
(ryo-modal-key "x" ctl-x-map)
echoesryo-modal-key: Wrong type argument: listp, keymap
(ryo-modal-key "x" surround-keymap)
echoesryo-modal-key: Wrong type argument: listp, keymap
(ryo-modal-key "x" 'ctl-x-map)
echoeslet: Wrong type argument: listp, #^[nil nil keymap #^^[3 0 pop-global-mark nil list-buffers save-buffers-kill-terminal list-directory eval-last-sexp find-file nil nil ...] nil nil nil nil nil nil nil nil ...] nil nil nil nil nil nil nil nil ...] nil nil nil nil nil ...]
(ryo-modal-key "m" 'surround-keymap)
echoesapply: Wrong type argument: symbolp, #[0 "!" ["(" surround-mark] 2 nil nil]
critically, despite signalling an error, the last one does seem to successfully bind the surround-keymap
to m
. None of the others appear to have any effect.
Zoybean commented
For now the workaround of just binding each key manually works well enough - I only really want bindings for the surround-keymap which is about 6 keys.