summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-31 15:09:27 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-31 15:09:27 +0000
commiteb822a280cf4706f7e67319ced1cdf3243b27e20 (patch)
tree84bfa641e243c5a4399714979a4337c496c4da17 /src/ex_cmds.c
parent9a015111a56d0011ced40d98f46a9841d1457b51 (diff)
patch 8.2.3955: error messages are spread outv8.2.3955
Problem: Error messages are spread out. Solution: Move more errors to errors.h.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index c57f332554..8f7418b7f8 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -1941,7 +1941,7 @@ do_write(exarg_T *eap)
{
// Overwriting a file that is loaded in another buffer is not a
// good idea.
- emsg(_(e_bufloaded));
+ emsg(_(e_file_is_loaded_in_another_buffer));
goto theend;
}
}
@@ -1986,7 +1986,7 @@ do_write(exarg_T *eap)
else
#endif
{
- emsg(_("E140: Use ! to write partial buffer"));
+ emsg(_(e_use_bang_to_write_partial_buffer));
goto theend;
}
}
@@ -2268,8 +2268,7 @@ do_wqall(exarg_T *eap)
#endif
if (buf->b_ffname == NULL)
{
- semsg(_("E141: No file name for buffer %ld"),
- (long)buf->b_fnum);
+ semsg(_(e_no_file_name_for_buffer_nr), (long)buf->b_fnum);
++error;
}
else if (check_readonly(&eap->forceit, buf)
@@ -2309,7 +2308,7 @@ not_writing(void)
{
if (p_write)
return FALSE;
- emsg(_("E142: File not written: Writing is disabled by 'write' option"));
+ emsg(_(e_file_not_written_writing_is_disabled_by_write_option));
return TRUE;
}
@@ -3237,8 +3236,8 @@ theend:
static void
delbuf_msg(char_u *name)
{
- semsg(_("E143: Autocommands unexpectedly deleted new buffer %s"),
- name == NULL ? (char_u *)"" : name);
+ semsg(_(e_autocommands_unexpectedly_deleted_new_buffer_str),
+ name == NULL ? (char_u *)"" : name);
vim_free(name);
au_new_curbuf.br_buf = NULL;
au_new_curbuf.br_buf_free_count = 0;
@@ -3471,7 +3470,7 @@ ex_z(exarg_T *eap)
{
if (!VIM_ISDIGIT(*x))
{
- emsg(_("E144: non-numeric argument to :z"));
+ emsg(_(e_non_numeric_argument_to_z));
return;
}
else
@@ -3581,7 +3580,7 @@ check_restricted(void)
{
if (restricted)
{
- emsg(_("E145: Shell commands and some functionality not allowed in rvim"));
+ emsg(_(e_shell_commands_and_some_functionality_not_allowed_in_rvim));
return TRUE;
}
return FALSE;
@@ -3660,7 +3659,7 @@ check_regexp_delim(int c)
{
if (isalpha(c))
{
- emsg(_("E146: Regular expressions can't be delimited by letters"));
+ emsg(_(e_regular_expressions_cant_be_delimited_by_letters));
return FAIL;
}
return OK;
@@ -4899,7 +4898,7 @@ ex_global(exarg_T *eap)
|| eap->line2 != curbuf->b_ml.ml_line_count))
{
// will increment global_busy to break out of the loop
- emsg(_("E147: Cannot do :global recursive with a range"));
+ emsg(_(e_cannot_do_global_recursive_with_range));
return;
}
@@ -4937,7 +4936,7 @@ ex_global(exarg_T *eap)
}
else if (*cmd == NUL)
{
- emsg(_("E148: Regular expression missing from global"));
+ emsg(_(e_regular_expression_missing_from_global));
return;
}
else if (check_regexp_delim(*cmd) == FAIL)