summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/buffer.c2
-rw-r--r--src/clipboard.c2
-rw-r--r--src/evalfunc.c4
-rw-r--r--src/ex_cmds.c2
-rw-r--r--src/ex_docmd.c2
-rw-r--r--src/ex_getln.c2
-rw-r--r--src/gui_xim.c16
-rw-r--r--src/hardcopy.c4
-rw-r--r--src/if_mzsch.c6
-rw-r--r--src/insexpand.c6
-rw-r--r--src/map.c14
-rw-r--r--src/ops.c2
-rw-r--r--src/option.c727
-rw-r--r--src/option.h2
-rw-r--r--src/optiondefs.h1198
-rw-r--r--src/optionstr.c819
-rw-r--r--src/proto/clipboard.pro2
-rw-r--r--src/proto/ex_getln.pro2
-rw-r--r--src/proto/gui_xim.pro4
-rw-r--r--src/proto/hardcopy.pro4
-rw-r--r--src/proto/if_mzsch.pro2
-rw-r--r--src/proto/insexpand.pro6
-rw-r--r--src/proto/map.pro2
-rw-r--r--src/proto/ops.pro2
-rw-r--r--src/proto/option.pro65
-rw-r--r--src/proto/optionstr.pro73
-rw-r--r--src/proto/quickfix.pro2
-rw-r--r--src/proto/spell.pro2
-rw-r--r--src/proto/tag.pro2
-rw-r--r--src/quickfix.c2
-rw-r--r--src/spell.c6
-rw-r--r--src/spellfile.c2
-rw-r--r--src/spellsuggest.c2
-rw-r--r--src/structs.h30
-rw-r--r--src/tag.c2
-rw-r--r--src/version.c2
-rw-r--r--src/vim.h6
37 files changed, 1518 insertions, 1510 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 8fd81be869..cb7bdf445d 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1971,7 +1971,7 @@ enter_buffer(buf_T *buf)
// May need to set the spell language. Can only do this after the buffer
// has been properly setup.
if (!curbuf->b_help && curwin->w_p_spell && *curwin->w_s->b_p_spl != NUL)
- (void)did_set_spelllang(curwin);
+ (void)parse_spelllang(curwin);
#endif
#ifdef FEAT_VIMINFO
curbuf->b_last_used = vim_time();
diff --git a/src/clipboard.c b/src/clipboard.c
index e140113ff7..b09c678c22 100644
--- a/src/clipboard.c
+++ b/src/clipboard.c
@@ -1253,7 +1253,7 @@ clip_gen_owner_exists(Clipboard_T *cbd UNUSED)
* Return an error message or NULL for success.
*/
char *
-check_clipboard_option(void)
+did_set_clipboard(optset_T *args UNUSED)
{
int new_unnamed = 0;
int new_autoselect_star = FALSE;
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 7f6cbac041..cf30ed7623 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -9940,7 +9940,7 @@ f_spellbadword(typval_T *argvars UNUSED, typval_T *rettv)
if (!curwin->w_p_spell)
{
- did_set_spelllang(curwin);
+ parse_spelllang(curwin);
curwin->w_p_spell = TRUE;
}
@@ -10030,7 +10030,7 @@ f_spellsuggest(typval_T *argvars UNUSED, typval_T *rettv)
if (!curwin->w_p_spell)
{
- did_set_spelllang(curwin);
+ parse_spelllang(curwin);
curwin->w_p_spell = TRUE;
}
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 7fd095268a..0d8398062d 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -3142,7 +3142,7 @@ do_ecmd(
// If the window options were changed may need to set the spell language.
// Can only do this after the buffer has been properly setup.
if (did_get_winopts && curwin->w_p_spell && *curwin->w_s->b_p_spl != NUL)
- (void)did_set_spelllang(curwin);
+ (void)parse_spelllang(curwin);
#endif
if (command == NULL)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index e51f84997d..be0e3465d1 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -1570,7 +1570,7 @@ getline_cookie(
#endif
}
-#if defined(FEAT_EVAL) || defined(PROT)
+#if defined(FEAT_EVAL) || defined(PROTO)
/*
* Get the next line source line without advancing.
*/
diff --git a/src/ex_getln.c b/src/ex_getln.c
index b2bf4ed329..a938bd6b60 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -4366,7 +4366,7 @@ get_list_range(char_u **str, int *num1, int *num2)
* Returns NULL if value is OK, error message otherwise.
*/
char *
-check_cedit(void)
+did_set_cedit(optset_T *args UNUSED)
{
int n;
diff --git a/src/gui_xim.c b/src/gui_xim.c
index 86273b5c3d..0d7b56e56b 100644
--- a/src/gui_xim.c
+++ b/src/gui_xim.c
@@ -13,6 +13,18 @@
#include "vim.h"
+#if !defined(GTK_CHECK_VERSION)
+# define GTK_CHECK_VERSION(a, b, c) 0
+#endif
+#if !defined(FEAT_GUI_GTK) && defined(PROTO)
+typedef int GtkWidget;
+typedef int GtkIMContext;
+typedef int gchar;
+typedef int gpointer;
+typedef int PangoAttrIterator;
+typedef int GdkEventKey;
+#endif
+
#if defined(FEAT_GUI_GTK) && defined(FEAT_XIM)
# if GTK_CHECK_VERSION(3,0,0)
# include <gdk/gdkkeysyms-compat.h>
@@ -74,7 +86,7 @@ static callback_T imaf_cb; // 'imactivatefunc' callback function
static callback_T imsf_cb; // 'imstatusfunc' callback function
char *
-set_imactivatefunc_option(void)
+did_set_imactivatefunc(optset_T *args UNUSED)
{
if (option_set_callback_func(p_imaf, &imaf_cb) == FAIL)
return e_invalid_argument;
@@ -83,7 +95,7 @@ set_imactivatefunc_option(void)
}
char *
-set_imstatusfunc_option(void)
+did_set_imstatusfunc(optset_T *args UNUSED)
{
if (option_set_callback_func(p_imsf, &imsf_cb) == FAIL)
return e_invalid_argument;
diff --git a/src/hardcopy.c b/src/hardcopy.c
index da3879b8c4..f6be017c33 100644
--- a/src/hardcopy.c
+++ b/src/hardcopy.c
@@ -144,7 +144,7 @@ static colnr_T hardcopy_line(prt_settings_T *psettings, int page_line, prt_pos_T
* Returns an error message or NULL;
*/
char *
-parse_printoptions(void)
+parse_printoptions(optset_T *args UNUSED)
{
return parse_list_options(p_popt, printer_opts, OPT_PRINT_NUM_OPTIONS);
}
@@ -155,7 +155,7 @@ parse_printoptions(void)
* Returns an error message or NULL;
*/
char *
-parse_printmbfont(void)
+parse_printmbfont(optset_T *args UNUSED)
{
return parse_list_options(p_pmfn, mbfont_opts, OPT_MBFONT_NUM_OPTIONS);
}
diff --git a/src/if_mzsch.c b/src/if_mzsch.c
index 7492237666..39d1530fe5 100644
--- a/src/if_mzsch.c
+++ b/src/if_mzsch.c
@@ -886,13 +886,15 @@ remove_timer(void)
timer_id = 0;
}
- void
-mzvim_reset_timer(void)
+ char *
+did_set_mzquantum(void)
{
+ // reset timer
if (timer_id != 0)
remove_timer();
if (mz_threads_allow && p_mzq > 0 && gui.in_use)
setup_timer();
+ return NULL;
}
#endif // MZSCHEME_GUI_THREADS
diff --git a/src/insexpand.c b/src/insexpand.c
index a8d986a2cd..779bf5eeb8 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -2546,7 +2546,7 @@ copy_global_to_buflocal_cb(callback_T *globcb, callback_T *bufcb)
* 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 @@ set_buflocal_cfu_callback(buf_T *buf UNUSED)
* 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 @@ set_buflocal_ofu_callback(buf_T *buf UNUSED)
* lambda expression.
*/
char *
-set_thesaurusfunc_option(void)
+did_set_thesaurusfunc(optset_T *args UNUSED)
{
int retval;
diff --git a/src/map.c b/src/map.c
index 9a6cdb143c..92f76512ab 100644
--- a/src/map.c
+++ b/src/map.c
@@ -3034,8 +3034,8 @@ langmap_init(void)
* Called when langmap option is set; the language map can be
* changed at any time!
*/
- void
-langmap_set(void)
+ char *
+did_set_langmap(optset_T *args UNUSED)
{
char_u *p;
char_u *p2;
@@ -3088,9 +3088,11 @@ langmap_set(void)
}
if (to == NUL)
{
+ // TODO: Need to use errbuf argument for this error message
+ // and return it.
semsg(_(e_langmap_matching_character_missing_for_str),
transchar(from));
- return;
+ return NULL;
}
if (from >= 256)
@@ -3110,8 +3112,10 @@ langmap_set(void)
{
if (p[0] != ',')
{
+ // TODO: Need to use errbuf argument for this error
+ // message and return it.
semsg(_(e_langmap_extra_characters_after_semicolon_str), p);
- return;
+ return NULL;
}
++p;
}
@@ -3120,6 +3124,8 @@ langmap_set(void)
}
}
}
+
+ return NULL;
}
#endif
diff --git a/src/ops.c b/src/ops.c
index 138edc73f5..01d2e95f85 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -3406,7 +3406,7 @@ static callback_T opfunc_cb;
* Returns OK or FAIL.
*/
char *
-set_operatorfunc_option(void)
+did_set_operatorfunc(optset_T *args UNUSED)
{
if (option_set_callback_func(p_opfunc, &opfunc_cb) == FAIL)
return e_invalid_argument;
diff --git a/src/option.c b/src/option.c
index 2332f2a388..d93d3859fb 100644
--- a/src/option.c
+++ b/src/option.c
@@ -952,13 +952,13 @@ set_init_2(void)
#endif
#ifdef CURSOR_SHAPE
- parse_shape_opt(SHAPE_CURSOR); // set cursor shapes from 'guicursor'
+ parse_shape_opt(SHAPE_CURSOR); // set cursor shapes from 'guicursor'
#endif
#ifdef FEAT_MOUSESHAPE
- parse_shape_opt(SHAPE_MOUSE); // set mouse shapes from 'mouseshape'
+ parse_shape_opt(SHAPE_MOUSE); // set mouse shapes from 'mouseshape'
#endif
#ifdef FEAT_PRINTER
- (void)parse_printoptions(); // parse 'printoptions' default value
+ (void)parse_printoptions(NULL); // parse 'printoptions' default value
#endif
}
@@ -2032,7 +2032,7 @@ do_set_option_string(
// options. Note: when setting 'syntax' or 'filetype' autocommands may
// be triggered that can cause havoc.
*errmsg = did_set_string_option(
- opt_idx, (char_u **)varp, oldval, errbuf,
+ opt_idx, (char_u **)varp, oldval, newval, errbuf,
opt_flags, value_checked);
secure = secure_saved;
@@ -2844,10 +2844,10 @@ didset_options(void)
(void)did_set_spell_option(TRUE);
#endif
// set cedit_key
- (void)check_cedit();
+ (void)did_set_cedit(NULL);
#ifdef FEAT_LINEBREAK
// initialize the table for 'breakat'.
- fill_breakat_flags();
+ did_set_breakat(NULL);
#endif
after_copy_winopt(curwin);
}
@@ -2872,7 +2872,7 @@ didset_options2(void)
#ifdef FEAT_CLIPBOARD
// Parse default for 'clipboard'
- (void)check_clipboard_option();
+ (void)did_set_clipboard(NULL);
#endif
#ifdef FEAT_VARTABS
vim_free(curbuf->b_p_vsts_array);
@@ -3140,44 +3140,47 @@ apply_optionset_autocmd(
/*
* Process the updated 'compatible' option value.
*/
- static void
-did_set_compatible(void)
+ char *
+did_set_compatible(optset_T *args UNUSED)
{
compatible_set();
+ return NULL;
}
-#ifdef FEAT_LANGMAP
+#if defined(FEAT_LANGMAP) || defined(PROTO)
/*
* Process the updated 'langremap' option value.
*/
- static void
-did_set_langremap(void)
+ char *
+did_set_langremap(optset_T *args UNUSED)
{
// 'langremap' -> !'langnoremap'
p_lnr = !p_lrm;
+ return NULL;
}
/*
* Process the updated 'langnoremap' option value.
*/
- static void
-did_set_langnoremap(void)
+ char *
+did_set_langnoremap(optset_T *args UNUSED)
{
// 'langnoremap' -> !'langremap'
p_lrm = !p_lnr;
+ return NULL;
}
#endif
-#ifdef FEAT_PERSISTENT_UNDO
+#if defined(FEAT_PERSISTENT_UNDO) || defined(PROTO)
/*
* Process the updated 'undofile' option value.
*/
- static void
-did_set_undofile(int opt_flags)
+ char *
+did_set_undofile(optset_T *args)
{
// Only take action when the option was set.
if (!curbuf->b_p_udf && !p_udf)
- return;
+ return NULL;
// When reset we do not delete the undo file, the option may be set again
// without making any changes in between.
@@ -3191,7 +3194,8 @@ did_set_undofile(int opt_flags)
// if one exists, the buffer wasn't changed and the buffer was
// loaded
if ((curbuf == save_curbuf
- || (opt_flags & OPT_GLOBAL) || opt_flags == 0)
+ || (args->os_flags & OPT_GLOBAL)
+ || args->os_flags == 0)
&& !curbufIsChanged() && curbuf->b_ml.ml_mfp != NULL)
{
#ifdef FEAT_CRYPT
@@ -3203,17 +3207,19 @@ did_set_undofile(int opt_flags)
}
}
curbuf = save_curbuf;
+
+ return NULL;
}
#endif
/*
* Process the updated 'readonly' option value.
*/
- static void
-did_set_readonly(int opt_flags)
+ char *
+did_set_readonly(optset_T *args)
{
// when 'readonly' is reset globally, also reset readonlymode
- if (!curbuf->b_p_ro && (opt_flags & OPT_LOCAL) == 0)
+ if (!curbuf->b_p_ro && (args->os_flags & OPT_LOCAL) == 0)
readonlymode = FALSE;
// when 'readonly' is set may give W10 again
@@ -3221,25 +3227,28 @@ did_set_readonly(int opt_flags)
curbuf->b_did_warn = FALSE;
redraw_titles();
+
+ return NULL;
}
-#ifdef FEAT_GUI
+#if defined(FEAT_GUI) || defined(PROTO)
/*
* Process the updated 'mousehide' option value.
*/
- static void
-did_set_mousehide(void)
+ char *
+did_set_mousehide(optset_T *args UNUSED)
{
if (!p_mh)
gui_mch_mousehide(FALSE);
+ return NULL;
}
#endif
/*
* Process the updated 'modifiable' option value.
*/
- static char *
-did_set_modifiable(int *doskip UNUSED)
+ char *
+did_set_modifiable(optset_T *args UNUSED)
{
// when 'modifiable' is changed, redraw the window title
@@ -3249,7 +3258,7 @@ did_set_modifiable(int *doskip UNUSED)
&& curbuf->b_term != NULL && !term_is_finished(curbuf))))
{
curbuf->b_p_ma = FALSE;
- *doskip = TRUE;
+ args->os_doskip = TRUE;
return e_cannot_make_terminal_with_running_job_modifiable;
}
# endif
@@ -3262,41 +3271,45 @@ did_set_modifiable(int *doskip UNUSED)
* Process the updated 'endoffile' or 'endofline' or 'fixendofline' or 'bomb'
* option value.
*/
- static void
-did_set_eof_eol_fixeol_bomb(void)
+ char *
+did_set_eof_eol_fixeol_bomb(optset_T *args UNUSED)
{
// redraw the window title and tab page text
redraw_titles();
+ return NULL;
}
/*
* Process the updated 'binary' option value.
*/
- static void
-did_set_binary(int opt_flags, long old_value)
+ char *
+did_set_binary(optset_T *args)
{
// when 'bin' is set also set some other options
- set_options_bin(old_value, curbuf->b_p_bin, opt_flags);
+ set_options_bin(args->os_oldval.boolean, curbuf->b_p_bin, args->os_flags);
redraw_titles();
+
+ return NULL;
}
/*
* Process the updated 'buflisted' option value.
*/
- static void
-did_set_buflisted(long old_value)
+ char *
+did_set_buflisted(optset_T *args)
{
// when 'buflisted' changes, trigger autocommands
- if (old_value != curbuf->b_p_bl)
+ if (args->os_oldval.boolean != curbuf->b_p_bl)
apply_autocmds(curbuf->b_p_bl ? EVENT_BUFADD : EVENT_BUFDELETE,
NULL, NULL, TRUE, curbuf);
+ return NULL;
}
/*
* Process the updated 'swapfile' option value.
*/
- static void
-did_set_swapfile(void)
+ char *
+did_set_swapfile(optset_T *args UNUSED)
{
// when 'swf' is set, create swapfile, when reset remove swapfile
if (curbuf->b_p_swf && p_uc)
@@ -3305,13 +3318,14 @@ did_set_swapfile(void)
// no need to reset curbuf->b_may_swap, ml_open_file() will check
// buf->b_p_swf
mf_close_file(curbuf, TRUE); // remove the swap file
+ return NULL;
}
/*
* Process the updated 'terse' option value.
*/
- static void
-did_set_terse(void)
+ char *
+did_set_terse(optset_T *args UNUSED)
{
char_u *p;
@@ -3328,23 +3342,25 @@ did_set_terse(void)
// remove 's' from p_shm
else if (!p_terse && p != NULL)
STRMOVE(p, p + 1);
+ return NULL;
}
/*
* Process the updated 'paste' option value.
*/
- static void
-did_set_paste(void)
+ char *
+did_set_paste(optset_T *args UNUSED)
{
// when 'paste' is set or reset also change other options
paste_option_changed();
+ return NULL;
}
/*
* Process the updated 'insertmode' option value.
*/
- static void
-did_set_insertmode(long old_value)
+ char *
+did_set_insertmode(optset_T *args)
{
// when 'insertmode' is set from an autocommand need to do work here
if (p_im)
@@ -3354,7 +3370,7 @@ did_set_insertmode(long old_value)
stop_insert_mode = FALSE;
}
// only reset if it was set previously
- else if (old_value)
+ else if (args->os_oldval.boolean)
{
need_start_insertmode = FALSE;
stop_insert_mode = TRUE;
@@ -3362,51 +3378,57 @@ did_set_insertmode(long old_value)
clear_cmdline = TRUE; // remove "(insert)"
restart_edit = 0;
}
+
+ return NULL;
}
/*
* Process the updated 'ignorecase' option value.
*/
- static void
-did_set_ignorecase(void)
+ char *
+did_set_ignorecase(optset_T *args UNUSED)
{
// when 'ignorecase' is set or reset and 'hlsearch' is set, redraw
if (p_hls)
redraw_all_later(UPD_SOME_VALID);
+ return NULL;
}
-#ifdef FEAT_SEARCH_EXTRA
+#if defined(FEAT_SEARCH_EXTRA) || defined(PROTO)
/*
* Process the updated 'hlsearch' option value.
*/
- static void
-did_set_hlsearch(void)
+ char *
+did_set_hlsearch(optset_T *args UNUSED)
{
// when 'hlsearch' is set or reset: reset no_hlsearch
set_no_hlsearch(FALSE);
+ return NULL;
}
#endif
/*
* Process the updated 'scrollbind' option value.
*/
- static void
-did_set_scrollbind(void)
+ char *
+did_set_scrollbind(optset_T *args UNUSED)
{
// when 'scrollbind' is set: snapshot the current position to avoid a jump
// at the end of normal_cmd()
if (!curwin->w_p_scb)
- return;
+ return NULL;
+
do_check_scrollbind(FALSE);
curwin->w_scbind_pos = curwin->w_topline;
+ return NULL;
}
#ifdef FEAT_QUICKFIX
/*
* Process the updated 'previewwindow' option value.
*/
- static char *
-did_set_previewwindow(int *doskip)
+ char *
+did_set_previewwindow(optset_T *args)
{
if (!curwin->w_p_pvw)
return NULL;
@@ -3418,7 +3440,7 @@ did_set_previewwindow(int *doskip)
if (win->w_p_pvw && win != curwin)
{
curwin->w_p_pvw = FALSE;
- *doskip = TRUE;
+ args->os_doskip = TRUE;
return e_preview_window_already_exists;
}
@@ -3429,75 +3451,84 @@ did_set_previewwindow(int *doskip)
/*
* Process the updated 'smoothscroll' option value.
*/
- static void
-did_set_smoothscroll(void)
+ char *
+did_set_smoothscroll(optset_T *args UNUSED)
{
if (curwin->w_p_sms)
- return;
+ return NULL;
+
curwin->w_skipcol = 0;
changed_line_abv_curs();
+ return NULL;
}
/*
* Process the updated 'textmode' option value.
*/
- static void
-did_set_textmode(int opt_flags)
+ char *
+did_set_textmode(optset_T *args)
{
// when 'textmode' is set or reset also change 'fileformat'
- set_fileformat(curbuf->b_p_tx ? EOL_DOS : EOL_UNIX, opt_flags);
+ set_fileformat(curbuf->b_p_tx ? EOL_DOS : EOL_UNIX, args->os_flags);
+
+ return NULL;
}
/*
* Process the updated 'textauto' option value.
*/
- static void
-did_set_textauto(int opt_flags)
+ char *
+did_set_textauto(optset_T *args)
{
// when 'textauto' is set or reset also change 'fileformats'
set_string_option_direct((char_u *)"ffs", -1,
p_ta ? (char_u *)DFLT_FFS_VIM : (char_u *)"",
- OPT_FREE | opt_flags, 0);
+ OPT_FREE | args->os_flags, 0);
+
+ return NULL;
}
/*
* Process the updated 'lisp' option value.
*/
- static void
-did_set_lisp(void)
+ char *
+did_set_lisp(optset_T *args UNUSED)
{
// When 'lisp' option changes include/exclude '-' in keyword characters.
(void)buf_init_chartab(curbuf, FALSE); // ignore errors
+ return NULL;
}
/*
* Process the updated 'title' or the 'icon' option value.
*/
- static void
-did_set_title_icon(void)
+ char *
+did_set_title_icon(optset_T *args UNUSED)
{
// when 'title' changed, may need to change the title; same for 'icon'
did_set_title();
+ return NULL;
}
/*
* Process the updated 'modified' option value.
*/
- static void
-did_set_modified(long value)
+ char *
+did_set_modified(optset_T *args)
{
- if (!value)
+ if (!args->os_newval.boolean)
save_file_ff(curbuf); // Buffer is unchanged
redraw_titles();
- modified_was_set = value;
+ modified_was_set = args->os_newval.boolean;
+ return NULL;
}
-#ifdef BACKSLASH_IN_FILENAME
+#if defined(BACKSLASH_IN_FILENAME) || defined(PROTO)
/*
* Process the updated 'shellslash' option value.
*/
- static void
-did_set_shellslash(void)
+ char *
+did_set_shellslash(optset_T *args UNUSED)
{
if (p_ssl)
{
@@ -3518,90 +3549,101 @@ did_set_shellslash(void)
# ifdef FEAT_EVAL
scriptnames_slash_adjust();
# endif
+ return NULL;
}
#endif
/*
* Process the updated 'wrap' option value.
*/
- static void
-did_set_wrap(void)
+ char *
+did_set_wrap(optset_T *args UNUSED)
{
// If 'wrap' is set, set w_leftcol to zero.
if (curwin->w_p_wrap)
curwin->w_leftcol = 0;
+ return NULL;
}
/*
* Process the updated 'equalalways' option value.
*/
- static void
-did_set_equalalways(long old_value)
+ char *
+did_set_equalalways(optset_T *args)
{
- if (p_ea && !old_value)
+ if (p_ea && !args->os_oldval.boolean)
win_equal(curwin, FALSE, 0);
+
+ return NULL;
}
/*
* Process the updated 'weirdinvert' option value.
*/
- static void
-did_set_weirdinvert(long old_value)
+ char *
+did_set_weirdinvert(optset_T *args)
{
// When 'weirdinvert' changed, set/reset 't_xs'.
// Then set 'weirdinvert' according to value of 't_xs'.
- if (p_wiv && !old_value)
+ if (p_wiv && !args->os_oldval.boolean)
T_XS = (char_u *)"y";
- else if (!p_wiv && old_value)
+ else if (!p_wiv && args->os_oldval.boolean)
T_XS = empty_option;
p_wiv = (*T_XS != NUL);
+
+ return NULL;
}
-#ifdef FEAT_BEVAL_GUI
+#if defined(FEAT_BEVAL_GUI) || defined(PROTO)
/*
* Process the updated 'ballooneval' option value.
*/
- static void
-did_set_ballooneval(long old_value)
+ char *
+did_set_ballooneval(optset_T *args)
{
if (balloonEvalForTerm)
- return;
- if (p_beval && !old_value)
+ return NULL;
+
+ if (p_beval && !args->os_oldval.boolean)
gui_mch_enable_beval_area(balloonEval);
- else if (!p_beval && old_value)
+ else if (!p_beval && args->os_oldval.boolean)
gui_mch_disable_beval_area(balloonEval);
+
+ return NULL;
}
#endif
-#ifdef FEAT_BEVAL_TERM
+#if defined(FEAT_BEVAL_TERM) || defined(PROTO)
/*
* Process the updated 'balloonevalterm' option value.
*/
- static void
-did_set_balloonevalterm(void)
+ char *
+did_set_balloonevalterm(optset_T *args UNUSED)
{
mch_bevalterm_changed();
+ return NULL;
}
#endif
-#ifdef FEAT_AUTOCHDIR
+#if defined(FEAT_AUTOCHDIR) || defined(PROTO)
/*
* Process the updated 'autochdir' option value.
*/
- static void
-did_set_autochdir(void)
+ char *
+did_set_autochdir(optset_T *args UNUSED)
{
// Change directories when the 'acd' option is set now.
DO_AUTOCHDIR;
+ return NULL;
}
#endif
-#ifdef FEAT_DIFF
+#if defined(FEAT_DIFF) || defined(PROTO)
/*
* Process the updated 'diff' option value.
*/
- static void
-did_set_diff(void)
+ char *
+did_set_diff(optset_T *args UNUSED)
{
// May add or remove the buffer from the list of diff buffers.
diff_buf_adjust(curwin);
@@ -3609,15 +3651,16 @@ did_set_diff(void)
if (foldmethodIsDiff(curwin))
foldUpdateAll(curwin);
# endif
+ return NULL;
}
#endif
-#ifdef HAVE_INPUT_METHOD
+#if defined(HAVE_INPUT_METHOD) || defined(PROTO)
/*
* Process the updated 'imdisable' option value.
*/
- static void
-did_set_imdisable(void)
+ char *
+did_set_imdisable(optset_T *args UNUSED)
{
// Only de-activate it here, it will be enabled when changing mode.
if (p_imdisable)
@@ -3626,29 +3669,30 @@ did_set_imdisable(void)
// When the option is set from an autocommand, it may need to take
// effect right away.
im_set_active(curbuf->b_p_iminsert == B_IMODE_IM);
+ return NULL;
}
#endif
-#ifdef FEAT_SPELL
+#if defined(FEAT_SPELL) || defined(PROTO)
/*
* Process the updated 'spell' option value.
*/
- static char *
-did_set_spell(void)
+ char *
+did_set_spell(optset_T *args UNUSED)
{
if (curwin->w_p_spell)
- return did_set_spelllang(curwin);
+ return parse_spelllang(curwin);
return NULL;
}
#endif
-#ifdef FEAT_ARABIC
+#if defined(FEAT_ARABIC) || defined(PROTO)
/*
* Process the updated 'arabic' option value.
*/
- static char *
-did_set_arabic(void)
+ char *
+did_set_arabic(optset_T *args UNUSED)
{
char *errmsg = NULL;
@@ -3728,13 +3772,13 @@ did_set_arabic(void)
}
#endif
-#if defined(FEAT_SIGNS) && defined(FEAT_GUI)
/*
* Process the updated 'number' or 'relativenumber' option value.
*/
- static void
-did_set_number_relativenumber(char_u *varp)
+ char *
+did_set_number_relativenumber(optset_T *args UNUSED)
{
+#if (defined(FEAT_SIGNS) && defined(FEAT_GUI)) || defined(PROTO)
if (gui.in_use
&& (*curwin->w_p_scl == 'n' && *(curwin->w_p_scl + 1) == 'u')
&& curbuf->b_signlist != NULL)
@@ -3745,15 +3789,16 @@ did_set_number_relativenumber(char_u *varp)
// number column. If the 'number' option is set and only the
// 'relativenumber' option is toggled, then don't refresh the screen
// (optimization).
- if (!(curwin->w_p_nu && ((int *)varp == &curwin->w_p_rnu)))
+ if (!(curwin->w_p_nu && ((int *)args->os_varp == &curwin->w_p_rnu)))
redraw_all_later(UPD_CLEAR);
}
-}
#endif
+ return NULL;
+}