- /* 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 the our dispatcher */
+ for (i = 0; (seq = ici->bound_keyseqs[i]); i++)
+ rl_generic_bind(ISFUNC, seq, (char *)dispatch_key,
+ i9ep->bare_km);
+ i9ep->num_key_bindings = i;