To: vim_dev@googlegroups.com Subject: Patch 8.2.4010 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4010 Problem: Error messages are spread out. Solution: Move more error messages to errors.h. Files: src/errors.h, src/crypt.c, src/diff.c, src/ex_docmd.c, src/ex_getln.c, src/fileio.c, src/findfile.c, src/float.c, src/gui.c, src/highlight.c, src/if_mzsch.c, src/if_py_both.h, src/if_python.c, src/if_python3.c, src/insexpand.c, src/match.c, src/memline.c, src/option.c, src/popupwin.c, src/regexp.c, src/regexp_nfa.c, src/spellfile.c, src/strings.c, src/syntax.c, src/textprop.c, src/typval.c, src/undo.c, src/usercmd.c, src/userfunc.c, src/window.c *** ../vim-8.2.4009/src/errors.h 2022-01-05 16:08:59.516426454 +0000 --- src/errors.h 2022-01-05 17:47:14.665316794 +0000 *************** *** 1861,1884 **** #endif EXTERN char e_id_is_reserved_for_match_nr[] INIT(= N_("E798: ID is reserved for \":match\": %d")); ! EXTERN char e_invalid_id_nr_must_be_greater_than_or_equal_to_one[] ! INIT(= N_("E799: Invalid ID: %d (must be greater than or equal to 1)")); #ifndef FEAT_ARABIC EXTERN char e_arabic_cannot_be_used_not_enabled_at_compile_time[] INIT(= N_("E800: Arabic cannot be used: Not enabled at compile time\n")); #endif ! #ifdef FEAT_EVAL EXTERN char e_cannot_use_percent_with_float[] INIT(= N_("E804: Cannot use '%' with Float")); #endif - #ifdef FEAT_FLOAT EXTERN char e_using_float_as_string[] INIT(= N_("E806: using Float as a String")); #endif EXTERN char e_cannot_close_autocmd_or_popup_window[] INIT(= N_("E813: Cannot close autocmd or popup window")); EXTERN char e_blowfish_big_little_endian_use_wrong[] INIT(= N_("E817: Blowfish big/little endian use wrong")); EXTERN char e_sha256_test_failed[] --- 1861,1915 ---- #endif EXTERN char e_id_is_reserved_for_match_nr[] INIT(= N_("E798: ID is reserved for \":match\": %d")); ! // E799 unused #ifndef FEAT_ARABIC EXTERN char e_arabic_cannot_be_used_not_enabled_at_compile_time[] INIT(= N_("E800: Arabic cannot be used: Not enabled at compile time\n")); #endif ! EXTERN char e_id_already_taken_nr[] ! INIT(= N_("E801: ID already taken: %d")); ! EXTERN char e_invalid_id_nr_must_be_greater_than_or_equal_to_one[] ! INIT(= N_("E802: Invalid ID: %d (must be greater than or equal to 1)")); ! EXTERN char e_id_not_found_nr[] ! INIT(= N_("E803: ID not found: %d")); #ifdef FEAT_EVAL EXTERN char e_cannot_use_percent_with_float[] INIT(= N_("E804: Cannot use '%' with Float")); #endif #ifdef FEAT_FLOAT + EXTERN char e_using_float_as_number[] + INIT(= N_("E805: Using a Float as a Number")); EXTERN char e_using_float_as_string[] INIT(= N_("E806: using Float as a String")); #endif + #ifdef FEAT_FLOAT + EXTERN char e_expected_float_argument_for_printf[] + INIT(= N_("E807: Expected Float argument for printf()")); + #endif + #if defined(FEAT_EVAL) && defined(FEAT_FLOAT) + EXTERN char e_number_or_float_required[] + INIT(= N_("E808: Number or Float required")); + #endif + #ifndef FEAT_EVAL + EXTERN char e_hashsmall_is_not_available_without_the_eval_feature[] + INIT(= N_("E809: #< is not available without the +eval feature")); + #endif + EXTERN char e_cannot_read_or_write_temp_files[] + INIT(= N_("E810: Cannot read or write temp files")); + EXTERN char e_not_allowed_to_change_buffer_information_now[] + INIT(= N_("E811: Not allowed to change buffer information now")); + EXTERN char e_autocommands_changed_buffer_or_buffer_name[] + INIT(= N_("E812: Autocommands changed buffer or buffer name")); EXTERN char e_cannot_close_autocmd_or_popup_window[] INIT(= N_("E813: Cannot close autocmd or popup window")); + EXTERN char e_cannot_close_window_only_autocmd_window_would_remain[] + INIT(= N_("E814: Cannot close window, only autocmd window would remain")); + #ifdef FEAT_MZSCHEME + EXTERN char e_sorry_this_command_is_disabled_the_mzscheme_libraries_could_not_be_loaded[] + INIT(= N_("E815: Sorry, this command is disabled, the MzScheme libraries could not be loaded.")); + #endif + EXTERN char e_cannot_read_patch_output[] + INIT(= N_("E816: Cannot read patch output")); EXTERN char e_blowfish_big_little_endian_use_wrong[] INIT(= N_("E817: Blowfish big/little endian use wrong")); EXTERN char e_sha256_test_failed[] *************** *** 1887,1907 **** --- 1918,2000 ---- INIT(= N_("E819: Blowfish test failed")); EXTERN char e_sizeof_uint32_isnot_four[] INIT(= N_("E820: sizeof(uint32_t) != 4")); + EXTERN char e_file_is_encrypted_with_unknown_method[] + INIT(= N_("E821: File is encrypted with unknown method")); + EXTERN char e_cannot_open_undo_file_for_reading_str[] + INIT(= N_("E822: Cannot open undo file for reading: %s")); + EXTERN char e_not_an_undo_file_str[] + INIT(= N_("E823: Not an undo file: %s")); + EXTERN char e_incompatible_undo_file_str[] + INIT(= N_("E824: Incompatible undo file: %s")); + EXTERN char e_corrupted_undo_file_str_str[] + INIT(= N_("E825: Corrupted undo file (%s): %s")); + EXTERN char e_undo_file_decryption_failed[] + INIT(= N_("E826: Undo file decryption failed: %s")); + EXTERN char e_undo_file_is_encrypted_str[] + INIT(= N_("E827: Undo file is encrypted: %s")); + EXTERN char e_cannot_open_undo_file_for_writing_str[] + INIT(= N_("E828: Cannot open undo file for writing: %s")); + EXTERN char e_write_error_in_undo_file_str[] + INIT(= N_("E829: write error in undo file: %s")); + EXTERN char e_undo_number_nr_not_found[] + INIT(= N_("E830: Undo number %ld not found")); EXTERN char e_bf_key_init_called_with_empty_password[] INIT(= N_("E831: bf_key_init() called with empty password")); + EXTERN char e_non_encrypted_file_has_encrypted_undo_file[] + INIT(= N_("E832: Non-encrypted file has encrypted undo file: %s")); + EXTERN char e_str_is_encrypted_and_this_version_of_vim_does_not_support_encryption[] + INIT(= N_("E833: %s is encrypted and this version of Vim does not support encryption")); EXTERN char e_conflicts_with_value_of_listchars[] INIT(= N_("E834: Conflicts with value of 'listchars'")); EXTERN char e_conflicts_with_value_of_fillchars[] INIT(= N_("E835: Conflicts with value of 'fillchars'")); + EXTERN char e_this_vim_cannot_execute_python_after_using_py3[] + INIT(= N_("E836: This Vim cannot execute :python after using :py3")); + EXTERN char e_this_vim_cannot_execute_py3_after_using_python[] + INIT(= N_("E837: This Vim cannot execute :py3 after using :python")); #ifdef FEAT_NETBEANS_INTG EXTERN char e_netbeans_is_not_supported_with_this_GUI[] INIT(= N_("E838: netbeans is not supported with this GUI")); #endif // E839 unused + # ifdef FEAT_COMPL_FUNC + EXTERN char e_complete_function_deleted_text[] + INIT(= N_("E840: Completion function deleted text")); + # endif + EXTERN char e_reserved_name_cannot_be_used_for_user_defined_command[] + INIT(= N_("E841: Reserved name, cannot be used for user defined command")); + EXTERN char e_no_line_number_to_use_for_slnum[] + INIT(= N_("E842: no line number to use for \"\"")); + EXTERN char e_error_while_updating_swap_file_crypt[] + INIT(= N_("E843: Error while updating swap file crypt")); + EXTERN char e_invalid_cchar_value[] + INIT(= N_("E844: invalid cchar value")); + #ifdef FEAT_SPELL + EXTERN char e_insufficient_memory_word_list_will_be_incomplete[] + INIT(= N_("E845: Insufficient memory, word list will be incomplete")); + #endif + EXTERN char e_key_code_not_set[] + INIT(= N_("E846: Key code not set")); + EXTERN char e_too_many_syntax_includes[] + INIT(= N_("E847: Too many syntax includes")); + EXTERN char e_too_many_syntax_clusters[] + INIT(= N_("E848: Too many syntax clusters")); + EXTERN char e_too_many_highlight_and_syntax_groups[] + INIT(= N_("E849: Too many highlight and syntax groups")); #ifndef FEAT_CLIPBOARD EXTERN char e_invalid_register_name[] INIT(= N_("E850: Invalid register name")); #endif + #ifdef FEAT_GUI + EXTERN char e_failed_to_create_new_process_for_GUI[] + INIT(= N_("E851: Failed to create a new process for the GUI")); + EXTERN char e_the_child_process_failed_to_start_GUI[] + INIT(= N_("E852: The child process failed to start the GUI")); + #endif + EXTERN char e_duplicate_argument_name_str[] + INIT(= N_("E853: Duplicate argument name: %s")); + EXTERN char e_path_too_long_for_completion[] + INIT(= N_("E854: path too long for completion")); EXTERN char e_autocommands_caused_command_to_abort[] INIT(= N_("E855: Autocommands caused command to abort")); #ifdef FEAT_EVAL *************** *** 1910,1915 **** --- 2003,2040 ---- EXTERN char e_dictionary_key_str_required[] INIT(= N_("E857: Dictionary key \"%s\" required")); #endif + #if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) + EXTERN char e_eval_did_not_return_valid_python_object[] + INIT(= N_("E858: Eval did not return a valid python object")); + EXTERN char e_failed_to_convert_returned_python_object_to_vim_value[] + INIT(= N_("E859: Failed to convert returned python object to a Vim value")); + #endif + EXTERN char e_need_id_and_type_with_both[] + INIT(= N_("E860: Need 'id' and 'type' with 'both'")); + EXTERN char e_cannot_open_second_popup_with_terminal[] + INIT(= N_("E861: Cannot open a second popup with a terminal")); + EXTERN char e_cannot_use_g_here[] + INIT(= N_("E862: Cannot use g: here")); + EXTERN char e_not_allowed_for_terminal_in_popup_window[] + INIT(= N_("E863: Not allowed for a terminal in a popup window")); + EXTERN char e_percent_hash_can_only_be_followed_by_zero_one_two_automatic_engine_will_be_used[] + INIT(= N_("E864: \\%#= can only be followed by 0, 1, or 2. The automatic engine will be used")); + EXTERN char e_nfa_regexp_end_encountered_prematurely[] + INIT(= N_("E865: (NFA) Regexp end encountered prematurely")); + EXTERN char e_nfa_regexp_misplaced_chr[] + INIT(= N_("E866: (NFA regexp) Misplaced %c")); + EXTERN char e_nfa_unknown_operator_z_chr[] + INIT(= N_("E867: (NFA) Unknown operator '\\z%c'")); + EXTERN char e_nfa_unknown_operator_percent_chr[] + INIT(= N_("E867: (NFA) Unknown operator '\\%%%c'")); + EXTERN char e_error_building_nfa_with_equivalence_class[] + INIT(= N_("E868: Error building NFA with equivalence class!")); + EXTERN char e_nfa_unknown_operator_at_chr[] + INIT(= N_("E869: (NFA) Unknown operator '\\@%c'")); + + EXTERN char e_nfa_regexp_invalid_character_class_nr[] + INIT(= N_("E877: (NFA regexp) Invalid character class: %d")); + #ifdef FEAT_PROP_POPUP EXTERN char e_number_required[] INIT(= N_("E889: Number required")); *************** *** 1964,1969 **** --- 2089,2097 ---- #endif EXTERN char e_file_changed_while_writing[] INIT(= N_("E949: File changed while writing")); + + EXTERN char e_percent_value_too_large[] + INIT(= N_("E951: \\% value too large")); EXTERN char e_autocommand_caused_recursive_behavior[] INIT(= N_("E952: Autocommand caused recursive behavior")); EXTERN char e_cannot_use_pattern_recursively[] *** ../vim-8.2.4009/src/crypt.c 2021-07-29 19:37:45.652199179 +0100 --- src/crypt.c 2022-01-05 17:11:04.340231004 +0000 *************** *** 200,206 **** i = (int)STRLEN(crypt_magic_head); if (len >= i && memcmp(ptr, crypt_magic_head, i) == 0) ! emsg(_("E821: File is encrypted with unknown method")); return -1; } --- 200,206 ---- i = (int)STRLEN(crypt_magic_head); if (len >= i && memcmp(ptr, crypt_magic_head, i) == 0) ! emsg(_(e_file_is_encrypted_with_unknown_method)); return -1; } *** ../vim-8.2.4009/src/diff.c 2022-01-05 16:08:59.516426454 +0000 --- src/diff.c 2022-01-05 17:07:32.532610205 +0000 *************** *** 1096,1102 **** if (!ok) { if (io_error) ! emsg(_("E810: Cannot read or write temp files")); emsg(_(e_cannot_create_diffs)); diff_a_works = MAYBE; #if defined(MSWIN) --- 1096,1102 ---- if (!ok) { if (io_error) ! emsg(_(e_cannot_read_or_write_temp_files)); emsg(_(e_cannot_create_diffs)); diff_a_works = MAYBE; #if defined(MSWIN) *************** *** 1337,1343 **** // Only continue if the output file was created. if (mch_stat((char *)tmp_new, &st) < 0 || st.st_size == 0) ! emsg(_("E816: Cannot read patch output")); else { if (curbuf->b_fname != NULL) --- 1337,1343 ---- // Only continue if the output file was created. if (mch_stat((char *)tmp_new, &st) < 0 || st.st_size == 0) ! emsg(_(e_cannot_read_patch_output)); else { if (curbuf->b_fname != NULL) *** ../vim-8.2.4009/src/ex_docmd.c 2022-01-05 16:50:36.534031580 +0000 --- src/ex_docmd.c 2022-01-05 17:23:09.004781835 +0000 *************** *** 9051,9057 **** return NULL; } #else ! *errormsg = _("E809: #< is not available without the +eval feature"); return NULL; #endif } --- 9051,9057 ---- return NULL; } #else ! *errormsg = _(e_hashsmall_is_not_available_without_the_eval_feature); return NULL; #endif } *************** *** 9147,9153 **** case SPEC_SLNUM: // line in file for ":so" command if (SOURCING_NAME == NULL || SOURCING_LNUM == 0) { ! *errormsg = _("E842: no line number to use for \"\""); return NULL; } sprintf((char *)strbuf, "%ld", SOURCING_LNUM); --- 9147,9153 ---- case SPEC_SLNUM: // line in file for ":so" command if (SOURCING_NAME == NULL || SOURCING_LNUM == 0) { ! *errormsg = _(e_no_line_number_to_use_for_slnum); return NULL; } sprintf((char *)strbuf, "%ld", SOURCING_LNUM); *** ../vim-8.2.4009/src/ex_getln.c 2022-01-05 16:08:59.520426444 +0000 --- src/ex_getln.c 2022-01-05 17:08:02.544557242 +0000 *************** *** 2679,2685 **** { if (allbuf_lock > 0) { ! emsg(_("E811: Not allowed to change buffer information now")); return TRUE; } return FALSE; --- 2679,2685 ---- { if (allbuf_lock > 0) { ! emsg(_(e_not_allowed_to_change_buffer_information_now)); return TRUE; } return FALSE; *** ../vim-8.2.4009/src/fileio.c 2022-01-02 20:20:41.377033186 +0000 --- src/fileio.c 2022-01-05 17:08:36.888496301 +0000 *************** *** 41,47 **** #endif static linenr_T readfile_linenr(linenr_T linecnt, char_u *p, char_u *endp); static char_u *check_for_bom(char_u *p, long size, int *lenp, int flags); - static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name"); #ifdef FEAT_EVAL static int readdirex_sort; --- 41,46 ---- *************** *** 527,533 **** || (using_b_fname && (old_b_fname != curbuf->b_fname))) { ! emsg(_(e_auchangedbuf)); return FAIL; } } --- 526,532 ---- || (using_b_fname && (old_b_fname != curbuf->b_fname))) { ! emsg(_(e_autocommands_changed_buffer_or_buffer_name)); return FAIL; } } *************** *** 605,611 **** || (using_b_ffname && (old_b_ffname != curbuf->b_ffname)) || (using_b_fname && (old_b_fname != curbuf->b_fname)))) { ! emsg(_(e_auchangedbuf)); if (!read_buffer) close(fd); return FAIL; --- 604,610 ---- || (using_b_ffname && (old_b_ffname != curbuf->b_ffname)) || (using_b_fname && (old_b_fname != curbuf->b_fname)))) { ! emsg(_(e_autocommands_changed_buffer_or_buffer_name)); if (!read_buffer) close(fd); return FAIL; *************** *** 3012,3018 **** if (curbuf != buf) { // We are in another buffer now, don't do the renaming. ! emsg(_(e_auchangedbuf)); return FAIL; } --- 3011,3017 ---- if (curbuf != buf) { // We are in another buffer now, don't do the renaming. ! emsg(_(e_autocommands_changed_buffer_or_buffer_name)); return FAIL; } *** ../vim-8.2.4009/src/findfile.c 2022-01-02 19:25:22.846078499 +0000 --- src/findfile.c 2022-01-05 17:29:11.225491352 +0000 *************** *** 206,213 **** static int ff_path_in_stoplist(char_u *, int, char_u **); #endif - static char_u e_pathtoolong[] = N_("E854: path too long for completion"); - static char_u *ff_expand_buffer = NULL; // used for expanding filenames #if 0 --- 206,211 ---- *************** *** 501,507 **** { if (len + 5 >= MAXPATHL) { ! emsg(_(e_pathtoolong)); break; } if (STRNCMP(wc_part, "**", 2) == 0) --- 499,505 ---- { if (len + 5 >= MAXPATHL) { ! emsg(_(e_path_too_long_for_completion)); break; } if (STRNCMP(wc_part, "**", 2) == 0) *************** *** 551,557 **** if (STRLEN(search_ctx->ffsc_start_dir) + STRLEN(search_ctx->ffsc_fix_path) + 3 >= MAXPATHL) { ! emsg(_(e_pathtoolong)); goto error_return; } STRCPY(ff_expand_buffer, search_ctx->ffsc_start_dir); --- 549,555 ---- if (STRLEN(search_ctx->ffsc_start_dir) + STRLEN(search_ctx->ffsc_fix_path) + 3 >= MAXPATHL) { ! emsg(_(e_path_too_long_for_completion)); goto error_return; } STRCPY(ff_expand_buffer, search_ctx->ffsc_start_dir); *** ../vim-8.2.4009/src/float.c 2021-08-08 14:43:30.105238234 +0100 --- src/float.c 2022-01-05 17:03:32.913020952 +0000 *************** *** 99,105 **** *f = (float_T)argvars[0].vval.v_number; return OK; } ! emsg(_("E808: Number or Float required")); return FAIL; } --- 99,105 ---- *f = (float_T)argvars[0].vval.v_number; return OK; } ! emsg(_(e_number_or_float_required)); return FAIL; } *** ../vim-8.2.4009/src/gui.c 2022-01-04 21:30:43.537800355 +0000 --- src/gui.c 2022-01-05 17:30:43.861570790 +0000 *************** *** 241,247 **** pid = fork(); if (pid < 0) // Fork error { ! emsg(_("E851: Failed to create a new process for the GUI")); return; } else if (pid > 0) // Parent --- 241,247 ---- pid = fork(); if (pid < 0) // Fork error { ! emsg(_(e_failed_to_create_new_process_for_GUI)); return; } else if (pid > 0) // Parent *************** *** 265,271 **** # else waitpid(pid, &exit_status, 0); # endif ! emsg(_("E852: The child process failed to start the GUI")); return; } else if (status == GUI_CHILD_IO_ERROR) --- 265,271 ---- # else waitpid(pid, &exit_status, 0); # endif ! emsg(_(e_the_child_process_failed_to_start_GUI)); return; } else if (status == GUI_CHILD_IO_ERROR) *** ../vim-8.2.4009/src/highlight.c 2022-01-04 21:30:43.537800355 +0000 --- src/highlight.c 2022-01-05 17:23:41.036878096 +0000 *************** *** 3466,3472 **** if (highlight_ga.ga_len >= MAX_HL_ID) { ! emsg(_("E849: Too many highlight and syntax groups")); vim_free(name); return 0; } --- 3466,3472 ---- if (highlight_ga.ga_len >= MAX_HL_ID) { ! emsg(_(e_too_many_highlight_and_syntax_groups)); vim_free(name); return 0; } *** ../vim-8.2.4009/src/if_mzsch.c 2022-01-01 14:19:44.044353848 +0000 --- src/if_mzsch.c 2022-01-05 17:09:41.664380417 +0000 *************** *** 1242,1248 **** #ifdef DYNAMIC_MZSCHEME if (disabled || !mzscheme_enabled(TRUE)) { ! emsg(_("E815: Sorry, this command is disabled, the MzScheme libraries could not be loaded.")); return -1; } #endif --- 1242,1248 ---- #ifdef DYNAMIC_MZSCHEME if (disabled || !mzscheme_enabled(TRUE)) { ! emsg(_(e_sorry_this_command_is_disabled_the_mzscheme_libraries_could_not_be_loaded)); return -1; } #endif *** ../vim-8.2.4009/src/if_py_both.h 2022-01-01 21:59:11.030521935 +0000 --- src/if_py_both.h 2022-01-05 17:32:41.025630817 +0000 *************** *** 5850,5862 **** { if (PyErr_Occurred() && !msg_silent) PyErr_PrintEx(0); ! emsg(_("E858: Eval did not return a valid python object")); } } else { if (ConvertFromPyObject(run_ret, rettv) == -1) ! emsg(_("E859: Failed to convert returned python object to a Vim value")); Py_DECREF(run_ret); } PyErr_Clear(); --- 5850,5862 ---- { if (PyErr_Occurred() && !msg_silent) PyErr_PrintEx(0); ! emsg(_(e_eval_did_not_return_valid_python_object)); } } else { if (ConvertFromPyObject(run_ret, rettv) == -1) ! emsg(_(e_failed_to_convert_returned_python_object_to_vim_value)); Py_DECREF(run_ret); } PyErr_Clear(); *** ../vim-8.2.4009/src/if_python.c 2022-01-04 21:30:43.541800349 +0000 --- src/if_python.c 2022-01-05 17:18:09.631443330 +0000 *************** *** 679,685 **** if (python3_loaded()) { if (verbose) ! emsg(_("E836: This Vim cannot execute :python after using :py3")); return FAIL; } # endif --- 679,685 ---- if (python3_loaded()) { if (verbose) ! emsg(_(e_this_vim_cannot_execute_python_after_using_py3)); return FAIL; } # endif *** ../vim-8.2.4009/src/if_python3.c 2022-01-01 21:59:11.030521935 +0000 --- src/if_python3.c 2022-01-05 17:18:45.683621402 +0000 *************** *** 771,777 **** if (python_loaded()) { if (verbose) ! emsg(_("E837: This Vim cannot execute :py3 after using :python")); return FAIL; } # endif --- 771,777 ---- if (python_loaded()) { if (verbose) ! emsg(_(e_this_vim_cannot_execute_py3_after_using_python)); return FAIL; } # endif *** ../vim-8.2.4009/src/insexpand.c 2022-01-05 16:08:59.520426444 +0000 --- src/insexpand.c 2022-01-05 17:24:22.000989902 +0000 *************** *** 124,132 **** # define CP_FAST 32 // use fast_breakcheck instead of ui_breakcheck static char e_hitend[] = N_("Hit end of paragraph"); - # ifdef FEAT_COMPL_FUNC - static char e_compldel[] = N_("E840: Completion function deleted text"); - # endif /* * All the current matches are stored in a list. --- 124,129 ---- *************** *** 2670,2676 **** validate_cursor(); if (!EQUAL_POS(curwin->w_cursor, pos)) { ! emsg(_(e_compldel)); goto theend; } --- 2667,2673 ---- validate_cursor(); if (!EQUAL_POS(curwin->w_cursor, pos)) { ! emsg(_(e_complete_function_deleted_text)); goto theend; } *************** *** 4506,4512 **** validate_cursor(); if (!EQUAL_POS(curwin->w_cursor, pos)) { ! emsg(_(e_compldel)); return FAIL; } --- 4503,4509 ---- validate_cursor(); if (!EQUAL_POS(curwin->w_cursor, pos)) { ! emsg(_(e_complete_function_deleted_text)); return FAIL; } *** ../vim-8.2.4009/src/match.c 2022-01-05 16:08:59.520426444 +0000 --- src/match.c 2022-01-05 17:47:09.633320624 +0000 *************** *** 55,61 **** { if (cur->id == id) { ! semsg(_("E801: ID already taken: %d"), id); return -1; } cur = cur->next; --- 55,61 ---- { if (cur->id == id) { ! semsg(_(e_id_already_taken_nr), id); return -1; } cur = cur->next; *************** *** 233,240 **** if (id < 1) { if (perr == TRUE) ! semsg(_("E802: Invalid ID: %d (must be greater than or equal to 1)"), ! id); return -1; } while (cur != NULL && cur->id != id) --- 233,239 ---- if (id < 1) { if (perr == TRUE) ! semsg(_(e_invalid_id_nr_must_be_greater_than_or_equal_to_one), id); return -1; } while (cur != NULL && cur->id != id) *************** *** 245,251 **** if (cur == NULL) { if (perr == TRUE) ! semsg(_("E803: ID not found: %d"), id); return -1; } if (cur == prev) --- 244,250 ---- if (cur == NULL) { if (perr == TRUE) ! semsg(_(e_id_not_found_nr), id); return -1; } if (cur == prev) *** ../vim-8.2.4009/src/memline.c 2022-01-05 16:08:59.520426444 +0000 --- src/memline.c 2022-01-05 17:24:57.225076580 +0000 *************** *** 621,627 **** mf_put(mfp, hp, FALSE, FALSE); // release previous block if (error > 0) ! emsg(_("E843: Error while updating swap file crypt")); } mfp->mf_old_key = NULL; --- 621,627 ---- mf_put(mfp, hp, FALSE, FALSE); // release previous block if (error > 0) ! emsg(_(e_error_while_updating_swap_file_crypt)); } mfp->mf_old_key = NULL; *************** *** 1342,1348 **** #else if (b0p->b0_id[1] != BLOCK0_ID1) { ! semsg(_("E833: %s is encrypted and this version of Vim does not support encryption"), mfp->mf_fname); goto theend; } #endif --- 1342,1348 ---- #else if (b0p->b0_id[1] != BLOCK0_ID1) { ! semsg(_(e_str_is_encrypted_and_this_version_of_vim_does_not_support_encryption), mfp->mf_fname); goto theend; } #endif *** ../vim-8.2.4009/src/option.c 2022-01-02 21:26:12.319264330 +0000 --- src/option.c 2022-01-05 17:25:20.057128398 +0000 *************** *** 1558,1564 **** p = find_termcode(key_name); if (p == NULL) { ! errmsg = N_("E846: Key code not set"); goto skip; } else --- 1558,1564 ---- p = find_termcode(key_name); if (p == NULL) { ! errmsg = N_(e_key_code_not_set); goto skip; } else *** ../vim-8.2.4009/src/popupwin.c 2022-01-02 20:20:41.381033185 +0000 --- src/popupwin.c 2022-01-05 17:35:15.657655524 +0000 *************** *** 1883,1889 **** #ifdef FEAT_TERMINAL if (buf->b_term != NULL && popup_terminal_exists()) { ! emsg(_("E861: Cannot open a second popup with a terminal")); return NULL; } #endif --- 1883,1889 ---- #ifdef FEAT_TERMINAL if (buf->b_term != NULL && popup_terminal_exists()) { ! emsg(_(e_cannot_open_second_popup_with_terminal)); return NULL; } #endif *************** *** 3162,3168 **** if (WIN_IS_POPUP(curwin) && curbuf->b_term != NULL && term_job_running(curbuf->b_term)) { ! emsg(_("E863: Not allowed for a terminal in a popup window")); return TRUE; } return FALSE; --- 3162,3168 ---- if (WIN_IS_POPUP(curwin) && curbuf->b_term != NULL && term_job_running(curbuf->b_term)) { ! emsg(_(e_not_allowed_for_terminal_in_popup_window)); return TRUE; } return FALSE; *** ../vim-8.2.4009/src/regexp.c 2022-01-05 16:08:59.524426437 +0000 --- src/regexp.c 2022-01-05 17:36:35.169649056 +0000 *************** *** 2638,2644 **** } else { ! emsg(_("E864: \\%#= can only be followed by 0, 1, or 2. The automatic engine will be used ")); regexp_engine = AUTOMATIC_ENGINE; } } --- 2638,2644 ---- } else { ! emsg(_(e_percent_hash_can_only_be_followed_by_zero_one_two_automatic_engine_will_be_used)); regexp_engine = AUTOMATIC_ENGINE; } } *** ../vim-8.2.4009/src/regexp_nfa.c 2022-01-05 16:08:59.524426437 +0000 --- src/regexp_nfa.c 2022-01-05 17:42:12.701520276 +0000 *************** *** 243,253 **** NFA_UPPER, NFA_NUPPER }; - static char_u e_nul_found[] = N_("E865: (NFA) Regexp end encountered prematurely"); - static char_u e_misplaced[] = N_("E866: (NFA regexp) Misplaced %c"); - static char_u e_ill_char_class[] = N_("E877: (NFA regexp) Invalid character class: %d"); - static char_u e_value_too_large[] = N_("E951: \\% value too large"); - // Variables only used in nfa_regcomp() and descendants. static int nfa_re_flags; // re_flags passed to nfa_regcomp() static int *post_start; // holds the postfix form of r.e. --- 243,248 ---- *************** *** 1377,1383 **** switch (c) { case NUL: ! EMSG_RET_FAIL(_(e_nul_found)); case Magic('^'): EMIT(NFA_BOL); --- 1372,1378 ---- switch (c) { case NUL: ! EMSG_RET_FAIL(_(e_nfa_regexp_end_encountered_prematurely)); case Magic('^'): EMIT(NFA_BOL); *************** *** 1401,1407 **** case Magic('_'): c = no_Magic(getchr()); if (c == NUL) ! EMSG_RET_FAIL(_(e_nul_found)); if (c == '^') // "\_^" is start-of-line { --- 1396,1402 ---- case Magic('_'): c = no_Magic(getchr()); if (c == NUL) ! EMSG_RET_FAIL(_(e_nfa_regexp_end_encountered_prematurely)); if (c == '^') // "\_^" is start-of-line { *************** *** 1461,1467 **** { if (extra == NFA_ADD_NL) { ! semsg(_(e_ill_char_class), c); rc_did_emsg = TRUE; return FAIL; } --- 1456,1462 ---- { if (extra == NFA_ADD_NL) { ! semsg(_(e_nfa_regexp_invalid_character_class_nr), c); rc_did_emsg = TRUE; return FAIL; } *************** *** 1506,1512 **** case Magic('|'): case Magic('&'): case Magic(')'): ! semsg(_(e_misplaced), no_Magic(c)); return FAIL; case Magic('='): --- 1501,1507 ---- case Magic('|'): case Magic('&'): case Magic(')'): ! semsg(_(e_nfa_regexp_misplaced_chr), no_Magic(c)); return FAIL; case Magic('='): *************** *** 1516,1522 **** case Magic('*'): case Magic('{'): // these should follow an atom, not form an atom ! semsg(_(e_misplaced), no_Magic(c)); return FAIL; case Magic('~'): --- 1511,1517 ---- case Magic('*'): case Magic('{'): // these should follow an atom, not form an atom ! semsg(_(e_nfa_regexp_misplaced_chr), no_Magic(c)); return FAIL; case Magic('~'): *************** *** 1602,1609 **** break; #endif default: ! semsg(_("E867: (NFA) Unknown operator '\\z%c'"), ! no_Magic(c)); return FAIL; } break; --- 1597,1603 ---- break; #endif default: ! semsg(_(e_nfa_unknown_operator_z_chr), no_Magic(c)); return FAIL; } break; *************** *** 1725,1731 **** if (tmp < n) { // overflow. ! emsg(_(e_value_too_large)); return FAIL; } n = tmp; --- 1719,1725 ---- if (tmp < n) { // overflow. ! emsg(_(e_percent_value_too_large)); return FAIL; } n = tmp; *************** *** 1773,1779 **** } if (n >= limit) { ! emsg(_(e_value_too_large)); return FAIL; } EMIT((int)n); --- 1767,1773 ---- } if (n >= limit) { ! emsg(_(e_percent_value_too_large)); return FAIL; } EMIT((int)n); *************** *** 1788,1795 **** break; } } ! semsg(_("E867: (NFA) Unknown operator '\\%%%c'"), ! no_Magic(c)); return FAIL; } break; --- 1782,1788 ---- break; } } ! semsg(_(e_nfa_unknown_operator_percent_chr), no_Magic(c)); return FAIL; } break; *************** *** 1947,1953 **** if (result == FAIL) { // should never happen ! EMSG_RET_FAIL(_("E868: Error building NFA with equivalence class!")); } continue; } --- 1940,1946 ---- if (result == FAIL) { // should never happen ! EMSG_RET_FAIL(_(e_error_building_nfa_with_equivalence_class)); } continue; } *************** *** 2273,2279 **** } if (i == 0) { ! semsg(_("E869: (NFA) Unknown operator '\\@%c'"), op); return FAIL; } EMIT(i); --- 2266,2272 ---- } if (i == 0) { ! semsg(_(e_nfa_unknown_operator_at_chr), op); return FAIL; } EMIT(i); *************** *** 5125,5131 **** default: // should not be here :P ! siemsg(_(e_ill_char_class), class); return FAIL; } return FAIL; --- 5118,5124 ---- default: // should not be here :P ! siemsg(_(e_nfa_regexp_invalid_character_class_nr), class); return FAIL; } return FAIL; *** ../vim-8.2.4009/src/spellfile.c 2022-01-05 16:08:59.524426437 +0000 --- src/spellfile.c 2022-01-05 17:26:08.029226794 +0000 *************** *** 4307,4313 **** { if (!spin->si_did_emsg) { ! emsg(_("E845: Insufficient memory, word list will be incomplete")); spin->si_did_emsg = TRUE; } return NULL; --- 4307,4313 ---- { if (!spin->si_did_emsg) { ! emsg(_(e_insufficient_memory_word_list_will_be_incomplete)); spin->si_did_emsg = TRUE; } return NULL; *** ../vim-8.2.4009/src/strings.c 2022-01-05 16:08:59.524426437 +0000 --- src/strings.c 2022-01-05 17:05:35.868813122 +0000 *************** *** 1934,1940 **** else if (tvs[idx].v_type == VAR_NUMBER) f = (double)tvs[idx].vval.v_number; else ! emsg(_("E807: Expected Float argument for printf()")); } return f; } --- 1934,1940 ---- else if (tvs[idx].v_type == VAR_NUMBER) f = (double)tvs[idx].vval.v_number; else ! emsg(_(e_expected_float_argument_for_printf)); } return f; } *** ../vim-8.2.4009/src/syntax.c 2022-01-05 16:08:59.528426430 +0000 --- src/syntax.c 2022-01-05 17:27:24.737357286 +0000 *************** *** 4635,4641 **** #ifdef FEAT_CONCEAL if (!vim_isprintc_strict(*conceal_char)) { ! emsg(_("E844: invalid cchar value")); return NULL; } #endif --- 4635,4641 ---- #ifdef FEAT_CONCEAL if (!vim_isprintc_strict(*conceal_char)) { ! emsg(_(e_invalid_cchar_value)); return NULL; } #endif *************** *** 4785,4791 **** */ if (running_syn_inc_tag >= MAX_SYN_INC_TAG) { ! emsg(_("E847: Too many syntax includes")); return; } prev_syn_inc_tag = current_syn_inc_tag; --- 4785,4791 ---- */ if (running_syn_inc_tag >= MAX_SYN_INC_TAG) { ! emsg(_(e_too_many_syntax_includes)); return; } prev_syn_inc_tag = current_syn_inc_tag; *************** *** 5522,5528 **** len = curwin->w_s->b_syn_clusters.ga_len; if (len >= MAX_CLUSTER_ID) { ! emsg(_("E848: Too many syntax clusters")); vim_free(name); return 0; } --- 5522,5528 ---- len = curwin->w_s->b_syn_clusters.ga_len; if (len >= MAX_CLUSTER_ID) { ! emsg(_(e_too_many_syntax_clusters)); vim_free(name); return 0; } *** ../vim-8.2.4009/src/textprop.c 2022-01-01 21:59:11.038521915 +0000 --- src/textprop.c 2022-01-05 17:43:02.433491128 +0000 *************** *** 801,807 **** } if (both && (!id_found || type_id == -1)) { ! emsg(_("E860: Need 'id' and 'type' with 'both'")); return; } --- 801,807 ---- } if (both && (!id_found || type_id == -1)) { ! emsg(_(e_need_id_and_type_with_both)); return; } *************** *** 1224,1230 **** } if (both && (id == -1 || type_id == -1)) { ! emsg(_("E860: Need 'id' and 'type' with 'both'")); return; } --- 1224,1230 ---- } if (both && (id == -1 || type_id == -1)) { ! emsg(_(e_need_id_and_type_with_both)); return; } *** ../vim-8.2.4009/src/typval.c 2022-01-05 16:08:59.528426430 +0000 --- src/typval.c 2022-01-05 17:06:23.592730715 +0000 *************** *** 191,197 **** return varp->vval.v_number; case VAR_FLOAT: #ifdef FEAT_FLOAT ! emsg(_("E805: Using a Float as a Number")); break; #endif case VAR_FUNC: --- 191,197 ---- return varp->vval.v_number; case VAR_FLOAT: #ifdef FEAT_FLOAT ! emsg(_(e_using_float_as_number)); break; #endif case VAR_FUNC: *** ../vim-8.2.4009/src/undo.c 2022-01-05 16:08:59.528426430 +0000 --- src/undo.c 2022-01-05 17:21:22.960400890 +0000 *************** *** 784,791 **** // extra fields for uhp # define UHP_SAVE_NR 1 - static char_u e_not_open[] = N_("E828: Cannot open undo file for writing: %s"); - /* * Compute the hash for the current buffer text into hash[UNDO_HASH_SIZE]. */ --- 784,789 ---- *************** *** 898,904 **** static void corruption_error(char *mesg, char_u *file_name) { ! semsg(_("E825: Corrupted undo file (%s): %s"), mesg, file_name); } static void --- 896,902 ---- static void corruption_error(char *mesg, char_u *file_name) { ! semsg(_(e_corrupted_undo_file_str_str), mesg, file_name); } static void *************** *** 1680,1686 **** O_CREAT|O_EXTRA|O_WRONLY|O_EXCL|O_NOFOLLOW, perm); if (fd < 0) { ! semsg(_(e_not_open), file_name); goto theend; } (void)mch_setperm(file_name, perm); --- 1678,1684 ---- O_CREAT|O_EXTRA|O_WRONLY|O_EXCL|O_NOFOLLOW, perm); if (fd < 0) { ! semsg(_(e_cannot_open_undo_file_for_writing_str), file_name); goto theend; } (void)mch_setperm(file_name, perm); *************** *** 1719,1725 **** fp = fdopen(fd, "w"); if (fp == NULL) { ! semsg(_(e_not_open), file_name); close(fd); mch_remove(file_name); goto theend; --- 1717,1723 ---- fp = fdopen(fd, "w"); if (fp == NULL) { ! semsg(_(e_cannot_open_undo_file_for_writing_str), file_name); close(fd); mch_remove(file_name); goto theend; *************** *** 1792,1798 **** write_error: fclose(fp); if (!write_ok) ! semsg(_("E829: write error in undo file: %s"), file_name); #if defined(MSWIN) // Copy file attributes; for systems where this can only be done after --- 1790,1796 ---- write_error: fclose(fp); if (!write_ok) ! semsg(_(e_write_error_in_undo_file_str), file_name); #if defined(MSWIN) // Copy file attributes; for systems where this can only be done after *************** *** 1904,1910 **** if (fp == NULL) { if (name != NULL || p_verbose > 0) ! semsg(_("E822: Cannot open undo file for reading: %s"), file_name); goto error; } bi.bi_buf = curbuf; --- 1902,1908 ---- if (fp == NULL) { if (name != NULL || p_verbose > 0) ! semsg(_(e_cannot_open_undo_file_for_reading_str), file_name); goto error; } bi.bi_buf = curbuf; *************** *** 1916,1922 **** if (fread(magic_buf, UF_START_MAGIC_LEN, 1, fp) != 1 || memcmp(magic_buf, UF_START_MAGIC, UF_START_MAGIC_LEN) != 0) { ! semsg(_("E823: Not an undo file: %s"), file_name); goto error; } version = get2c(fp); --- 1914,1920 ---- if (fread(magic_buf, UF_START_MAGIC_LEN, 1, fp) != 1 || memcmp(magic_buf, UF_START_MAGIC, UF_START_MAGIC_LEN) != 0) { ! semsg(_(e_not_an_undo_file_str), file_name); goto error; } version = get2c(fp); *************** *** 1925,1938 **** #ifdef FEAT_CRYPT if (*curbuf->b_p_key == NUL) { ! semsg(_("E832: Non-encrypted file has encrypted undo file: %s"), ! file_name); goto error; } bi.bi_state = crypt_create_from_file(fp, curbuf->b_p_key); if (bi.bi_state == NULL) { ! semsg(_("E826: Undo file decryption failed: %s"), file_name); goto error; } if (crypt_whole_undofile(bi.bi_state->method_nr)) --- 1923,1935 ---- #ifdef FEAT_CRYPT if (*curbuf->b_p_key == NUL) { ! semsg(_(e_non_encrypted_file_has_encrypted_undo_file), file_name); goto error; } bi.bi_state = crypt_create_from_file(fp, curbuf->b_p_key); if (bi.bi_state == NULL) { ! semsg(_(e_undo_file_decryption_failed), file_name); goto error; } if (crypt_whole_undofile(bi.bi_state->method_nr)) *************** *** 1948,1960 **** bi.bi_used = 0; } #else ! semsg(_("E827: Undo file is encrypted: %s"), file_name); goto error; #endif } else if (version != UF_VERSION) { ! semsg(_("E824: Incompatible undo file: %s"), file_name); goto error; } --- 1945,1957 ---- bi.bi_used = 0; } #else ! semsg(_(e_undo_file_is_encrypted_str), file_name); goto error; #endif } else if (version != UF_VERSION) { ! semsg(_(e_incompatible_undo_file_str), file_name); goto error; } *************** *** 2522,2528 **** if (absolute) { ! semsg(_("E830: Undo number %ld not found"), step); return; } --- 2519,2525 ---- if (absolute) { ! semsg(_(e_undo_number_nr_not_found), step); return; } *** ../vim-8.2.4009/src/usercmd.c 2022-01-02 20:20:41.381033185 +0000 --- src/usercmd.c 2022-01-05 17:28:02.109410106 +0000 *************** *** 1101,1107 **** else if ((name_len == 1 && *name == 'X') || (name_len <= 4 && STRNCMP(name, "Next", name_len > 4 ? 4 : name_len) == 0)) ! emsg(_("E841: Reserved name, cannot be used for user defined command")); else if (compl > 0 && (argt & EX_EXTRA) == 0) { // Some plugins rely on silently ignoring the mistake, only make this --- 1101,1107 ---- else if ((name_len == 1 && *name == 'X') || (name_len <= 4 && STRNCMP(name, "Next", name_len > 4 ? 4 : name_len) == 0)) ! emsg(_(e_reserved_name_cannot_be_used_for_user_defined_command)); else if (compl > 0 && (argt & EX_EXTRA) == 0) { // Some plugins rely on silently ignoring the mistake, only make this *** ../vim-8.2.4009/src/userfunc.c 2022-01-05 16:08:59.528426430 +0000 --- src/userfunc.c 2022-01-05 17:43:23.889477944 +0000 *************** *** 109,115 **** for (i = 0; i < newargs->ga_len; ++i) if (STRCMP(((char_u **)(newargs->ga_data))[i], arg_copy) == 0) { ! semsg(_("E853: Duplicate argument name: %s"), arg_copy); vim_free(arg_copy); return arg; } --- 109,115 ---- for (i = 0; i < newargs->ga_len; ++i) if (STRCMP(((char_u **)(newargs->ga_data))[i], arg_copy) == 0) { ! semsg(_(e_duplicate_argument_name_str), arg_copy); vim_free(arg_copy); return arg; } *************** *** 4268,4274 **** // Disallow using the g: dict. if (fudi.fd_dict != NULL && fudi.fd_dict->dv_scope == VAR_DEF_SCOPE) { ! emsg(_("E862: Cannot use g: here")); goto ret_free; } } --- 4268,4274 ---- // Disallow using the g: dict. if (fudi.fd_dict != NULL && fudi.fd_dict->dv_scope == VAR_DEF_SCOPE) { ! emsg(_(e_cannot_use_g_here)); goto ret_free; } } *** ../vim-8.2.4009/src/window.c 2022-01-02 19:25:22.854078479 +0000 --- src/window.c 2022-01-05 17:10:26.984298702 +0000 *************** *** 2501,2507 **** } if ((firstwin == aucmd_win || lastwin == aucmd_win) && one_window()) { ! emsg(_("E814: Cannot close window, only autocmd window would remain")); return FAIL; } --- 2501,2507 ---- } if ((firstwin == aucmd_win || lastwin == aucmd_win) && one_window()) { ! emsg(_(e_cannot_close_window_only_autocmd_window_would_remain)); return FAIL; } *** ../vim-8.2.4009/src/version.c 2022-01-05 16:50:36.534031580 +0000 --- src/version.c 2022-01-05 17:48:25.169261882 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4010, /**/ -- hundred-and-one symptoms of being an internet addict: 231. You sprinkle Carpet Fresh on the rugs and put your vacuum cleaner in the front doorway permanently so it always looks like you are actually attempting to do something about that mess that has amassed since you discovered the Internet. /// 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 ///