* src/rcfile.c (parse_binding): K-keys no longer exist.
* src/global.c, src/rcfile.c, doc/nanorc.sample.in: Allow the
codes from the Ins and Del keys to be rebound.
+ * src/rcfile.c (parse_binding): Improve two error messages, and
+ complain about wrong menu names after wrong function names.
2014-04-16 Benno Schulenberg <bensberg@justemail.net>
* src/winio.c (get_mouseinput): Properly find also the zeroeth
ptr = parse_next_word(ptr);
if (!strcmp(funcptr, "")) {
- rcfile_error(N_("Must specify function to bind key to"));
+ rcfile_error(N_("Must specify a function to bind the key to"));
return;
}
}
if (!strcmp(menuptr, "")) {
/* TRANSLATORS: Do not translate the word "all". */
- rcfile_error(N_("Must specify menu in which to bind/unbind key (or \"all\")"));
- return;
- }
-
- menu = strtomenu(menuptr);
- if (menu < 1) {
- rcfile_error(N_("Cannot map name \"%s\" to a menu"), menuptr);
+ rcfile_error(N_("Must specify a menu (or \"all\") in which to bind/unbind the key"));
return;
}
}
}
+ menu = strtomenu(menuptr);
+ if (menu < 1) {
+ rcfile_error(N_("Cannot map name \"%s\" to a menu"), menuptr);
+ return;
+ }
+
#ifdef DEBUG
if (dobind)
fprintf(stderr, "newsc address is now %ld, assigned func = %ld, menu = %x\n",