MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / map_init_emacs

Function map_init_emacs

extern/editline/src/map.c:1047–1075  ·  view source on GitHub ↗

map_init_emacs(): * Initialize the emacs bindings */

Source from the content-addressed store, hash-verified

1045 * Initialize the emacs bindings
1046 */
1047protected void
1048map_init_emacs(EditLine *el)
1049{
1050 int i;
1051 Char buf[3];
1052 el_action_t *key = el->el_map.key;
1053 el_action_t *alt = el->el_map.alt;
1054 const el_action_t *emacs = el->el_map.emacs;
1055
1056 el->el_map.type = MAP_EMACS;
1057 el->el_map.current = el->el_map.key;
1058 keymacro_reset(el);
1059
1060 for (i = 0; i < N_KEYS; i++) {
1061 key[i] = emacs[i];
1062 alt[i] = ED_UNASSIGNED;
1063 }
1064
1065 map_init_meta(el);
1066 map_init_nls(el);
1067
1068 buf[0] = CONTROL('X');
1069 buf[1] = CONTROL('X');
1070 buf[2] = 0;
1071 keymacro_add(el, buf, keymacro_map_cmd(el, EM_EXCHANGE_MARK), XK_CMD);
1072
1073 tty_bind_char(el, 1);
1074 terminal_bind_arrow(el);
1075}
1076
1077
1078/* map_set_editor():

Callers 3

map_initFunction · 0.85
map_set_editorFunction · 0.85
map_bindFunction · 0.85

Calls 7

keymacro_resetFunction · 0.85
map_init_metaFunction · 0.85
map_init_nlsFunction · 0.85
keymacro_addFunction · 0.85
keymacro_map_cmdFunction · 0.85
tty_bind_charFunction · 0.85
terminal_bind_arrowFunction · 0.85

Tested by

no test coverage detected