Mercurial > vim
diff src/userfunc.c @ 21821:0deb6f96a5a3 v8.2.1460
patch 8.2.1460: error messages are spread out
Commit: https://github.com/vim/vim/commit/451c2e3536a3cb77d07faf3cb2b834512e174351
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 15 16:33:28 2020 +0200
patch 8.2.1460: error messages are spread out
Problem: Error messages are spread out.
Solution: Move more messages into errors.h.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 15 Aug 2020 16:45:04 +0200 |
parents | d504fcd3d2c0 |
children | a427f5f26419 |
line wrap: on
line diff
--- a/src/userfunc.c +++ b/src/userfunc.c @@ -110,7 +110,7 @@ one_function_arg(char_u *arg, garray_T * if (VIM_ISWHITE(*p) && *skipwhite(p) == ':') { - semsg(_("E1059: No white space allowed before colon: %s"), + semsg(_(e_no_white_space_allowed_before_colon_str), arg_copy == NULL ? arg : arg_copy); p = skipwhite(p); } @@ -128,7 +128,7 @@ one_function_arg(char_u *arg, garray_T * } else if (*skipwhite(p) != '=') { - semsg(_("E1077: Missing argument type for %s"), + semsg(_(e_missing_argument_type_for_str), arg_copy == NULL ? arg : arg_copy); return arg; } @@ -212,7 +212,7 @@ get_function_args( // ...name: list<type> if (!ASCII_ISALPHA(*p)) { - emsg(_("E1055: Missing name after ...")); + emsg(_(e_missing_name_after_dots)); break; } @@ -1176,7 +1176,7 @@ copy_func(char_u *lambda, char_u *global ufunc_T *fp; if (ufunc == NULL) - semsg(_("E1102: lambda function not found: %s"), lambda); + semsg(_(e_lambda_function_not_found_str), lambda); else { // TODO: handle ! to overwrite @@ -2887,7 +2887,7 @@ def_function(exarg_T *eap, char_u *name_ } else { - semsg(_("E1056: expected a type: %s"), ret_type); + semsg(_(e_expected_type_str), ret_type); ret_type = NULL; } } @@ -3018,7 +3018,7 @@ def_function(exarg_T *eap, char_u *name_ if (theline == NULL) { if (eap->cmdidx == CMD_def) - emsg(_("E1057: Missing :enddef")); + emsg(_(e_missing_enddef)); else emsg(_("E126: Missing :endfunction")); goto erret; @@ -3119,7 +3119,7 @@ def_function(exarg_T *eap, char_u *name_ if (*skipwhite(p) == '(') { if (nesting == MAX_FUNC_NESTING - 1) - emsg(_("E1058: function nesting too deep")); + emsg(_(e_function_nesting_too_deep)); else { ++nesting; @@ -3785,7 +3785,7 @@ ex_delfunction(exarg_T *eap) } if (fp->uf_flags & FC_VIM9) { - semsg(_("E1084: Cannot delete Vim9 script function %s"), eap->arg); + semsg(_(e_cannot_delete_vim9_script_function_str), eap->arg); return; }