patch 9.0.1330: handling new value of an option has a long "else if" chain
Problem: Handling new value of an option has a long "else if" chain.
Solution: Use a function pointer. (Yegappan Lakshmanan, closes #12015)
diff --git a/src/insexpand.c b/src/insexpand.c
index a8d986a..779bf5e 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -2546,7 +2546,7 @@
* lambda expression.
*/
char *
-set_completefunc_option(void)
+did_set_completefunc(optset_T *args UNUSED)
{
if (option_set_callback_func(curbuf->b_p_cfu, &cfu_cb) == FAIL)
return e_invalid_argument;
@@ -2575,7 +2575,7 @@
* lambda expression.
*/
char *
-set_omnifunc_option(void)
+did_set_omnifunc(optset_T *args UNUSED)
{
if (option_set_callback_func(curbuf->b_p_ofu, &ofu_cb) == FAIL)
return e_invalid_argument;
@@ -2603,7 +2603,7 @@
* lambda expression.
*/
char *
-set_thesaurusfunc_option(void)
+did_set_thesaurusfunc(optset_T *args UNUSED)
{
int retval;