Allowing binding and unbinding of keys when colour is disabled.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4685 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2014-03-26 19:25:38 +00:00
parent a166f702a0
commit a997aa6d58
2 changed files with 8 additions and 6 deletions

View File

@ -7,6 +7,7 @@
* nano.spec.in, doc/faq.html, doc/texinfo/nano.texi - Remove * nano.spec.in, doc/faq.html, doc/texinfo/nano.texi - Remove
vestiges of the obsolete '--enable-all' configure flag. vestiges of the obsolete '--enable-all' configure flag.
* src/rcfile.c - Fix compilation with --disable-color. * src/rcfile.c - Fix compilation with --disable-color.
* src/rcfile.c - Allow (un)binding keys when colour is disabled.
2014-03-26 Mike Frysinger <vapier@gentoo.org>. 2014-03-26 Mike Frysinger <vapier@gentoo.org>.
* configure.ac - Clean up most of the --with/--enable flags: * configure.ac - Clean up most of the --with/--enable flags:

View File

@ -446,6 +446,7 @@ void parse_magictype(char *ptr)
} }
#endif /* HAVE_LIBMAGIC */ #endif /* HAVE_LIBMAGIC */
} }
#endif /* ENABLE_COLOR */
int check_bad_binding(sc *s) int check_bad_binding(sc *s)
@ -617,6 +618,7 @@ void parse_unbinding(char *ptr)
} }
#ifdef ENABLE_COLOR
/* Read and parse additional syntax files. */ /* Read and parse additional syntax files. */
void parse_include(char *ptr) void parse_include(char *ptr)
{ {
@ -1094,22 +1096,21 @@ void parse_rcfile(FILE *rcstream
endsyntax->desc); endsyntax->desc);
parse_syntax(ptr); parse_syntax(ptr);
} }
else if (strcasecmp(keyword, "magic") == 0) { else if (strcasecmp(keyword, "magic") == 0)
parse_magictype(ptr); parse_magictype(ptr);
} else if (strcasecmp(keyword, "header") == 0) else if (strcasecmp(keyword, "header") == 0)
parse_headers(ptr); parse_headers(ptr);
else if (strcasecmp(keyword, "color") == 0) else if (strcasecmp(keyword, "color") == 0)
parse_colors(ptr, FALSE); parse_colors(ptr, FALSE);
else if (strcasecmp(keyword, "icolor") == 0) else if (strcasecmp(keyword, "icolor") == 0)
parse_colors(ptr, TRUE); parse_colors(ptr, TRUE);
else if (strcasecmp(keyword, "linter") == 0)
parse_linter(ptr);
#endif /* ENABLE_COLOR */
else if (strcasecmp(keyword, "bind") == 0) else if (strcasecmp(keyword, "bind") == 0)
parse_keybinding(ptr); parse_keybinding(ptr);
else if (strcasecmp(keyword, "unbind") == 0) else if (strcasecmp(keyword, "unbind") == 0)
parse_unbinding(ptr); parse_unbinding(ptr);
else if (strcasecmp(keyword, "linter") == 0) {
parse_linter(ptr);
}
#endif /* ENABLE_COLOR */
else else
rcfile_error(N_("Command \"%s\" not understood"), keyword); rcfile_error(N_("Command \"%s\" not understood"), keyword);