tweaks: correct a comment, and drop a redundant (because nested) #ifdef
Also, drop an unneeded case-insensivity when comparing two strings, as all commands in a nanorc file have to be in lower case.master
parent
8089f5ad54
commit
d7743b05f0
|
@ -1230,7 +1230,7 @@ void pick_up_name(const char *kind, char *ptr, char **storage)
|
|||
*storage = mallocstrcpy(*storage, ptr);
|
||||
}
|
||||
|
||||
/* Handle the four syntax-only commands. */
|
||||
/* Handle the six syntax-only commands. */
|
||||
bool parse_syntax_commands(char *keyword, char *ptr)
|
||||
{
|
||||
if (strcmp(keyword, "color") == 0)
|
||||
|
@ -1242,9 +1242,7 @@ bool parse_syntax_commands(char *keyword, char *ptr)
|
|||
pick_up_name("comment", ptr, &live_syntax->comment);
|
||||
#endif
|
||||
} else if (strcmp(keyword, "tabgives") == 0) {
|
||||
#ifdef ENABLE_COLOR
|
||||
pick_up_name("tabgives", ptr, &live_syntax->tab);
|
||||
#endif
|
||||
} else if (strcmp(keyword, "linter") == 0)
|
||||
pick_up_name("linter", ptr, &live_syntax->linter);
|
||||
else if (strcmp(keyword, "formatter") == 0)
|
||||
|
@ -1410,7 +1408,7 @@ void parse_rcfile(FILE *rcstream, bool just_syntax, bool intros_only)
|
|||
if (!opensyntax)
|
||||
jot_error(N_("A '%s' command requires a preceding "
|
||||
"'syntax' command"), keyword);
|
||||
if (strcasestr("icolor", keyword))
|
||||
if (strstr("icolor", keyword))
|
||||
seen_color_command = TRUE;
|
||||
continue;
|
||||
} else if (parse_syntax_commands(keyword, ptr))
|
||||
|
|
Loading…
Reference in New Issue