patch 8.2.3069: error messages are spread out
Problem: Error messages are spread out.
Solution: Move some error messages to errors.h. Use clearer names.
diff --git a/src/arglist.c b/src/arglist.c
index 79628fd..863b1cc 100644
--- a/src/arglist.c
+++ b/src/arglist.c
@@ -832,7 +832,7 @@
{
// Don't give an error for ":%argdel" if the list is empty.
if (eap->line1 != 1 || eap->line2 != 0)
- emsg(_(e_invrange));
+ emsg(_(e_invalid_range));
}
else
{
@@ -920,7 +920,7 @@
#ifdef FEAT_CMDWIN
if (cmdwin_type != 0)
{
- emsg(_(e_cmdwin));
+ emsg(_(e_invalid_in_cmdline_window));
return;
}
#endif
diff --git a/src/buffer.c b/src/buffer.c
index d038e3c..59f51aa 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -2407,7 +2407,7 @@
if (buf == NULL)
{
if ((options & GETF_ALT) && n == 0)
- emsg(_(e_noalt));
+ emsg(_(e_no_alternate_file));
else
semsg(_("E92: Buffer %d not found"), n);
return FAIL;
@@ -3516,7 +3516,7 @@
if (buflist_name_nr(0, &fname, &dummy) == FAIL)
{
if (errmsg)
- emsg(_(e_noalt));
+ emsg(_(e_no_alternate_file));
return NULL;
}
return fname;
diff --git a/src/channel.c b/src/channel.c
index 2a93e25..5818dc3 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -1232,7 +1232,7 @@
if (!buf->b_p_ma && !channel->ch_part[PART_OUT].ch_nomodifiable)
{
- emsg(_(e_modifiable));
+ emsg(_(e_cannot_make_changes_modifiable_is_off));
}
else
{
@@ -1278,7 +1278,7 @@
!opt->jo_modifiable[PART_ERR];
if (!buf->b_p_ma && !channel->ch_part[PART_ERR].ch_nomodifiable)
{
- emsg(_(e_modifiable));
+ emsg(_(e_cannot_make_changes_modifiable_is_off));
}
else
{
diff --git a/src/errors.h b/src/errors.h
index 00894ef..f2624df 100644
--- a/src/errors.h
+++ b/src/errors.h
@@ -10,6 +10,44 @@
* Definition of error messages, sorted on error number.
*/
+EXTERN char e_backslash_should_be_followed_by[]
+ INIT(= N_("E10: \\ should be followed by /, ? or &"));
+#ifdef FEAT_CMDWIN
+EXTERN char e_invalid_in_cmdline_window[]
+ INIT(= N_("E11: Invalid in command-line window; <CR> executes, CTRL-C quits"));
+#endif
+EXTERN char e_command_not_allowed_from_vimrc_in_current_dir_or_tag_search[]
+ INIT(= N_("E12: Command not allowed from exrc/vimrc in current dir or tag search"));
+EXTERN char e_file_exists[]
+ INIT(= N_("E13: File exists (add ! to override)"));
+#ifdef FEAT_EVAL
+EXTERN char e_invalid_expression_str[]
+ INIT(= N_("E15: Invalid expression: \"%s\""));
+#endif
+EXTERN char e_invalid_range[]
+ INIT(= N_("E16: Invalid range"));
+#if defined(UNIX) || defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
+EXTERN char e_src_is_directory[]
+ INIT(= N_("E17: \"%s\" is a directory"));
+#endif
+#ifdef FEAT_EVAL
+EXTERN char e_unexpected_characters_in_let[]
+ INIT(= N_("E18: Unexpected characters in :let"));
+EXTERN char e_unexpected_characters_in_assignment[]
+ INIT(= N_("E18: Unexpected characters in assignment"));
+#endif
+EXTERN char e_mark_has_invalid_line_number[]
+ INIT(= N_("E19: Mark has invalid line number"));
+EXTERN char e_mark_not_set[]
+ INIT(= N_("E20: Mark not set"));
+EXTERN char e_cannot_make_changes_modifiable_is_off[]
+ INIT(= N_("E21: Cannot make changes, 'modifiable' is off"));
+EXTERN char e_scripts_nested_too_deep[]
+ INIT(= N_("E22: Scripts nested too deep"));
+EXTERN char e_no_alternate_file[]
+ INIT(= N_("E23: No alternate file"));
+EXTERN char e_no_such_abbreviation[]
+ INIT(= N_("E24: No such abbreviation"));
#ifdef FEAT_EVAL
EXTERN char e_undefined_variable_str[]
INIT(= N_("E121: Undefined variable: %s"));
diff --git a/src/eval.c b/src/eval.c
index 7990c23..f570016 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -216,7 +216,7 @@
// Also check called_emsg for when using assert_fails().
if (!aborting() && did_emsg == did_emsg_before
&& called_emsg == called_emsg_before)
- semsg(_(e_invexpr2), start);
+ semsg(_(e_invalid_expression_str), start);
}
clear_evalarg(&evalarg, eap);
return ret;
@@ -297,7 +297,7 @@
if (*skipwhite(s) != NUL) // check for trailing chars after expr
{
clear_tv(rettv);
- semsg(_(e_invexpr2), s);
+ semsg(_(e_invalid_expression_str), s);
return FAIL;
}
}
@@ -2268,7 +2268,7 @@
if (end_error)
semsg(_(e_trailing_arg), p);
else
- semsg(_(e_invexpr2), arg);
+ semsg(_(e_invalid_expression_str), arg);
}
// Some of the expression may not have been consumed. Do not check for
@@ -2758,7 +2758,7 @@
if (vim9script && type_is && (p[len] == '?' || p[len] == '#'))
{
- semsg(_(e_invexpr2), p);
+ semsg(_(e_invalid_expression_str), p);
clear_tv(rettv);
return FAIL;
}
@@ -3367,7 +3367,7 @@
// ++, --, -+ and +- are not accepted in Vim9 script
if (vim9 && (*p == '-' || *p == '+') && (*n == '-' || *n == '+'))
{
- semsg(_(e_invexpr2), s);
+ semsg(_(e_invalid_expression_str), s);
return FAIL;
}
p = n;
@@ -3441,7 +3441,7 @@
#endif
))
{
- semsg(_(e_invexpr2), *arg);
+ semsg(_(e_invalid_expression_str), *arg);
++*arg;
return FAIL;
}
@@ -5607,7 +5607,7 @@
// Only give an error when there is something, otherwise it will be
// reported at a higher level.
if (len == 0 && verbose && **arg != NUL)
- semsg(_(e_invexpr2), *arg);
+ semsg(_(e_invalid_expression_str), *arg);
return len;
}
@@ -6153,7 +6153,7 @@
*/
if (!aborting() && did_emsg == did_emsg_before
&& called_emsg == called_emsg_before)
- semsg(_(e_invexpr2), arg_start);
+ semsg(_(e_invalid_expression_str), arg_start);
need_clr_eos = FALSE;
break;
}
diff --git a/src/evalfunc.c b/src/evalfunc.c
index d3b2cde..6c467d8 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -2923,7 +2923,7 @@
if (s == NULL || eval1(&s, rettv, &EVALARG_EVALUATE) == FAIL)
{
if (p != NULL && !aborting())
- semsg(_(e_invexpr2), p);
+ semsg(_(e_invalid_expression_str), p);
need_clr_eos = FALSE;
rettv->v_type = VAR_NUMBER;
rettv->vval.v_number = 0;
diff --git a/src/evalvars.c b/src/evalvars.c
index dc66eb6..1b3d1f6 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -1334,7 +1334,7 @@
semsg(_(e_letwrong), op);
else if (endchars != NULL
&& vim_strchr(endchars, *skipwhite(arg)) == NULL)
- emsg(_(e_letunexp));
+ emsg(_(e_unexpected_characters_in_let));
else if (!check_secure())
{
c1 = name[len];
@@ -1379,7 +1379,7 @@
p = find_option_end(&arg, &opt_flags);
if (p == NULL || (endchars != NULL
&& vim_strchr(endchars, *skipwhite(p)) == NULL))
- emsg(_(e_letunexp));
+ emsg(_(e_unexpected_characters_in_let));
else
{
long n = 0;
@@ -1481,7 +1481,7 @@
semsg(_(e_letwrong), op);
else if (endchars != NULL
&& vim_strchr(endchars, *skipwhite(arg + 1)) == NULL)
- emsg(_(e_letunexp));
+ emsg(_(e_unexpected_characters_in_let));
else
{
char_u *ptofree = NULL;
@@ -1520,7 +1520,7 @@
{
if (endchars != NULL && vim_strchr(endchars,
*skipwhite(lv.ll_name_end)) == NULL)
- emsg(_(e_letunexp));
+ emsg(_(e_unexpected_characters_in_let));
else
{
set_var_lval(&lv, p, tv, copy, flags, op, var_idx);
diff --git a/src/evalwindow.c b/src/evalwindow.c
index b1b60d1..0e1a202 100644
--- a/src/evalwindow.c
+++ b/src/evalwindow.c
@@ -363,7 +363,7 @@
if (invalid_arg)
{
- semsg(_(e_invexpr2), arg);
+ semsg(_(e_invalid_expression_str), arg);
nr = 0;
}
}
@@ -636,7 +636,7 @@
nr = valid_tabpage(lastused_tabpage) ?
tabpage_index(lastused_tabpage) : 0;
else
- semsg(_(e_invexpr2), arg);
+ semsg(_(e_invalid_expression_str), arg);
}
}
else
@@ -726,7 +726,7 @@
#ifdef FEAT_CMDWIN
if (cmdwin_type != 0)
{
- emsg(_(e_cmdwin));
+ emsg(_(e_invalid_in_cmdline_window));
return;
}
#endif
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index d8c5a12..7e0bd64 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -2120,7 +2120,7 @@
// with UNIX it is possible to open a directory
if (mch_isdir(ffname))
{
- semsg(_(e_isadir2), ffname);
+ semsg(_(e_src_is_directory), ffname);
return FAIL;
}
#endif
@@ -2137,7 +2137,7 @@
else
#endif
{
- emsg(_(e_exists));
+ emsg(_(e_file_exists));
return FAIL;
}
}
@@ -3586,7 +3586,7 @@
if (secure)
{
secure = 2;
- emsg(_(e_curdir));
+ emsg(_(e_command_not_allowed_from_vimrc_in_current_dir_or_tag_search));
return TRUE;
}
#ifdef HAVE_SANDBOX
@@ -3729,7 +3729,7 @@
++cmd;
if (vim_strchr((char_u *)"/?&", *cmd) == NULL)
{
- emsg(_(e_backslash));
+ emsg(_(e_backslash_should_be_followed_by));
return;
}
if (*cmd != '&')
@@ -3944,7 +3944,7 @@
if (!subflags.do_count && !curbuf->b_p_ma)
{
// Substitution is not allowed in non-'modifiable' buffer
- emsg(_(e_modifiable));
+ emsg(_(e_cannot_make_changes_modifiable_is_off));
return;
}
@@ -4903,7 +4903,7 @@
++cmd;
if (vim_strchr((char_u *)"/?&", *cmd) == NULL)
{
- emsg(_(e_backslash));
+ emsg(_(e_backslash_should_be_followed_by));
return;
}
if (*cmd == '&')
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 027d139..62d50b2 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -1997,7 +1997,7 @@
}
if (ea.line2 < 0)
- errormsg = _(e_invrange);
+ errormsg = _(e_invalid_range);
else
{
if (ea.line2 == 0)
@@ -2124,7 +2124,7 @@
if (!curbuf->b_p_ma && (ea.argt & EX_MODIFY))
{
// Command not allowed in non-'modifiable' buffer
- errormsg = _(e_modifiable);
+ errormsg = _(e_cannot_make_changes_modifiable_is_off);
goto doend;
}
@@ -2134,7 +2134,7 @@
if (cmdwin_type != 0 && !(ea.argt & EX_CMDWIN))
{
// Command not allowed in the command line window
- errormsg = _(e_cmdwin);
+ errormsg = _(e_invalid_in_cmdline_window);
goto doend;
}
#endif
@@ -2996,7 +2996,7 @@
{
if (tabnr < 0 || tabnr > LAST_TAB_NR)
{
- *errormsg = _(e_invrange);
+ *errormsg = _(e_invalid_range);
return FAIL;
}
cmod->cmod_tab = tabnr + 1;
@@ -3239,14 +3239,14 @@
{
// there is no Vim command which uses '%' and
// ADDR_WINDOWS or ADDR_TABS
- *errormsg = _(e_invrange);
+ *errormsg = _(e_invalid_range);
return FAIL;
}
break;
case ADDR_TABS_RELATIVE:
case ADDR_UNSIGNED:
case ADDR_QUICKFIX:
- *errormsg = _(e_invrange);
+ *errormsg = _(e_invalid_range);
return FAIL;
case ADDR_ARGUMENTS:
if (ARGCOUNT == 0)
@@ -3278,7 +3278,7 @@
// '*' - visual area
if (eap->addr_type != ADDR_LINES)
{
- *errormsg = _(e_invrange);
+ *errormsg = _(e_invalid_range);
return FAIL;
}
@@ -3923,7 +3923,7 @@
if (addr_type == ADDR_NONE)
emsg(_(e_norange));
else
- emsg(_(e_invrange));
+ emsg(_(e_invalid_range));
}
/*
@@ -4210,7 +4210,7 @@
i = RE_SEARCH;
else
{
- emsg(_(e_backslash));
+ emsg(_(e_backslash_should_be_followed_by));
cmd = NULL;
goto error;
}
@@ -4312,7 +4312,7 @@
if (addr_type == ADDR_TABS_RELATIVE)
{
- emsg(_(e_invrange));
+ emsg(_(e_invalid_range));
cmd = NULL;
goto error;
}
@@ -4460,7 +4460,7 @@
if ( eap->line1 < 0
|| eap->line2 < 0
|| eap->line1 > eap->line2)
- return _(e_invrange);
+ return _(e_invalid_range);
if (eap->argt & EX_RANGE)
{
@@ -4472,46 +4472,46 @@
+ (eap->cmdidx == CMD_diffget)
#endif
)
- return _(e_invrange);
+ return _(e_invalid_range);
break;
case ADDR_ARGUMENTS:
// add 1 if ARGCOUNT is 0
if (eap->line2 > ARGCOUNT + (!ARGCOUNT))
- return _(e_invrange);
+ return _(e_invalid_range);
break;
case ADDR_BUFFERS:
// Only a boundary check, not whether the buffers actually
// exist.
if (eap->line1 < 1 || eap->line2 > get_highest_fnum())
- return _(e_invrange);
+ return _(e_invalid_range);
break;
case ADDR_LOADED_BUFFERS:
buf = firstbuf;
while (buf->b_ml.ml_mfp == NULL)
{
if (buf->b_next == NULL)
- return _(e_invrange);
+ return _(e_invalid_range);
buf = buf->b_next;
}
if (eap->line1 < buf->b_fnum)
- return _(e_invrange);
+ return _(e_invalid_range);
buf = lastbuf;
while (buf->b_ml.ml_mfp == NULL)
{
if (buf->b_prev == NULL)
- return _(e_invrange);
+ return _(e_invalid_range);
buf = buf->b_prev;
}
if (eap->line2 > buf->b_fnum)
- return _(e_invrange);
+ return _(e_invalid_range);
break;
case ADDR_WINDOWS:
if (eap->line2 > LAST_WIN_NR)
- return _(e_invrange);
+ return _(e_invalid_range);
break;
case ADDR_TABS:
if (eap->line2 > LAST_TAB_NR)
- return _(e_invrange);
+ return _(e_invalid_range);
break;
case ADDR_TABS_RELATIVE:
case ADDR_OTHER:
@@ -4521,14 +4521,14 @@
#ifdef FEAT_QUICKFIX
// No error for value that is too big, will use the last entry.
if (eap->line2 <= 0)
- return _(e_invrange);
+ return _(e_invalid_range);
#endif
break;
case ADDR_QUICKFIX_VALID:
#ifdef FEAT_QUICKFIX
if ((eap->line2 != 1 && eap->line2 > qf_get_valid_size(eap))
|| eap->line2 < 0)
- return _(e_invrange);
+ return _(e_invalid_range);
#endif
break;
case ADDR_UNSIGNED:
@@ -5187,7 +5187,8 @@
if (secure)
{
secure = 2;
- eap->errmsg = _(e_curdir);
+ eap->errmsg =
+ _(e_command_not_allowed_from_vimrc_in_current_dir_or_tag_search);
}
else if (eap->cmdidx == CMD_autocmd)
do_autocmd(eap->arg, eap->forceit);
@@ -5842,7 +5843,7 @@
{
if (unaccept_arg0 && eap->line2 == 0)
{
- eap->errmsg = _(e_invrange);
+ eap->errmsg = _(e_invalid_range);
tab_number = 0;
}
else
@@ -5852,7 +5853,7 @@
{
--tab_number;
if (tab_number < unaccept_arg0)
- eap->errmsg = _(e_invrange);
+ eap->errmsg = _(e_invalid_range);
}
}
}
@@ -6564,7 +6565,7 @@
tab_number = eap->line2;
if (tab_number < 1)
{
- eap->errmsg = _(e_invrange);
+ eap->errmsg = _(e_invalid_range);
return;
}
}
@@ -7715,7 +7716,7 @@
*/
if (n == MAXLNUM || n < 0 || n > curbuf->b_ml.ml_line_count)
{
- emsg(_(e_invrange));
+ emsg(_(e_invalid_range));
return;
}
@@ -8163,7 +8164,7 @@
// with Unix it is possible to open a directory
if (mch_isdir(fname))
{
- semsg(_(e_isadir2), fname);
+ semsg(_(e_src_is_directory), fname);
return NULL;
}
#endif
diff --git a/src/ex_getln.c b/src/ex_getln.c
index e7d71a5..22f1cf6 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -2622,7 +2622,7 @@
{
#ifdef FEAT_CMDWIN
if (cmdwin_type != 0)
- return e_cmdwin;
+ return e_invalid_in_cmdline_window;
#endif
if (textwinlock != 0)
return e_textwinlock;
diff --git a/src/filepath.c b/src/filepath.c
index 69bc8b5..0e29977 100644
--- a/src/filepath.c
+++ b/src/filepath.c
@@ -856,7 +856,7 @@
// delete a directory recursively
rettv->vval.v_number = delete_recursive(name);
else
- semsg(_(e_invexpr2), flags);
+ semsg(_(e_invalid_expression_str), flags);
}
/*
@@ -1685,7 +1685,7 @@
if (mch_isdir(fname))
{
- semsg(_(e_isadir2), fname);
+ semsg(_(e_src_is_directory), fname);
return;
}
if (*fname == NUL || (fd = mch_fopen((char *)fname, READBIN)) == NULL)
diff --git a/src/fold.c b/src/fold.c
index 75b436a..f10294d 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -1762,7 +1762,7 @@
{
if (!curbuf->b_p_ma)
{
- emsg(_(e_modifiable));
+ emsg(_(e_cannot_make_changes_modifiable_is_off));
return;
}
parseMarker(curwin);
diff --git a/src/getchar.c b/src/getchar.c
index 149bf55..39aee22 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1447,7 +1447,7 @@
{
if (curscript + 1 == NSCRIPT)
{
- emsg(_(e_nesting));
+ emsg(_(e_scripts_nested_too_deep));
return;
}
diff --git a/src/globals.h b/src/globals.h
index 07acc26..dd24cbb 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -1581,11 +1581,6 @@
*/
EXTERN char e_abort[] INIT(= N_("E470: Command aborted"));
EXTERN char e_argreq[] INIT(= N_("E471: Argument required"));
-EXTERN char e_backslash[] INIT(= N_("E10: \\ should be followed by /, ? or &"));
-#ifdef FEAT_CMDWIN
-EXTERN char e_cmdwin[] INIT(= N_("E11: Invalid in command-line window; <CR> executes, CTRL-C quits"));
-#endif
-EXTERN char e_curdir[] INIT(= N_("E12: Command not allowed from exrc/vimrc in current dir or tag search"));
#ifdef FEAT_EVAL
EXTERN char e_endif[] INIT(= N_("E171: Missing :endif"));
EXTERN char e_catch[] INIT(= N_("E603: :catch without :try"));
@@ -1598,7 +1593,6 @@
EXTERN char e_while[] INIT(= N_("E588: :endwhile without :while"));
EXTERN char e_for[] INIT(= N_("E588: :endfor without :for"));
#endif
-EXTERN char e_exists[] INIT(= N_("E13: File exists (add ! to override)"));
EXTERN char e_failed[] INIT(= N_("E472: Command failed"));
#if defined(FEAT_GUI) && defined(FEAT_XFONTSET)
EXTERN char e_fontset[] INIT(= N_("E234: Unknown fontset: %s"));
@@ -1618,13 +1612,6 @@
EXTERN char e_duparg2[] INIT(= N_("E983: Duplicate argument: %s"));
EXTERN char e_invargval[] INIT(= N_("E475: Invalid value for argument %s"));
EXTERN char e_invargNval[] INIT(= N_("E475: Invalid value for argument %s: %s"));
-#ifdef FEAT_EVAL
-EXTERN char e_invexpr2[] INIT(= N_("E15: Invalid expression: \"%s\""));
-#endif
-EXTERN char e_invrange[] INIT(= N_("E16: Invalid range"));
-#if defined(UNIX) || defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
-EXTERN char e_isadir2[] INIT(= N_("E17: \"%s\" is a directory"));
-#endif
#ifdef FEAT_SPELL
EXTERN char e_no_spell[] INIT(= N_("E756: Spell checking is not possible"));
#endif
@@ -1646,12 +1633,6 @@
EXTERN char e_loadlib[] INIT(= N_("E370: Could not load library %s"));
EXTERN char e_loadfunc[] INIT(= N_("E448: Could not load library function %s"));
#endif
-EXTERN char e_markinval[] INIT(= N_("E19: Mark has invalid line number"));
-EXTERN char e_marknotset[] INIT(= N_("E20: Mark not set"));
-EXTERN char e_modifiable[] INIT(= N_("E21: Cannot make changes, 'modifiable' is off"));
-EXTERN char e_nesting[] INIT(= N_("E22: Scripts nested too deep"));
-EXTERN char e_noalt[] INIT(= N_("E23: No alternate file"));
-EXTERN char e_noabbr[] INIT(= N_("E24: No such abbreviation"));
EXTERN char e_nobang[] INIT(= N_("E477: No ! allowed"));
#if !defined(FEAT_GUI) || defined(VIMDLL)
EXTERN char e_nogvim[] INIT(= N_("E25: GUI cannot be used: Not enabled at compile time"));
@@ -1733,7 +1714,6 @@
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_letunexp[] INIT(= N_("E18: Unexpected characters in :let"));
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
diff --git a/src/indent.c b/src/indent.c
index e1c6f52..a26344b 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -991,7 +991,7 @@
// Don't even try when 'modifiable' is off.
if (!curbuf->b_p_ma)
{
- emsg(_(e_modifiable));
+ emsg(_(e_cannot_make_changes_modifiable_is_off));
return;
}
diff --git a/src/list.c b/src/list.c
index b67dcef..6041bd2 100644
--- a/src/list.c
+++ b/src/list.c
@@ -1556,7 +1556,7 @@
break;
}
if (li == NULL) // didn't find "item2" after "item"
- emsg(_(e_invrange));
+ emsg(_(e_invalid_range));
else
{
vimlist_remove(l, item, item2);
diff --git a/src/map.c b/src/map.c
index 9923522..1f935ba 100644
--- a/src/map.c
+++ b/src/map.c
@@ -2717,7 +2717,7 @@
{
case 1: emsg(_(e_invarg));
break;
- case 2: emsg((isabbrev ? _(e_noabbr) : _(e_nomap)));
+ case 2: emsg((isabbrev ? _(e_no_such_abbreviation) : _(e_nomap)));
break;
}
}
diff --git a/src/mark.c b/src/mark.c
index 6107c9a..b5f2a7e 100644
--- a/src/mark.c
+++ b/src/mark.c
@@ -588,12 +588,12 @@
// lnum is negative if mark is in another file can can't get that
// file, error message already give then.
if (pos->lnum == 0)
- emsg(_(e_marknotset));
+ emsg(_(e_mark_not_set));
return FAIL;
}
if (pos->lnum > curbuf->b_ml.ml_line_count)
{
- emsg(_(e_markinval));
+ emsg(_(e_mark_has_invalid_line_number));
return FAIL;
}
return OK;
diff --git a/src/normal.c b/src/normal.c
index b2d0c01..18f14ec 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -5210,7 +5210,7 @@
else if (!checkclearopq(cap->oap))
{
if (!curbuf->b_p_ma)
- emsg(_(e_modifiable));
+ emsg(_(e_cannot_make_changes_modifiable_is_off));
else
{
if (virtual_active())
@@ -5235,7 +5235,7 @@
else if (!checkclearopq(cap->oap))
{
if (!curbuf->b_p_ma)
- emsg(_(e_modifiable));
+ emsg(_(e_cannot_make_changes_modifiable_is_off));
else
{
if (cap->extra_char == Ctrl_V) // get another character
@@ -7075,7 +7075,7 @@
else if (!curbuf->b_p_ma && !p_im)
{
// Only give this error when 'insertmode' is off.
- emsg(_(e_modifiable));
+ emsg(_(e_cannot_make_changes_modifiable_is_off));
clearop(cap->oap);
if (cap->cmdchar == K_PS)
// drop the pasted text
diff --git a/src/ops.c b/src/ops.c
index 73faa16..8f2ca8e 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -621,7 +621,7 @@
if (!curbuf->b_p_ma)
{
- emsg(_(e_modifiable));
+ emsg(_(e_cannot_make_changes_modifiable_is_off));
return FAIL;
}
diff --git a/src/optionstr.c b/src/optionstr.c
index 47aee35..4c1cacc 100644
--- a/src/optionstr.c
+++ b/src/optionstr.c
@@ -971,7 +971,7 @@
if (gvarp == &p_fenc)
{
if (!curbuf->b_p_ma && opt_flags != OPT_GLOBAL)
- errmsg = e_modifiable;
+ errmsg = e_cannot_make_changes_modifiable_is_off;
else if (vim_strchr(*varp, ',') != NULL)
// No comma allowed in 'fileencoding'; catches confusing it
// with 'fileencodings'.
@@ -1130,7 +1130,7 @@
else if (gvarp == &p_ff)
{
if (!curbuf->b_p_ma && !(opt_flags & OPT_GLOBAL))
- errmsg = e_modifiable;
+ errmsg = e_cannot_make_changes_modifiable_is_off;
else if (check_opt_strings(*varp, p_ff_values, FALSE) != OK)
errmsg = e_invarg;
else
diff --git a/src/popupwin.c b/src/popupwin.c
index cd343f8..8751bb4 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -61,7 +61,7 @@
n = strtol((char *)s, (char **)&endp, 10);
if (endp != NULL && *skipwhite(endp) != NUL)
{
- semsg(_(e_invexpr2), val);
+ semsg(_(e_invalid_expression_str), val);
return 0;
}
}
diff --git a/src/quickfix.c b/src/quickfix.c
index 36574b8..4ac4a01 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -3830,7 +3830,7 @@
qf_update_buffer(qi, NULL);
}
else
- emsg(_(e_invrange));
+ emsg(_(e_invalid_range));
return;
}
@@ -5655,7 +5655,7 @@
if (eap->addr_count > 0 && eap->line2 <= 0)
{
- emsg(_(e_invrange));
+ emsg(_(e_invalid_range));
return;
}
@@ -7817,7 +7817,7 @@
if (eap->line1 < 1 || eap->line1 > buf->b_ml.ml_line_count
|| eap->line2 < 1 || eap->line2 > buf->b_ml.ml_line_count)
{
- emsg(_(e_invrange));
+ emsg(_(e_invalid_range));
return FAIL;
}
diff --git a/src/spellfile.c b/src/spellfile.c
index 264264c..058558e 100644
--- a/src/spellfile.c
+++ b/src/spellfile.c
@@ -5972,12 +5972,12 @@
// time.
if (!over_write && mch_stat((char *)wfname, &st) >= 0)
{
- emsg(_(e_exists));
+ emsg(_(e_file_exists));
goto theend;
}
if (mch_isdir(wfname))
{
- semsg(_(e_isadir2), wfname);
+ semsg(_(e_src_is_directory), wfname);
goto theend;
}
diff --git a/src/textprop.c b/src/textprop.c
index bd9a77c..9255003 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -549,7 +549,7 @@
}
if (start < 1 || end < 1)
{
- emsg(_(e_invrange));
+ emsg(_(e_invalid_range));
return;
}
@@ -646,7 +646,7 @@
if (lnum < 1 || lnum > buf->b_ml.ml_line_count)
{
- emsg(_(e_invrange));
+ emsg(_(e_invalid_range));
return;
}
@@ -779,7 +779,7 @@
}
if (lnum < 1 || lnum > buf->b_ml.ml_line_count)
{
- emsg(_(e_invrange));
+ emsg(_(e_invalid_range));
return;
}
@@ -839,7 +839,7 @@
end = tv_get_number(&argvars[2]);
if (start < 1 || end < 1)
{
- emsg(_(e_invrange));
+ emsg(_(e_invalid_range));
return;
}
}
diff --git a/src/typval.c b/src/typval.c
index 21ecd87..22e9358 100644
--- a/src/typval.c
+++ b/src/typval.c
@@ -1328,7 +1328,7 @@
: STR2NR_ALL, &n, NULL, 0, TRUE);
if (len == 0)
{
- semsg(_(e_invexpr2), *arg);
+ semsg(_(e_invalid_expression_str), *arg);
return FAIL;
}
*arg += len;
diff --git a/src/undo.c b/src/undo.c
index 4b1158a..c16bcac 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -316,7 +316,7 @@
// Don't allow changes when 'modifiable' is off.
if (!curbuf->b_p_ma)
{
- emsg(_(e_modifiable));
+ emsg(_(e_cannot_make_changes_modifiable_is_off));
return FALSE;
}
diff --git a/src/userfunc.c b/src/userfunc.c
index 4756bf9..06fca0c 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -4864,7 +4864,7 @@
{
// If the function deleted lines or switched to another buffer
// the line number may become invalid.
- emsg(_(e_invrange));
+ emsg(_(e_invalid_range));
break;
}
curwin->w_cursor.lnum = lnum;
diff --git a/src/version.c b/src/version.c
index 0106bf7..b81ad3b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3069,
+/**/
3068,
/**/
3067,
diff --git a/src/vim9compile.c b/src/vim9compile.c
index c5758cc..e3e1721 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -4991,7 +4991,7 @@
}
if (type_is && (p[len] == '?' || p[len] == '#'))
{
- semsg(_(e_invexpr2), *arg);
+ semsg(_(e_invalid_expression_str), *arg);
return FAIL;
}
// extra question mark appended: ignore case
@@ -5821,7 +5821,7 @@
if (p == NULL)
{
// cannot happen?
- emsg(_(e_letunexp));
+ emsg(_(e_unexpected_characters_in_assignment));
return FAIL;
}
cc = *p;
diff --git a/src/window.c b/src/window.c
index 3a68762..09067b0 100644
--- a/src/window.c
+++ b/src/window.c
@@ -130,7 +130,7 @@
do { \
if (cmdwin_type != 0) \
{ \
- emsg(_(e_cmdwin)); \
+ emsg(_(e_invalid_in_cmdline_window)); \
return; \
} \
} while (0)
@@ -187,7 +187,7 @@
? curwin->w_alt_fnum : Prenum) == NULL)
{
if (Prenum == 0)
- emsg(_(e_noalt));
+ emsg(_(e_no_alternate_file));
else
semsg(_("E92: Buffer %ld not found"), Prenum);
break;