- else if (ascii_strcasecmp ("noop", buf->data) == 0)
- km_bindkey (key, menu, OP_NULL); /* the `unbind' command */
- else
- {
- /* First check the "generic" list of commands */
- if (menu == MENU_PAGER || menu == MENU_EDITOR || menu == MENU_GENERIC ||
- try_bind (key, menu, buf->data, OpGeneric) != 0)
- {
- /* Now check the menu-specific list of commands (if they exist) */
- bindings = km_get_table (menu);
- if (bindings && try_bind (key, menu, buf->data, bindings) != 0)
- {
- snprintf (err->data, err->dsize, _("%s: no such function in map"), buf->data);
- r = -1;
+ else if (ascii_strcasecmp ("noop", buf->data) == 0) {
+ for (i = 0; i < nummenus; ++i) {
+ km_bindkey (key, menu[i], OP_NULL); /* the `unbind' command */
+ }
+ }
+ else {
+ for (i = 0; i < nummenus; ++i) {
+ /* First check the "generic" list of commands */
+ if (menu[i] == MENU_PAGER || menu[i] == MENU_EDITOR ||
+ menu[i] == MENU_GENERIC ||
+ try_bind (key, menu[i], buf->data, OpGeneric) != 0) {
+ /* Now check the menu-specific list of commands (if they exist) */
+ bindings = km_get_table (menu[i]);
+ if (bindings && try_bind (key, menu[i], buf->data, bindings) != 0) {
+ snprintf (err->data, err->dsize, _("%s: no such function in map"),
+ buf->data);
+ r = -1;
+ }