- /* FIXME: This is an arbitrary constant. */
- for (i = 0; i < 32 && (seq = ici->bound_keyseqs[i]); i++) {
- char buf[2] = {KEY_OFFSET + i, '\0'};
- /* readline needs an allocated buffer for the macro */
- rl_generic_bind(ISMACR, seq, para_strdup(buf), i9ep->bare_km);
- rl_bind_key_in_map(KEY_OFFSET + i, dispatch_key, i9ep->bare_km);
+ /* bind each key sequence to our dispatcher */
+ for (i = 0; (seq = ici->bound_keyseqs[i]); i++) {
+ if (rl_bind_keyseq_in_map(seq,
+ dispatch_key, i9ep->bare_km) != 0)
+ PARA_WARNING_LOG("could not bind #%d: %s\n", i, seq);