To: vim_dev@googlegroups.com Subject: Patch 8.2.3830 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3830 Problem: Error messages are spread out. Solution: Move more error messages to errors.h. Files: src/globals.h, src/errors.h, src/buffer.c, src/dict.c, src/diff.c, src/digraph.c, src/eval.c, src/evalfunc.c, src/evalvars.c, src/misc2.c, src/quickfix.c, src/typval.c, src/ui.c, src/userfunc.c, src/vim9compile.c, src/vim9execute.c, src/vim9type.c, src/window.c *** ../vim-8.2.3829/src/globals.h 2021-12-05 22:19:22.832153464 +0000 --- src/globals.h 2021-12-16 20:51:24.846813507 +0000 *************** *** 1689,1696 **** 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")); --- 1689,1694 ---- *************** *** 1700,1706 **** 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 --- 1698,1703 ---- *************** *** 1711,1717 **** || 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 --- 1708,1713 ---- *************** *** 1721,1728 **** 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")); --- 1717,1722 ---- *************** *** 1758,1767 **** 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")); --- 1752,1758 ---- *** ../vim-8.2.3829/src/errors.h 2021-12-16 08:21:05.298828014 +0000 --- src/errors.h 2021-12-16 20:55:34.795893424 +0000 *************** *** 196,208 **** 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")); ! #ifdef FEAT_EVAL 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 --- 196,272 ---- 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 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 *** ../vim-8.2.3829/src/buffer.c 2021-12-13 13:11:00.688262353 +0000 --- src/buffer.c 2021-12-16 20:27:44.491980955 +0000 *************** *** 2385,2391 **** if ((options & GETF_ALT) && n == 0) emsg(_(e_no_alternate_file)); else ! semsg(_("E92: Buffer %d not found"), n); return FAIL; } --- 2385,2391 ---- if ((options & GETF_ALT) && n == 0) emsg(_(e_no_alternate_file)); else ! semsg(_(e_buffer_nr_not_found), n); return FAIL; } *************** *** 2669,2677 **** } if (match == -2) ! semsg(_("E93: More than one match for %s"), pattern); else if (match < 0) ! semsg(_("E94: No matching buffer for %s"), pattern); return match; } --- 2669,2677 ---- } if (match == -2) ! semsg(_(e_more_than_one_match_for_str), pattern); else if (match < 0) ! semsg(_(e_no_matching_buffer_for_str), pattern); return match; } *************** *** 3373,3379 **** if (obuf->b_ml.ml_mfp != NULL || in_use) { if (message) ! emsg(_("E95: Buffer with this name already exists")); vim_free(ffname); return FAIL; } --- 3373,3379 ---- if (obuf->b_ml.ml_mfp != NULL || in_use) { if (message) ! emsg(_(e_buffer_with_this_name_already_exists)); vim_free(ffname); return FAIL; } *** ../vim-8.2.3829/src/dict.c 2021-11-30 11:56:19.030972202 +0000 --- src/dict.c 2021-12-16 20:49:35.646735755 +0000 *************** *** 1349,1355 **** dictitem_T *di; if (argvars[2].v_type != VAR_UNKNOWN) ! semsg(_(e_toomanyarg), "remove()"); else if ((d = argvars[0].vval.v_dict) != NULL && !value_check_lock(d->dv_lock, arg_errmsg, TRUE)) { --- 1349,1355 ---- dictitem_T *di; if (argvars[2].v_type != VAR_UNKNOWN) ! 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)) { *** ../vim-8.2.3829/src/diff.c 2021-10-22 20:56:35.211118936 +0100 --- src/diff.c 2021-12-16 20:33:15.754225365 +0000 *************** *** 173,179 **** return; } ! semsg(_("E96: Cannot diff more than %d buffers"), DB_COUNT); } /* --- 173,179 ---- return; } ! semsg(_(e_cannot_diff_more_than_nr_buffers), DB_COUNT); } /* *************** *** 1081,1087 **** { if (io_error) emsg(_("E810: Cannot read or write temp files")); ! emsg(_("E97: Cannot create diffs")); diff_a_works = MAYBE; #if defined(MSWIN) diff_bin_works = MAYBE; --- 1081,1087 ---- { if (io_error) emsg(_("E810: Cannot read or write temp files")); ! emsg(_(e_cannot_create_diffs)); diff_a_works = MAYBE; #if defined(MSWIN) diff_bin_works = MAYBE; *************** *** 1636,1642 **** fd = mch_fopen((char *)dout->dout_fname, "r"); if (fd == NULL) { ! emsg(_("E98: Cannot read diff output")); return; } } --- 1636,1642 ---- fd = mch_fopen((char *)dout->dout_fname, "r"); if (fd == NULL) { ! emsg(_(e_cannot_read_diff_output)); return; } } *************** *** 2625,2631 **** idx_cur = diff_buf_idx(curbuf); if (idx_cur == DB_COUNT) { ! emsg(_("E99: Current buffer is not in diff mode")); return; } --- 2625,2631 ---- idx_cur = diff_buf_idx(curbuf); if (idx_cur == DB_COUNT) { ! emsg(_(e_current_buffer_is_not_in_diff_mode)); return; } *************** *** 2646,2652 **** if (found_not_ma) emsg(_("E793: No other buffer in diff mode is modifiable")); else ! emsg(_("E100: No other buffer in diff mode")); return; } --- 2646,2652 ---- if (found_not_ma) emsg(_("E793: No other buffer in diff mode is modifiable")); else ! emsg(_(e_no_other_buffer_in_diff_mode)); return; } *************** *** 2656,2662 **** && 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")); return; } } --- 2656,2662 ---- && curtab->tp_diffbuf[i] != NULL && (eap->cmdidx != CMD_diffput || curtab->tp_diffbuf[i]->b_p_ma)) { ! emsg(_(e_more_than_two_buffers_in_diff_mode_dont_know_which_one_to_use)); return; } } *************** *** 2679,2685 **** buf = buflist_findnr(i); if (buf == NULL) { ! semsg(_("E102: Can't find buffer \"%s\""), eap->arg); return; } if (buf == curbuf) --- 2679,2685 ---- buf = buflist_findnr(i); if (buf == NULL) { ! semsg(_(e_cant_find_buffer_str), eap->arg); return; } if (buf == curbuf) *************** *** 2687,2693 **** idx_other = diff_buf_idx(buf); if (idx_other == DB_COUNT) { ! semsg(_("E103: Buffer \"%s\" is not in diff mode"), eap->arg); return; } } --- 2687,2693 ---- idx_other = diff_buf_idx(buf); if (idx_other == DB_COUNT) { ! semsg(_(e_buffer_str_is_not_in_diff_mode), eap->arg); return; } } *** ../vim-8.2.3829/src/digraph.c 2021-09-08 13:57:38.233188064 +0100 --- src/digraph.c 2021-12-16 20:34:22.649927607 +0000 *************** *** 2043,2049 **** } if (char1 == ESC || char2 == ESC) { ! emsg(_("E104: Escape not allowed in digraph")); return FALSE; } return TRUE; --- 2043,2049 ---- } if (char1 == ESC || char2 == ESC) { ! emsg(_(e_escape_not_allowed_in_digraph)); return FALSE; } return TRUE; *************** *** 2622,2628 **** if (!getline_equal(eap->getline, eap->cookie, getsourceline)) { ! emsg(_("E105: Using :loadkeymap not in a sourced file")); return; } --- 2622,2628 ---- if (!getline_equal(eap->getline, eap->cookie, getsourceline)) { ! emsg(_(e_using_loadkeymap_not_in_sourced_file)); return; } *** ../vim-8.2.3829/src/eval.c 2021-12-15 15:41:41.085254846 +0000 --- src/eval.c 2021-12-16 20:41:54.352206579 +0000 *************** *** 1071,1077 **** if (*p != ']') { if (!quiet) ! emsg(_(e_missbrac)); clear_tv(&var1); clear_tv(&var2); return NULL; --- 1071,1077 ---- if (*p != ']') { if (!quiet) ! emsg(_(e_missing_closing_square_brace)); clear_tv(&var1); clear_tv(&var2); return NULL; *************** *** 2375,2381 **** p = eval_next_non_blank(*arg, evalarg_used, &getnext); if (*p != ':') { ! emsg(_(e_missing_colon)); if (evaluate && result) clear_tv(rettv); evalarg_used->eval_flags = orig_flags; --- 2375,2381 ---- p = eval_next_non_blank(*arg, evalarg_used, &getnext); if (*p != ':') { ! emsg(_(e_missing_colon_after_questionmark)); if (evaluate && result) clear_tv(rettv); evalarg_used->eval_flags = orig_flags; *************** *** 3568,3574 **** ++*arg; else if (ret == OK) { ! emsg(_(e_missing_close)); clear_tv(rettv); ret = FAIL; } --- 3568,3574 ---- ++*arg; else if (ret == OK) { ! emsg(_(e_missing_closing_paren)); clear_tv(rettv); ret = FAIL; } *************** *** 3854,3860 **** *arg = skipwhite_and_linebreak(*arg, evalarg); if (**arg != ')') { ! emsg(_(e_missing_close)); ret = FAIL; } ++*arg; --- 3854,3860 ---- *arg = skipwhite_and_linebreak(*arg, evalarg); if (**arg != ')') { ! emsg(_(e_missing_closing_paren)); ret = FAIL; } ++*arg; *************** *** 3868,3874 **** if (*skipwhite(*arg) == '(') emsg(_(e_nowhitespace)); else ! semsg(_(e_missing_paren), "lambda"); } clear_tv(rettv); ret = FAIL; --- 3868,3874 ---- if (*skipwhite(*arg) == '(') emsg(_(e_nowhitespace)); else ! semsg(_(e_missing_parenthesis_str), "lambda"); } clear_tv(rettv); ret = FAIL; *************** *** 3923,3929 **** if (**arg != '(') { if (verbose) ! semsg(_(e_missing_paren), name); ret = FAIL; } else if (VIM_ISWHITE((*arg)[-1])) --- 3923,3929 ---- if (**arg != '(') { if (verbose) ! semsg(_(e_missing_parenthesis_str), name); ret = FAIL; } else if (VIM_ISWHITE((*arg)[-1])) *************** *** 4061,4067 **** if (**arg != ']') { if (verbose) ! emsg(_(e_missbrac)); clear_tv(&var1); if (range) clear_tv(&var2); --- 4061,4067 ---- if (**arg != ']') { if (verbose) ! emsg(_(e_missing_closing_square_brace)); clear_tv(&var1); if (range) clear_tv(&var2); *** ../vim-8.2.3829/src/evalfunc.c 2021-12-16 08:21:05.302828003 +0000 --- src/evalfunc.c 2021-12-16 20:51:51.586966441 +0000 *************** *** 2529,2537 **** name = internal_func_name(idx); if (res == FCERR_TOOMANY) ! semsg(_(e_toomanyarg), name); else ! semsg(_(e_toofewarg), name); return -1; } --- 2529,2537 ---- name = internal_func_name(idx); if (res == FCERR_TOOMANY) ! semsg(_(e_too_many_arguments_for_function_str), name); else ! semsg(_(e_not_enough_arguments_for_function_str), name); return -1; } *************** *** 4049,4055 **** arg_idx = 0; else if (list->lv_len > MAX_FUNC_ARGS) { ! emsg_funcname((char *)e_toomanyarg, s); vim_free(name); goto theend; } --- 4049,4056 ---- arg_idx = 0; else if (list->lv_len > MAX_FUNC_ARGS) { ! emsg_funcname((char *)e_too_many_arguments_for_function_str, ! s); vim_free(name); goto theend; } *************** *** 9012,9018 **** { if (yank_type != MAUTO) { ! semsg(_(e_toomanyarg), "setreg"); return; } --- 9013,9019 ---- { if (yank_type != MAUTO) { ! semsg(_(e_too_many_arguments_for_function_str), "setreg"); return; } *** ../vim-8.2.3829/src/evalvars.c 2021-12-12 21:02:00.029298117 +0000 --- src/evalvars.c 2021-12-16 20:37:22.177192539 +0000 *************** *** 1858,1864 **** } if (forceit) return OK; ! semsg(_("E108: No such variable: \"%s\""), name); return FAIL; } --- 1858,1864 ---- } if (forceit) return OK; ! semsg(_(e_no_such_variable_str), name); return FAIL; } *** ../vim-8.2.3829/src/misc2.c 2021-11-29 20:39:06.678101624 +0000 --- src/misc2.c 2021-12-16 20:21:58.650642012 +0000 *************** *** 1780,1786 **** if (*p_sh == NUL) { ! emsg(_(e_shellempty)); retval = -1; } else --- 1780,1786 ---- if (*p_sh == NUL) { ! emsg(_(e_shell_option_is_empty)); retval = -1; } else *** ../vim-8.2.3829/src/quickfix.c 2021-12-12 16:26:35.868627601 +0000 --- src/quickfix.c 2021-12-16 20:24:28.705344857 +0000 *************** *** 7190,7196 **** if (!did_bufnr_emsg) { did_bufnr_emsg = TRUE; ! semsg(_("E92: Buffer %d not found"), bufnum); } valid = FALSE; bufnum = 0; --- 7190,7196 ---- if (!did_bufnr_emsg) { did_bufnr_emsg = TRUE; ! semsg(_(e_buffer_nr_not_found), bufnum); } valid = FALSE; bufnum = 0; *** ../vim-8.2.3829/src/typval.c 2021-12-16 08:21:05.302828003 +0000 --- src/typval.c 2021-12-16 20:46:20.155337960 +0000 *************** *** 1668,1674 **** if (option_end == NULL) { if (rettv != NULL) ! semsg(_("E112: Option name missing: %s"), *arg); return FAIL; } --- 1668,1674 ---- if (option_end == NULL) { if (rettv != NULL) ! semsg(_(e_option_name_missing_str), *arg); return FAIL; } *************** *** 1686,1692 **** if (opt_type == gov_unknown) { if (rettv != NULL) ! semsg(_(e_unknown_option), *arg); ret = FAIL; } else if (rettv != NULL) --- 1686,1692 ---- if (opt_type == gov_unknown) { if (rettv != NULL) ! semsg(_(e_unknown_option_str), *arg); ret = FAIL; } else if (rettv != NULL) *************** *** 1887,1893 **** if (*p != '"') { ! semsg(_("E114: Missing quote: %s"), *arg); return FAIL; } --- 1887,1893 ---- if (*p != '"') { ! semsg(_(e_missing_double_quote_str), *arg); return FAIL; } *************** *** 2027,2033 **** if (*p != '\'') { ! semsg(_("E115: Missing quote: %s"), *arg); return FAIL; } --- 2027,2033 ---- if (*p != '\'') { ! semsg(_(e_missing_single_quote_str), *arg); return FAIL; } *** ../vim-8.2.3829/src/ui.c 2021-12-09 10:50:48.562865618 +0000 --- src/ui.c 2021-12-16 20:22:01.726612696 +0000 *************** *** 577,583 **** suspend_shell(void) { if (*p_sh == NUL) ! emsg(_(e_shellempty)); else { msg_puts(_("new shell started\n")); --- 577,583 ---- suspend_shell(void) { if (*p_sh == NUL) ! emsg(_(e_shell_option_is_empty)); else { msg_puts(_("new shell started\n")); *** ../vim-8.2.3829/src/userfunc.c 2021-12-15 16:38:28.910629665 +0000 --- src/userfunc.c 2021-12-16 20:53:07.147345509 +0000 *************** *** 1780,1786 **** 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); } while (--argcount >= 0) --- 1780,1786 ---- if (argcount == MAX_FUNC_ARGS) emsg_funcname(N_("E740: Too many arguments for function %s"), name); else ! emsg_funcname(N_(e_invalid_arguments_for_function_str), name); } while (--argcount >= 0) *************** *** 3240,3246 **** if (funcexe->fe_found_var) semsg(_(e_not_callable_type_str), name); else ! emsg_funcname(e_unknownfunc, name); break; case FCERR_NOTMETHOD: emsg_funcname( --- 3240,3246 ---- if (funcexe->fe_found_var) semsg(_(e_not_callable_type_str), name); else ! emsg_funcname(e_unknown_function_str, name); break; case FCERR_NOTMETHOD: emsg_funcname( *************** *** 3250,3263 **** emsg_funcname(N_(e_func_deleted), name); break; case FCERR_TOOMANY: ! emsg_funcname((char *)e_toomanyarg, name); break; case FCERR_TOOFEW: ! emsg_funcname((char *)e_toofewarg, name); break; case FCERR_SCRIPT: emsg_funcname( ! N_("E120: Using not in a script context: %s"), name); break; case FCERR_DICT: emsg_funcname( --- 3250,3265 ---- emsg_funcname(N_(e_func_deleted), name); break; case FCERR_TOOMANY: ! emsg_funcname((char *)e_too_many_arguments_for_function_str, ! name); break; case FCERR_TOOFEW: ! emsg_funcname((char *)e_not_enough_arguments_for_function_str, ! name); break; case FCERR_SCRIPT: emsg_funcname( ! N_(e_using_sid_not_in_script_context_str), name); break; case FCERR_DICT: emsg_funcname( *************** *** 5098,5104 **** startarg = skipwhite(arg); if (*startarg != '(') { ! semsg(_(e_missing_paren), eap->arg); goto end; } if (in_vim9script() && startarg > arg) --- 5100,5106 ---- startarg = skipwhite(arg); if (*startarg != '(') { ! semsg(_(e_missing_parenthesis_str), eap->arg); goto end; } if (in_vim9script() && startarg > arg) *** ../vim-8.2.3829/src/vim9compile.c 2021-12-16 15:49:39.157345806 +0000 --- src/vim9compile.c 2021-12-16 20:52:29.003163534 +0000 *************** *** 2008,2019 **** RETURN_OK_IF_SKIP(cctx); if (argcount > regular_args && !has_varargs(ufunc)) { ! semsg(_(e_toomanyarg), printable_func_name(ufunc)); return FAIL; } if (argcount < regular_args - ufunc->uf_def_args.ga_len) { ! semsg(_(e_toofewarg), printable_func_name(ufunc)); return FAIL; } --- 2008,2021 ---- RETURN_OK_IF_SKIP(cctx); if (argcount > regular_args && !has_varargs(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_not_enough_arguments_for_function_str), ! printable_func_name(ufunc)); return FAIL; } *************** *** 2145,2156 **** if (argcount < type->tt_min_argcount - varargs) { ! semsg(_(e_toofewarg), name); return FAIL; } if (!varargs && argcount > type->tt_argcount) { ! semsg(_(e_toomanyarg), name); return FAIL; } if (type->tt_args != NULL) --- 2147,2158 ---- if (argcount < type->tt_min_argcount - varargs) { ! semsg(_(e_not_enough_arguments_for_function_str), name); return FAIL; } if (!varargs && argcount > type->tt_argcount) { ! semsg(_(e_too_many_arguments_for_function_str), name); return FAIL; } if (type->tt_args != NULL) *************** *** 3444,3450 **** p = skipwhite(p); } failret: ! emsg(_(e_missing_close)); return FAIL; } --- 3446,3452 ---- p = skipwhite(p); } failret: ! emsg(_(e_missing_closing_paren)); return FAIL; } *************** *** 3580,3586 **** res = generate_BCALL(cctx, idx, argcount, argcount_init == 1); } else ! semsg(_(e_unknownfunc), namebuf); goto theend; } --- 3582,3588 ---- res = generate_BCALL(cctx, idx, argcount, argcount_init == 1); } else ! semsg(_(e_unknown_function_str), namebuf); goto theend; } *************** *** 3625,3631 **** if (STRNCMP(namebuf, "g:", 2) == 0 || is_autoload) res = generate_UCALL(cctx, name, argcount); else ! semsg(_(e_unknownfunc), namebuf); theend: vim_free(tofree); --- 3627,3633 ---- if (STRNCMP(namebuf, "g:", 2) == 0 || is_autoload) res = generate_UCALL(cctx, name, argcount); else ! semsg(_(e_unknown_function_str), namebuf); theend: vim_free(tofree); *************** *** 4354,4360 **** ++*arg; else if (ret == OK) { ! emsg(_(e_missing_close)); ret = FAIL; } return ret; --- 4356,4362 ---- ++*arg; else if (ret == OK) { ! emsg(_(e_missing_closing_paren)); ret = FAIL; } return ret; *************** *** 4471,4477 **** if (*skipwhite(*arg) == '(') emsg(_(e_nowhitespace)); else ! semsg(_(e_missing_paren), *arg); return FAIL; } *arg = skipwhite(*arg + 1); --- 4473,4479 ---- if (*skipwhite(*arg) == '(') emsg(_(e_nowhitespace)); else ! semsg(_(e_missing_parenthesis_str), *arg); return FAIL; } *arg = skipwhite(*arg + 1); *************** *** 4530,4536 **** ; if (*p != '(') { ! semsg(_(e_missing_paren), *arg); return FAIL; } if (compile_call(arg, p - *arg, cctx, ppconst, 1) == FAIL) --- 4532,4538 ---- ; if (*p != '(') { ! semsg(_(e_missing_parenthesis_str), *arg); return FAIL; } if (compile_call(arg, p - *arg, cctx, ppconst, 1) == FAIL) *************** *** 4604,4610 **** if (**arg != ']') { ! emsg(_(e_missbrac)); return FAIL; } *arg = *arg + 1; --- 4606,4612 ---- if (**arg != ']') { ! emsg(_(e_missing_closing_square_brace)); return FAIL; } *arg = *arg + 1; *************** *** 5636,5642 **** p = may_peek_next_line(cctx, *arg, &next); if (*p != ':') { ! emsg(_(e_missing_colon)); return FAIL; } if (next != NULL) --- 5638,5644 ---- p = may_peek_next_line(cctx, *arg, &next); if (*p != ':') { ! emsg(_(e_missing_colon_after_questionmark)); return FAIL; } if (next != NULL) *************** *** 6141,6147 **** switch (opt_type) { case gov_unknown: ! semsg(_(e_unknown_option), name); return FAIL; case gov_string: case gov_hidden_string: --- 6143,6149 ---- switch (opt_type) { case gov_unknown: ! semsg(_(e_unknown_option_str), name); return FAIL; case gov_string: case gov_hidden_string: *************** *** 6718,6724 **** if (r == OK && *skipwhite(p) != ']') { // this should not happen ! emsg(_(e_missbrac)); r = FAIL; } } --- 6720,6726 ---- if (r == OK && *skipwhite(p) != ']') { // this should not happen ! emsg(_(e_missing_closing_square_brace)); r = FAIL; } } *************** *** 6762,6768 **** { // this should not happen if (res != FAIL) ! emsg(_(e_missbrac)); return FAIL; } --- 6764,6770 ---- { // this should not happen if (res != FAIL) ! emsg(_(e_missing_closing_square_brace)); return FAIL; } *** ../vim-8.2.3829/src/vim9execute.c 2021-12-14 18:14:34.125509146 +0000 --- src/vim9execute.c 2021-12-16 20:52:39.123213626 +0000 *************** *** 906,914 **** if (error != FCERR_UNKNOWN) { if (error == FCERR_TOOMANY) ! semsg(_(e_toomanyarg), ufunc->uf_name); else ! semsg(_(e_toofewarg), ufunc->uf_name); return FAIL; } --- 906,915 ---- if (error != FCERR_UNKNOWN) { if (error == FCERR_TOOMANY) ! semsg(_(e_too_many_arguments_for_function_str), ufunc->uf_name); else ! semsg(_(e_not_enough_arguments_for_function_str), ! ufunc->uf_name); return FAIL; } *************** *** 1106,1112 **** if (res == FAIL) { if (called_emsg == called_emsg_before) ! semsg(_(e_unknownfunc), name == NULL ? (char_u *)"[unknown]" : name); return FAIL; } --- 1107,1113 ---- if (res == FAIL) { if (called_emsg == called_emsg_before) ! semsg(_(e_unknown_function_str), name == NULL ? (char_u *)"[unknown]" : name); return FAIL; } *************** *** 1460,1471 **** v = find_var(name, NULL, FALSE); if (v == NULL) { ! semsg(_(e_unknownfunc), name); return FAIL; } if (v->di_tv.v_type != VAR_PARTIAL && v->di_tv.v_type != VAR_FUNC) { ! semsg(_(e_unknownfunc), name); return FAIL; } return call_partial(&v->di_tv, argcount, ectx); --- 1461,1472 ---- v = find_var(name, NULL, FALSE); if (v == NULL) { ! 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_unknown_function_str), name); return FAIL; } return call_partial(&v->di_tv, argcount, ectx); *** ../vim-8.2.3829/src/vim9type.c 2021-09-11 22:07:39.796286455 +0100 --- src/vim9type.c 2021-12-16 20:52:06.587047762 +0000 *************** *** 618,629 **** return OK; // just in case if (argcount < type->tt_min_argcount - varargs) { ! semsg(_(e_toofewarg), name); return FAIL; } if (!varargs && type->tt_argcount >= 0 && argcount > type->tt_argcount) { ! semsg(_(e_toomanyarg), name); return FAIL; } if (type->tt_args == NULL) --- 618,629 ---- return OK; // just in case if (argcount < type->tt_min_argcount - varargs) { ! semsg(_(e_not_enough_arguments_for_function_str), name); return FAIL; } if (!varargs && type->tt_argcount >= 0 && argcount > type->tt_argcount) { ! semsg(_(e_too_many_arguments_for_function_str), name); return FAIL; } if (type->tt_args == NULL) *************** *** 893,899 **** if (*p != ')') { if (give_error) ! emsg(_(e_missing_close)); return NULL; } *arg = p + 1; --- 893,899 ---- if (*p != ')') { if (give_error) ! emsg(_(e_missing_closing_paren)); return NULL; } *arg = p + 1; *** ../vim-8.2.3829/src/window.c 2021-12-13 13:11:00.696262332 +0000 --- src/window.c 2021-12-16 20:24:49.153186928 +0000 *************** *** 198,204 **** if (Prenum == 0) emsg(_(e_no_alternate_file)); else ! semsg(_("E92: Buffer %ld not found"), Prenum); break; } --- 198,204 ---- if (Prenum == 0) emsg(_(e_no_alternate_file)); else ! semsg(_(e_buffer_nr_not_found), Prenum); break; } *** ../vim-8.2.3829/src/version.c 2021-12-16 19:45:18.044003124 +0000 --- src/version.c 2021-12-16 20:54:34.331696752 +0000 *************** *** 751,752 **** --- 751,754 ---- { /* Add new patch number below this line */ + /**/ + 3830, /**/ -- hundred-and-one symptoms of being an internet addict: 47. You are so familiar with the WWW that you find the search engines useless. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///