summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-16 20:56:57 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-16 20:56:57 +0000
commite124204c4f8ea8b4fe5357b7613092a7acb5feb8 (patch)
tree8a049a292b17314710048a1b17625416c2bfc8d6
parent94c785d235dccacf6cdf38c5903115b61ca8a981 (diff)
patch 8.2.3830: error messages are spread outv8.2.3830
Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
-rw-r--r--src/buffer.c8
-rw-r--r--src/dict.c2
-rw-r--r--src/diff.c16
-rw-r--r--src/digraph.c4
-rw-r--r--src/errors.h66
-rw-r--r--src/eval.c14
-rw-r--r--src/evalfunc.c9
-rw-r--r--src/evalvars.c2
-rw-r--r--src/globals.h9
-rw-r--r--src/misc2.c2
-rw-r--r--src/quickfix.c2
-rw-r--r--src/typval.c8
-rw-r--r--src/ui.c2
-rw-r--r--src/userfunc.c14
-rw-r--r--src/version.c2
-rw-r--r--src/vim9compile.c32
-rw-r--r--src/vim9execute.c11
-rw-r--r--src/vim9type.c6
-rw-r--r--src/window.c2
19 files changed, 137 insertions, 74 deletions
diff --git a/src/buffer.c b/src/buffer.c
index be946d46b6..cbb57efa51 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -2385,7 +2385,7 @@ buflist_getfile(
if ((options & GETF_ALT) && n == 0)
emsg(_(e_no_alternate_file));
else
- semsg(_("E92: Buffer %d not found"), n);
+ semsg(_(e_buffer_nr_not_found), n);
return FAIL;
}
@@ -2669,9 +2669,9 @@ buflist_findpat(
}
if (match == -2)
- semsg(_("E93: More than one match for %s"), pattern);
+ semsg(_(e_more_than_one_match_for_str), pattern);
else if (match < 0)
- semsg(_("E94: No matching buffer for %s"), pattern);
+ semsg(_(e_no_matching_buffer_for_str), pattern);
return match;
}
@@ -3373,7 +3373,7 @@ setfname(
if (obuf->b_ml.ml_mfp != NULL || in_use)
{
if (message)
- emsg(_("E95: Buffer with this name already exists"));
+ emsg(_(e_buffer_with_this_name_already_exists));
vim_free(ffname);
return FAIL;
}
diff --git a/src/dict.c b/src/dict.c
index 98be26310b..ea43d0be1c 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -1349,7 +1349,7 @@ dict_remove(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg)
dictitem_T *di;
if (argvars[2].v_type != VAR_UNKNOWN)
- semsg(_(e_toomanyarg), "remove()");
+ semsg(_(e_too_many_arguments_for_function_str), "remove()");
else if ((d = argvars[0].vval.v_dict) != NULL
&& !value_check_lock(d->dv_lock, arg_errmsg, TRUE))
{
diff --git a/src/diff.c b/src/diff.c
index 92a4d9f44e..45c5e0b9d6 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -173,7 +173,7 @@ diff_buf_add(buf_T *buf)
return;
}
- semsg(_("E96: Cannot diff more than %d buffers"), DB_COUNT);
+ semsg(_(e_cannot_diff_more_than_nr_buffers), DB_COUNT);
}
/*
@@ -1081,7 +1081,7 @@ check_external_diff(diffio_T *diffio)
{
if (io_error)
emsg(_("E810: Cannot read or write temp files"));
- emsg(_("E97: Cannot create diffs"));
+ emsg(_(e_cannot_create_diffs));
diff_a_works = MAYBE;
#if defined(MSWIN)
diff_bin_works = MAYBE;
@@ -1636,7 +1636,7 @@ diff_read(
fd = mch_fopen((char *)dout->dout_fname, "r");
if (fd == NULL)
{
- emsg(_("E98: Cannot read diff output"));
+ emsg(_(e_cannot_read_diff_output));
return;
}
}
@@ -2625,7 +2625,7 @@ ex_diffgetput(exarg_T *eap)
idx_cur = diff_buf_idx(curbuf);
if (idx_cur == DB_COUNT)
{
- emsg(_("E99: Current buffer is not in diff mode"));
+ emsg(_(e_current_buffer_is_not_in_diff_mode));
return;
}
@@ -2646,7 +2646,7 @@ ex_diffgetput(exarg_T *eap)
if (found_not_ma)
emsg(_("E793: No other buffer in diff mode is modifiable"));
else
- emsg(_("E100: No other buffer in diff mode"));
+ emsg(_(e_no_other_buffer_in_diff_mode));
return;
}
@@ -2656,7 +2656,7 @@ ex_diffgetput(exarg_T *eap)
&& curtab->tp_diffbuf[i] != NULL
&& (eap->cmdidx != CMD_diffput || curtab->tp_diffbuf[i]->b_p_ma))
{
- emsg(_("E101: More than two buffers in diff mode, don't know which one to use"));
+ emsg(_(e_more_than_two_buffers_in_diff_mode_dont_know_which_one_to_use));
return;
}
}
@@ -2679,7 +2679,7 @@ ex_diffgetput(exarg_T *eap)
buf = buflist_findnr(i);
if (buf == NULL)
{
- semsg(_("E102: Can't find buffer \"%s\""), eap->arg);
+ semsg(_(e_cant_find_buffer_str), eap->arg);
return;
}
if (buf == curbuf)
@@ -2687,7 +2687,7 @@ ex_diffgetput(exarg_T *eap)
idx_other = diff_buf_idx(buf);
if (idx_other == DB_COUNT)
{
- semsg(_("E103: Buffer \"%s\" is not in diff mode"), eap->arg);
+ semsg(_(e_buffer_str_is_not_in_diff_mode), eap->arg);
return;
}
}
diff --git a/src/digraph.c b/src/digraph.c
index adabc9b90a..a9fcba5410 100644
--- a/src/digraph.c
+++ b/src/digraph.c
@@ -2043,7 +2043,7 @@ check_digraph_chars_valid(int char1, int char2)
}
if (char1 == ESC || char2 == ESC)
{
- emsg(_("E104: Escape not allowed in digraph"));
+ emsg(_(e_escape_not_allowed_in_digraph));
return FALSE;
}
return TRUE;
@@ -2622,7 +2622,7 @@ ex_loadkeymap(exarg_T *eap)
if (!getline_equal(eap->getline, eap->cookie, getsourceline))
{
- emsg(_("E105: Using :loadkeymap not in a sourced file"));
+ emsg(_(e_using_loadkeymap_not_in_sourced_file));
return;
}
diff --git a/src/errors.h b/src/errors.h
index 2d09ef500f..aaa1a27332 100644
--- a/src/errors.h
+++ b/src/errors.h
@@ -196,13 +196,77 @@ EXTERN char e_no_write_since_last_change_for_buffer_nr_add_bang_to_override[]
INIT(= N_("E89: No write since last change for buffer %d (add ! to override)"));
EXTERN char e_cannot_unload_last_buffer[]
INIT(= N_("E90: Cannot unload last buffer"));
-
+EXTERN char e_shell_option_is_empty[]
+ INIT(= N_("E91: 'shell' option is empty"));
+EXTERN char e_buffer_nr_not_found[]
+ INIT(= N_("E92: Buffer %d not found"));
+EXTERN char e_more_than_one_match_for_str[]
+ INIT(= N_("E93: More than one match for %s"));
+EXTERN char e_no_matching_buffer_for_str[]
+ INIT(= N_("E94: No matching buffer for %s"));
+EXTERN char e_buffer_with_this_name_already_exists[]
+ INIT(= N_("E95: Buffer with this name already exists"));
+#if defined(FEAT_DIFF)
+EXTERN char e_cannot_diff_more_than_nr_buffers[]
+ INIT(= N_("E96: Cannot diff more than %d buffers"));
+EXTERN char e_cannot_create_diffs[]
+ INIT(= N_("E97: Cannot create diffs"));
+EXTERN char e_cannot_read_diff_output[]
+ INIT(= N_("E98: Cannot read diff output"));
+EXTERN char e_current_buffer_is_not_in_diff_mode[]
+ INIT(= N_("E99: Current buffer is not in diff mode"));
+EXTERN char e_no_other_buffer_in_diff_mode[]
+ INIT(= N_("E100: No other buffer in diff mode"));
+EXTERN char e_more_than_two_buffers_in_diff_mode_dont_know_which_one_to_use[]
+ INIT(= N_("E101: More than two buffers in diff mode, don't know which one to use"));
+EXTERN char e_cant_find_buffer_str[]
+ INIT(= N_("E102: Can't find buffer \"%s\""));
+EXTERN char e_buffer_str_is_not_in_diff_mode[]
+ INIT(= N_("E103: Buffer \"%s\" is not in diff mode"));
+#endif
+EXTERN char e_escape_not_allowed_in_digraph[]
+ INIT(= N_("E104: Escape not allowed in digraph"));
+EXTERN char e_using_loadkeymap_not_in_sourced_file[]
+ INIT(= N_("E105: Using :loadkeymap not in a sourced file"));
+// E106 unused
+EXTERN char e_missing_parenthesis_str[]
+ INIT(= N_("E107: Missing parentheses: %s"));
+#ifdef FEAT_EVAL
+EXTERN char e_no_such_variable_str[]
+ INIT(= N_("E108: No such variable: \"%s\""));
+EXTERN char e_missing_colon_after_questionmark[]
+ INIT(= N_("E109: Missing ':' after '?'"));
+EXTERN char e_missing_closing_paren[]
+ INIT(= N_("E110: Missing ')'"));
+EXTERN char e_missing_closing_square_brace[]
+ INIT(= N_("E111: Missing ']'"));
+#endif
+EXTERN char e_option_name_missing_str[]
+ INIT(= N_("E112: Option name missing: %s"));
+EXTERN char e_unknown_option_str[]
+ INIT(= N_("E113: Unknown option: %s"));
+EXTERN char e_missing_double_quote_str[]
+ INIT(= N_("E114: Missing double quote: %s"));
+EXTERN char e_missing_single_quote_str[]
+ INIT(= N_("E115: Missing single quote: %s"));
#ifdef FEAT_EVAL
+EXTERN char e_invalid_arguments_for_function_str[]
+ INIT(= N_("E116: Invalid arguments for function %s"));
+EXTERN char e_unknown_function_str[]
+ INIT(= N_("E117: Unknown function: %s"));
+EXTERN char e_too_many_arguments_for_function_str[]
+ INIT(= N_("E118: Too many arguments for function: %s"));
+EXTERN char e_not_enough_arguments_for_function_str[]
+ INIT(= N_("E119: Not enough arguments for function: %s"));
+EXTERN char e_using_sid_not_in_script_context_str[]
+ INIT(= N_("E120: Using <SID> not in a script context: %s"));
EXTERN char e_undefined_variable_str[]
INIT(= N_("E121: Undefined variable: %s"));
EXTERN char e_undefined_variable_char_str[]
INIT(= N_("E121: Undefined variable: %c:%s"));
#endif
+
+
EXTERN char e_no_such_user_defined_command_str[]
INIT(= N_("E184: No such user-defined command: %s"));
#ifndef FEAT_DIGRAPHS
diff --git a/src/eval.c b/src/eval.c
index bc5eaa4d63..61bbb1d6e4 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1071,7 +1071,7 @@ get_lval(
if (*p != ']')
{
if (!quiet)
- emsg(_(e_missbrac));
+ emsg(_(e_missing_closing_square_brace));
clear_tv(&var1);
clear_tv(&var2);
return NULL;
@@ -2375,7 +2375,7 @@ eval1(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
p = eval_next_non_blank(*arg, evalarg_used, &getnext);
if (*p != ':')
{
- emsg(_(e_missing_colon));
+ emsg(_(e_missing_colon_after_questionmark));
if (evaluate && result)
clear_tv(rettv);
evalarg_used->eval_flags = orig_flags;
@@ -3568,7 +3568,7 @@ eval7(
++*arg;
else if (ret == OK)
{
- emsg(_(e_missing_close));
+ emsg(_(e_missing_closing_paren));
clear_tv(rettv);
ret = FAIL;
}
@@ -3854,7 +3854,7 @@ eval_lambda(
*arg = skipwhite_and_linebreak(*arg, evalarg);
if (**arg != ')')
{
- emsg(_(e_missing_close));
+ emsg(_(e_missing_closing_paren));
ret = FAIL;
}
++*arg;
@@ -3868,7 +3868,7 @@ eval_lambda(
if (*skipwhite(*arg) == '(')
emsg(_(e_nowhitespace));
else
- semsg(_(e_missing_paren), "lambda");
+ semsg(_(e_missing_parenthesis_str), "lambda");
}
clear_tv(rettv);
ret = FAIL;
@@ -3923,7 +3923,7 @@ eval_method(
if (**arg != '(')
{
if (verbose)
- semsg(_(e_missing_paren), name);
+ semsg(_(e_missing_parenthesis_str), name);
ret = FAIL;
}
else if (VIM_ISWHITE((*arg)[-1]))
@@ -4061,7 +4061,7 @@ eval_index(
if (**arg != ']')
{
if (verbose)
- emsg(_(e_missbrac));
+ emsg(_(e_missing_closing_square_brace));
clear_tv(&var1);
if (range)
clear_tv(&var2);
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 25fcc45722..12236f73a5 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -2529,9 +2529,9 @@ check_internal_func(int idx, int argcount)
name = internal_func_name(idx);
if (res == FCERR_TOOMANY)
- semsg(_(e_toomanyarg), name);
+ semsg(_(e_too_many_arguments_for_function_str), name);
else
- semsg(_(e_toofewarg), name);
+ semsg(_(e_not_enough_arguments_for_function_str), name);
return -1;
}
@@ -4049,7 +4049,8 @@ common_function(typval_T *argvars, typval_T *rettv, int is_funcref)
arg_idx = 0;
else if (list->lv_len > MAX_FUNC_ARGS)
{
- emsg_funcname((char *)e_toomanyarg, s);
+ emsg_funcname((char *)e_too_many_arguments_for_function_str,
+ s);
vim_free(name);
goto theend;
}
@@ -9012,7 +9013,7 @@ f_setreg(typval_T *argvars, typval_T *rettv)
{
if (yank_type != MAUTO)
{
- semsg(_(e_toomanyarg), "setreg");
+ semsg(_(e_too_many_arguments_for_function_str), "setreg");
return;
}
diff --git a/src/evalvars.c b/src/evalvars.c
index 6aa2e4205f..1a50db05e9 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -1858,7 +1858,7 @@ do_unlet(char_u *name, int forceit)
}
if (forceit)
return OK;
- semsg(_("E108: No such variable: \"%s\""), name);
+ semsg(_(e_no_such_variable_str), name);
return FAIL;
}
diff --git a/src/globals.h b/src/globals.h
index 5f8167a1e3..aa0685ac94 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -1689,8 +1689,6 @@ EXTERN char e_dictreq[] INIT(= N_("E715: Dictionary required"));
EXTERN char e_listidx[] INIT(= N_("E684: list index out of range: %ld"));
EXTERN char e_blobidx[] INIT(= N_("E979: Blob index out of range: %ld"));
EXTERN char e_invalblob[] INIT(= N_("E978: Invalid operation for Blob"));
-EXTERN char e_toomanyarg[] INIT(= N_("E118: Too many arguments for function: %s"));
-EXTERN char e_toofewarg[] INIT(= N_("E119: Not enough arguments for function: %s"));
EXTERN char e_func_deleted[] INIT(= N_("E933: Function was deleted: %s"));
EXTERN char e_dictkey[] INIT(= N_("E716: Key not present in Dictionary: \"%s\""));
EXTERN char e_listreq[] INIT(= N_("E714: List required"));
@@ -1700,7 +1698,6 @@ EXTERN char e_listdictarg[] INIT(= N_("E712: Argument of %s must be a List or Di
EXTERN char e_listdictblobarg[] INIT(= N_("E896: Argument of %s must be a List, Dictionary or Blob"));
EXTERN char e_modulus[] INIT(= N_("E804: Cannot use '%' with Float"));
EXTERN char e_const_option[] INIT(= N_("E996: Cannot lock an option"));
-EXTERN char e_unknown_option[] INIT(= N_("E113: Unknown option: %s"));
EXTERN char e_reduceempty[] INIT(= N_("E998: Reduce of an empty %s with no initial value"));
EXTERN char e_no_dict_key[] INIT(= N_("E857: Dictionary key \"%s\" required"));
#endif
@@ -1711,7 +1708,6 @@ EXTERN char e_textwinlock[] INIT(= N_("E565: Not allowed to change text or chang
|| defined(UNIX) || defined(VMS)
EXTERN char e_screenmode[] INIT(= N_("E359: Screen mode setting not supported"));
#endif
-EXTERN char e_shellempty[] INIT(= N_("E91: 'shell' option is empty"));
#if defined(FEAT_SIGN_ICONS) && !defined(FEAT_GUI_GTK)
EXTERN char e_signdata[] INIT(= N_("E255: Couldn't read in sign data!"));
#endif
@@ -1721,8 +1717,6 @@ EXTERN char e_winheight[] INIT(= N_("E591: 'winheight' cannot be smaller than 'w
EXTERN char e_winwidth[] INIT(= N_("E592: 'winwidth' cannot be smaller than 'winminwidth'"));
EXTERN char e_zerocount[] INIT(= N_("E939: Positive count required"));
#ifdef FEAT_EVAL
-EXTERN char e_missing_paren[] INIT(= N_("E107: Missing parentheses: %s"));
-EXTERN char e_missing_close[] INIT(= N_("E110: Missing ')'"));
EXTERN char e_missing_dict_colon[] INIT(= N_("E720: Missing colon in Dictionary: %s"));
EXTERN char e_duplicate_key[] INIT(= N_("E721: Duplicate key in Dictionary: \"%s\""));
EXTERN char e_missing_dict_comma[] INIT(= N_("E722: Missing comma in Dictionary: %s"));
@@ -1758,10 +1752,7 @@ EXTERN char e_menuothermode[] INIT(= N_("E328: Menu only exists in another mode"
EXTERN char e_invalwindow[] INIT(= N_("E957: Invalid window number"));
EXTERN char e_listarg[] INIT(= N_("E686: Argument of %s must be a List"));
#ifdef FEAT_EVAL
-EXTERN char e_missing_colon[] INIT(= N_("E109: Missing ':' after '?'"));
EXTERN char e_missing_in[] INIT(= N_("E690: Missing \"in\" after :for"));
-EXTERN char e_unknownfunc[] INIT(= N_("E117: Unknown function: %s"));
-EXTERN char e_missbrac[] INIT(= N_("E111: Missing ']'"));
EXTERN char e_else_without_if[] INIT(= N_("E581: :else without :if"));
EXTERN char e_elseif_without_if[] INIT(= N_("E582: :elseif without :if"));
EXTERN char e_endif_without_if[] INIT(= N_("E580: :endif without :if"));
diff --git a/src/misc2.c b/src/misc2.c
index 9407087494..4400d4aa56 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1780,7 +1780,7 @@ call_shell(char_u *cmd, int opt)
if (*p_sh == NUL)
{
- emsg(_(e_shellempty));
+ emsg(_(e_shell_option_is_empty));
retval = -1;
}
else
diff --git a/src/quickfix.c b/src/quickfix.c
index eeee8068d3..d0f4199c9e 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -7190,7 +7190,7 @@ qf_add_entry_from_dict(
if (!did_bufnr_emsg)
{
did_bufnr_emsg = TRUE;
- semsg(_("E92: Buffer %d not found"), bufnum);
+ semsg(_(e_buffer_nr_not_found), bufnum);
}
valid = FALSE;
bufnum = 0;
diff --git a/src/typval.c b/src/typval.c
index 5e1c78c41c..e6f6bfcdbb 100644
--- a/src/typval.c
+++ b/src/typval.c
@@ -1668,7 +1668,7 @@ eval_option(
if (option_end == NULL)
{
if (rettv != NULL)
- semsg(_("E112: Option name missing: %s"), *arg);
+ semsg(_(e_option_name_missing_str), *arg);
return FAIL;
}
@@ -1686,7 +1686,7 @@ eval_option(
if (opt_type == gov_unknown)
{
if (rettv != NULL)
- semsg(_(e_unknown_option), *arg);
+ semsg(_(e_unknown_option_str), *arg);
ret = FAIL;
}
else if (rettv != NULL)
@@ -1887,7 +1887,7 @@ eval_string(char_u **arg, typval_T *rettv, int evaluate)
if (*p != '"')
{
- semsg(_("E114: Missing quote: %s"), *arg);
+ semsg(_(e_missing_double_quote_str), *arg);
return FAIL;
}
@@ -2027,7 +2027,7 @@ eval_lit_string(char_u **arg, typval_T *rettv, int evaluate)
if (*p != '\'')
{
- semsg(_("E115: Missing quote: %s"), *arg);
+ semsg(_(e_missing_single_quote_str), *arg);
return FAIL;
}
diff --git a/src/ui.c b/src/ui.c
index 8cbe49bde4..db49cc8702 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -577,7 +577,7 @@ ui_suspend(void)
suspend_shell(void)
{
if (*p_sh == NUL)
- emsg(_(e_shellempty));
+ emsg(_(e_shell_option_is_empty));
else
{
msg_puts(_("new shell started\n"));
diff --git a/src/userfunc.c b/src/userfunc.c
index 70a3c51bca..7f6754444d 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -1780,7 +1780,7 @@ get_func_tv(
if (argcount == MAX_FUNC_ARGS)
emsg_funcname(N_("E740: Too many arguments for function %s"), name);
else
- emsg_funcname(N_("E116: Invalid arguments for function %s"), name);
+ emsg_funcname(N_(e_invalid_arguments_for_function_str), name);
}
while (--argcount >= 0)
@@ -3240,7 +3240,7 @@ user_func_error(int error, char_u *name, funcexe_T *funcexe)
if (funcexe->fe_found_var)
semsg(_(e_not_callable_type_str), name);
else
- emsg_funcname(e_unknownfunc, name);
+ emsg_funcname(e_unknown_function_str, name);
break;
case FCERR_NOTMETHOD:
emsg_funcname(
@@ -3250,14 +3250,16 @@ user_func_error(int error, char_u *name, funcexe_T *funcexe)
emsg_funcname(N_(e_func_deleted), name);
break;
case FCERR_TOOMANY:
- emsg_funcname((char *)e_toomanyarg, name);
+ emsg_funcname((char *)e_too_many_arguments_for_function_str,
+ name);
break;
case FCERR_TOOFEW:
- emsg_funcname((char *)e_toofewarg, name);
+ emsg_funcname((char *)e_not_enough_arguments_for_function_str,
+ name);
break;
case FCERR_SCRIPT:
emsg_funcname(
- N_("E120: Using <SID> not in a script context: %s"), name);
+ N_(e_using_sid_not_in_script_context_str), name);
break;
case FCERR_DICT:
emsg_funcname(
@@ -5098,7 +5100,7 @@ ex_call(exarg_T *eap)
startarg = skipwhite(arg);
if (*startarg != '(')
{
- semsg(_(e_missing_paren), eap->arg);
+ semsg(_(e_missing_parenthesis_str), eap->arg);
goto end;
}
if (in_vim9script() && startarg > arg)
diff --git a/src/version.c b/src/version.c
index 622fe76af9..87b82acba2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3830,
+/**/
3829,
/**/
3828,
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 50dc756052..388308abfa 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -2008,12 +2008,14 @@ generate_CALL(cctx_T *cctx, ufunc_T *ufunc, int pushed_argcount)
RETURN_OK_IF_SKIP(cctx);
if (argcount > regular_args && !has_varargs(ufunc))
{
- semsg(_(e_toomanyarg), printable_func_name(ufunc));
+ semsg(_(e_too_many_arguments_for_function_str),
+ printable_func_name(ufunc));
return FAIL;
}
if (argcount < regular_args - ufunc->uf_def_args.ga_len)
{
- semsg(_(e_toofewarg), printable_func_name(ufunc));
+ semsg(_(e_not_enough_arguments_for_function_str),
+ printable_func_name(ufunc));
return FAIL;
}
@@ -2145,12 +2147,12 @@ generate_PCALL(
if (argcount < type->tt_min_argcount - varargs)
{
- semsg(_(e_toofewarg), name);
+ semsg(_(e_not_enough_arguments_for_function_str), name);
return FAIL;
}
if (!varargs && argcount > type->tt_argcount)
{
- semsg(_(e_toomanyarg), name);
+ semsg(_(e_too_many_arguments_for_function_str), name);
return FAIL;
}
if (type->tt_args != NULL)
@@ -3444,7 +3446,7 @@ compile_arguments(char_u **arg, cctx_T *cctx, int *argcount, int is_searchpair)
p = skipwhite(p);
}
failret:
- emsg(_(e_missing_close));
+ emsg(_(e_missing_closing_paren));
return FAIL;
}
@@ -3580,7 +3582,7 @@ compile_call(
res = generate_BCALL(cctx, idx, argcount, argcount_init == 1);
}
else
- semsg(_(e_unknownfunc), namebuf);
+ semsg(_(e_unknown_function_str), namebuf);
goto theend;
}
@@ -3625,7 +3627,7 @@ compile_call(
if (STRNCMP(namebuf, "g:", 2) == 0 || is_autoload)
res = generate_UCALL(cctx, name, argcount);
else
- semsg(_(e_unknownfunc), namebuf);
+ semsg(_(e_unknown_function_str), namebuf);
theend:
vim_free(tofree);
@@ -4354,7 +4356,7 @@ compile_parenthesis(char_u **arg, cctx_T *cctx, ppconst_T *ppconst)
++*arg;
else if (ret == OK)
{
- emsg(_(e_missing_close));
+ emsg(_(e_missing_closing_paren));
ret = FAIL;
}
return ret;
@@ -4471,7 +4473,7 @@ compile_subscript(
if (*skipwhite(*arg) == '(')
emsg(_(e_nowhitespace));
else
- semsg(_(e_missing_paren), *arg);
+ semsg(_(e_missing_parenthesis_str), *arg);
return FAIL;
}
*arg = skipwhite(*arg + 1);
@@ -4530,7 +4532,7 @@ compile_subscript(
;
if (*p != '(')
{
- semsg(_(e_missing_paren), *arg);
+ semsg(_(e_missing_parenthesis_str), *arg);
return FAIL;
}
if (compile_call(arg, p - *arg, cctx, ppconst, 1) == FAIL)
@@ -4604,7 +4606,7 @@ compile_subscript(
if (**arg != ']')
{
- emsg(_(e_missbrac));
+ emsg(_(e_missing_closing_square_brace));
return FAIL;
}
*arg = *arg + 1;
@@ -5636,7 +5638,7 @@ compile_expr1(char_u **arg, cctx_T *cctx, ppconst_T *ppconst)
p = may_peek_next_line(cctx, *arg, &next);
if (*p != ':')
{
- emsg(_(e_missing_colon));
+ emsg(_(e_missing_colon_after_questionmark));
return FAIL;
}
if (next != NULL)
@@ -6141,7 +6143,7 @@ get_var_dest(
switch (opt_type)
{
case gov_unknown:
- semsg(_(e_unknown_option), name);
+ semsg(_(e_unknown_option_str), name);
return FAIL;
case gov_string:
case gov_hidden_string:
@@ -6718,7 +6720,7 @@ compile_assign_index(
if (r == OK && *skipwhite(p) != ']')
{
// this should not happen
- emsg(_(e_missbrac));
+ emsg(_(e_missing_closing_square_brace));
r = FAIL;
}
}
@@ -6762,7 +6764,7 @@ compile_load_lhs(
{
// this should not happen
if (res != FAIL)
- emsg(_(e_missbrac));
+ emsg(_(e_missing_closing_square_brace));
return FAIL;
}
diff --git a/src/vim9execute.c b/src/vim9execute.c
index 53beee1034..14091b0483 100644
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -906,9 +906,10 @@ call_ufunc(
if (error != FCERR_UNKNOWN)
{
if (error == FCERR_TOOMANY)
- semsg(_(e_toomanyarg), ufunc->uf_name);
+ semsg(_(e_too_many_arguments_for_function_str), ufunc->uf_name);
else
- semsg(_(e_toofewarg), ufunc->uf_name);
+ semsg(_(e_not_enough_arguments_for_function_str),
+ ufunc->uf_name);
return FAIL;
}
@@ -1106,7 +1107,7 @@ call_partial(
if (res == FAIL)
{
if (called_emsg == called_emsg_before)
- semsg(_(e_unknownfunc),
+ semsg(_(e_unknown_function_str),
name == NULL ? (char_u *)"[unknown]" : name);
return FAIL;
}
@@ -1460,12 +1461,12 @@ call_eval_func(
v = find_var(name, NULL, FALSE);
if (v == NULL)
{
- semsg(_(e_unknownfunc), name);
+ semsg(_(e_unknown_function_str), name);
return FAIL;
}
if (v->di_tv.v_type != VAR_PARTIAL && v->di_tv.v_type != VAR_FUNC)
{
- semsg(_(e_unknownfunc), name);
+ semsg(_(e_unknown_function_str), name);
return FAIL;
}
return call_partial(&v->di_tv, argcount, ectx);
diff --git a/src/vim9type.c b/src/vim9type.c
index b9e9b27ad1..db78669f75 100644
--- a/src/vim9type.c
+++ b/src/vim9type.c
@@ -618,12 +618,12 @@ check_argument_types(
return OK; // just in case
if (argcount < type->tt_min_argcount - varargs)
{
- semsg(_(e_toofewarg), name);
+ semsg(_(e_not_enough_arguments_for_function_str), name);
return FAIL;
}
if (!varargs && type->tt_argcount >= 0 && argcount > type->tt_argcount)
{
- semsg(_(e_toomanyarg), name);
+ semsg(_(e_too_many_arguments_for_function_str), name);
return FAIL;
}
if (type->tt_args == NULL)
@@ -893,7 +893,7 @@ parse_type(char_u **arg, garray_T *type_gap, int give_error)
if (*p != ')')
{
if (give_error)
- emsg(_(e_missing_close));
+ emsg(_(e_missing_closing_paren));
return NULL;
}
*arg = p + 1;
diff --git a/src/window.c b/src/window.c
index d3612b6b69..4ee75c1a70 100644
--- a/src/window.c
+++ b/src/window.c
@@ -198,7 +198,7 @@ do_window(
if (Prenum == 0)
emsg(_(e_no_alternate_file));
else
- semsg(_("E92: Buffer %ld not found"), Prenum);
+ semsg(_(e_buffer_nr_not_found), Prenum);
break;
}