Eliding an unneeded function.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5561 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
431cec477d
commit
33fb1746dd
|
@ -5,6 +5,7 @@
|
||||||
* src/winio.c (edit_redraw): Elide an unneeded variable and adjust
|
* src/winio.c (edit_redraw): Elide an unneeded variable and adjust
|
||||||
some wrappings and whitespace.
|
some wrappings and whitespace.
|
||||||
* src/proto.h: Delete two duplicate declarations.
|
* src/proto.h: Delete two duplicate declarations.
|
||||||
|
* src/rcfile.c (check_bad_binding): Elide this unneeded function.
|
||||||
|
|
||||||
2016-01-13 Benno Schulenberg <bensberg@justemail.net>
|
2016-01-13 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/files.c (save_poshistory): Reduce the indentation.
|
* src/files.c (save_poshistory): Reduce the indentation.
|
||||||
|
|
17
src/rcfile.c
17
src/rcfile.c
|
@ -389,20 +389,6 @@ void parse_syntax(char *ptr)
|
||||||
}
|
}
|
||||||
#endif /* !DISABLE_COLOR */
|
#endif /* !DISABLE_COLOR */
|
||||||
|
|
||||||
int check_bad_binding(sc *s)
|
|
||||||
{
|
|
||||||
#define BADLISTLEN 1
|
|
||||||
key_type badtypes[BADLISTLEN] = {META};
|
|
||||||
int badseqs[BADLISTLEN] = { 91 };
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < BADLISTLEN; i++)
|
|
||||||
if (s->type == badtypes[i] && s->seq == badseqs[i])
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check whether the given executable function is "universal" (meaning
|
/* Check whether the given executable function is "universal" (meaning
|
||||||
* any horizontal movement or deletion) and thus is present in almost
|
* any horizontal movement or deletion) and thus is present in almost
|
||||||
* all menus. */
|
* all menus. */
|
||||||
|
@ -544,7 +530,8 @@ void parse_binding(char *ptr, bool dobind)
|
||||||
fprintf(stderr, "s->seq = \"%d\"\n", newsc->seq);
|
fprintf(stderr, "s->seq = \"%d\"\n", newsc->seq);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (check_bad_binding(newsc)) {
|
/* Do not allow rebinding the equivalent of the Escape key. */
|
||||||
|
if (newsc->type == META && newsc->seq == 91) {
|
||||||
rcfile_error(N_("Sorry, keystroke \"%s\" may not be rebound"), newsc->keystr);
|
rcfile_error(N_("Sorry, keystroke \"%s\" may not be rebound"), newsc->keystr);
|
||||||
free(newsc);
|
free(newsc);
|
||||||
goto free_copy;
|
goto free_copy;
|
||||||
|
|
Loading…
Reference in New Issue