2015-04-03 Benno Schulenberg <bensberg@justemail.net>
- * README: Update text to the fifth milestone: 2.4.x, plus tweaks.
+ * README: Update text to the fifth milestone, 2.4.x, plus tweaks.
* src/rcfile.c: Remove two superfluous (because nested) #ifndefs.
+ * src/rcfile.c (parse_rcfile): Ignore any magic when libmagic was
+ disabled, and ignore a formatter when spell checking was disabled.
2015-03-28 Benno Schulenberg <bensberg@justemail.net>
* src/search.c (search_init_globals, search_replace_abort),
}
}
+#ifdef HAVE_LIBMAGIC
/* Parse the magic regexes that may influence the choice of syntax. */
void parse_magic_exp(char *ptr)
{
-#ifdef HAVE_LIBMAGIC
regexlisttype *endmagic = NULL;
assert(ptr != NULL);
} else
free(newmagic);
}
-#endif /* HAVE_LIBMAGIC */
}
+#endif /* HAVE_LIBMAGIC */
/* Parse the linter requested for this syntax. */
void parse_linter(char *ptr)
endsyntax->linter = mallocstrcpy(syntaxes->linter, ptr);
}
+#ifndef DISABLE_SPELLER
/* Parse the formatter requested for this syntax. */
void parse_formatter(char *ptr)
{
else
endsyntax->formatter = mallocstrcpy(syntaxes->formatter, ptr);
}
+#endif /* !DISABLE_SPELLER */
#endif /* !DISABLE_COLOR */
/* Check whether the user has unmapped every shortcut for a
parse_syntax(ptr);
}
else if (strcasecmp(keyword, "magic") == 0)
+#ifdef HAVE_LIBMAGIC
parse_magic_exp(ptr);
+#else
+ ;
+#endif
else if (strcasecmp(keyword, "header") == 0)
parse_header_exp(ptr);
else if (strcasecmp(keyword, "color") == 0)
else if (strcasecmp(keyword, "linter") == 0)
parse_linter(ptr);
else if (strcasecmp(keyword, "formatter") == 0)
+#ifndef DISABLE_SPELLER
parse_formatter(ptr);
+#else
+ ;
+#endif
#endif /* !DISABLE_COLOR */
else if (strcasecmp(keyword, "bind") == 0)
parse_binding(ptr, TRUE);