To: vim_dev@googlegroups.com Subject: Patch 8.2.4008 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4008 Problem: Error messages are spread out. Solution: Move more error messages to errors.h. Files: src/errors.h, src/diff.c, src/digraph.c, src/evalfunc.c, src/evalvars.c, src/ex_cmds.c, src/ex_docmd.c, src/ex_getln.c, src/insexpand.c, src/match.c, src/memline.c, src/menu.c, src/ops.c, src/profiler.c, src/quickfix.c, src/regexp.c, src/regexp_bt.c, src/regexp_nfa.c, src/register.c, src/spell.c, src/spell.h, src/spellfile.c, src/strings.c, src/syntax.c, src/typval.c, src/undo.c, src/userfunc.c *** ../vim-8.2.4007/src/errors.h 2022-01-04 21:30:43.533800364 +0000 --- src/errors.h 2022-01-05 15:58:35.045636984 +0000 *************** *** 1719,1743 **** INIT(= N_("E742: Cannot change value")); EXTERN char e_cannot_change_value_of_str[] INIT(= N_("E742: Cannot change value of %s")); #endif #ifdef FEAT_NETBEANS_INTG EXTERN char e_netbeans_does_not_allow_changes_in_read_only_files[] INIT(= N_("E744: NetBeans does not allow changes in read-only files")); #endif EXTERN char e_empty_buffer[] INIT(= N_("E749: empty buffer")); #ifdef FEAT_SPELL EXTERN char e_spell_checking_is_not_possible[] INIT(= N_("E756: Spell checking is not possible")); ! #endif #if defined(FEAT_SYN_HL) || defined(FEAT_COMPL_FUNC) EXTERN char e_option_str_is_not_set[] INIT(= N_("E764: Option '%s' is not set")); #endif #ifdef FEAT_QUICKFIX EXTERN char e_no_location_list[] INIT(= N_("E776: No location list")); #endif #ifdef FEAT_EVAL EXTERN char e_cannot_set_variable_in_sandbox[] INIT(= N_("E794: Cannot set variable in the sandbox")); --- 1719,1847 ---- INIT(= N_("E742: Cannot change value")); EXTERN char e_cannot_change_value_of_str[] INIT(= N_("E742: Cannot change value of %s")); + EXTERN char e_variable_nested_too_deep_for_unlock[] + INIT(= N_("E743: variable nested too deep for (un)lock")); #endif #ifdef FEAT_NETBEANS_INTG EXTERN char e_netbeans_does_not_allow_changes_in_read_only_files[] INIT(= N_("E744: NetBeans does not allow changes in read-only files")); #endif + #ifdef FEAT_EVAL + EXTERN char e_using_list_as_number[] + INIT(= N_("E745: Using a List as a Number")); + EXTERN char e_function_name_does_not_match_script_file_name_str[] + INIT(= N_("E746: Function name does not match script file name: %s")); + #endif + EXTERN char e_cannot_change_directory_buffer_is_modified_add_bang_to_override[] + INIT(= N_("E747: Cannot change directory, buffer is modified (add ! to override)")); + EXTERN char e_no_previously_used_register[] + INIT(= N_("E748: No previously used register")); EXTERN char e_empty_buffer[] INIT(= N_("E749: empty buffer")); + #ifdef FEAT_PROFILE + EXTERN char e_first_use_profile_start_fname[] + INIT(= N_("E750: First use \":profile start {fname}\"")); + #endif #ifdef FEAT_SPELL + EXTERN char e_output_file_name_must_not_have_region_name[] + INIT(= N_("E751: Output file name must not have region name")); + EXTERN char e_no_previous_spell_replacement[] + INIT(= N_("E752: No previous spell replacement")); + EXTERN char e_not_found_str[] + INIT(= N_("E753: Not found: %s")); + EXTERN char e_only_up_to_nr_regions_supported[] + INIT(= N_("E754: Only up to %d regions supported")); + EXTERN char e_invalid_region_in_str[] + INIT(= N_("E755: Invalid region in %s")); EXTERN char e_spell_checking_is_not_possible[] INIT(= N_("E756: Spell checking is not possible")); ! EXTERN char e_this_does_not_look_like_spell_file[] ! INIT(= N_("E757: This does not look like a spell file")); ! EXTERN char e_truncated_spell_file[] ! INIT(= N_("E758: Truncated spell file")); ! EXTERN char e_format_error_in_spell_file[] ! INIT(= N_("E759: Format error in spell file")); ! EXTERN char e_no_word_count_in_str[] ! INIT(= N_("E760: No word count in %s")); ! EXTERN char e_format_error_in_affix_file_fol_low_or_upp[] ! INIT(= N_("E761: Format error in affix file FOL, LOW or UPP")); ! EXTERN char e_character_in_fol_low_or_upp_is_out_of_range[] ! INIT(= N_("E762: Character in FOL, LOW or UPP is out of range")); ! EXTERN char e_word_characters_differ_between_spell_files[] ! INIT(= N_("E763: Word characters differ between spell files")); #if defined(FEAT_SYN_HL) || defined(FEAT_COMPL_FUNC) EXTERN char e_option_str_is_not_set[] INIT(= N_("E764: Option '%s' is not set")); #endif + EXTERN char e_spellfile_does_not_have_nr_entries[] + INIT(= N_("E765: 'spellfile' does not have %d entries")); + #endif + EXTERN char e_insufficient_arguments_for_printf[] + INIT(= N_("E766: Insufficient arguments for printf()")); + EXTERN char e_too_many_arguments_to_printf[] + INIT(= N_("E767: Too many arguments for printf()")); + EXTERN char e_swap_file_exists_str_silent_overrides[] + INIT(= N_("E768: Swap file exists: %s (:silent! overrides)")); + EXTERN char e_missing_rsb_after_str_lsb[] + INIT(= N_("E769: Missing ] after %s[")); + #ifdef FEAT_SPELL + EXTERN char e_unsupported_section_in_spell_file[] + INIT(= N_("E770: Unsupported section in spell file")); + EXTERN char e_old_spell_file_needs_to_be_updated[] + INIT(= N_("E771: Old spell file, needs to be updated")); + EXTERN char e_spell_file_is_for_newer_version_of_vim[] + INIT(= N_("E772: Spell file is for newer version of Vim")); + #endif + EXTERN char e_symlink_loop_for_str[] + INIT(= N_("E773: Symlink loop for \"%s\"")); + EXTERN char e_operatorfunc_is_empty[] + INIT(= N_("E774: 'operatorfunc' is empty")); + #ifndef FEAT_EVAL + EXTERN char e_eval_feature_not_available[] + INIT(= N_("E775: Eval feature not available")); + #endif #ifdef FEAT_QUICKFIX EXTERN char e_no_location_list[] INIT(= N_("E776: No location list")); #endif + EXTERN char e_string_or_list_expected[] + INIT(= N_("E777: String or List expected")); + #ifdef FEAT_SPELL + EXTERN char e_this_does_not_look_like_sug_file_str[] + INIT(= N_("E778: This does not look like a .sug file: %s")); + EXTERN char e_old_sug_file_needs_to_be_updated_str[] + INIT(= N_("E779: Old .sug file, needs to be updated: %s")); + EXTERN char e_sug_file_is_for_newer_version_of_vim_str[] + INIT(= N_("E780: .sug file is for newer version of Vim: %s")); + EXTERN char e_sug_file_doesnt_match_spl_file_str[] + INIT(= N_("E781: .sug file doesn't match .spl file: %s")); + EXTERN char e_error_while_reading_sug_file_str[] + INIT(= N_("E782: error while reading .sug file: %s")); + EXTERN char e_duplicate_char_in_map_entry[] + INIT(= N_("E783: duplicate char in MAP entry")); + #endif + EXTERN char e_cannot_close_last_tab_page[] + INIT(= N_("E784: Cannot close last tab page")); + EXTERN char e_complete_can_only_be_used_in_insert_mode[] + INIT(= N_("E785: complete() can only be used in Insert mode")); + EXTERN char e_range_not_allowed[] + INIT(= N_("E786: Range not allowed")); + EXTERN char e_buffer_changed_unexpectedly[] + INIT(= N_("E787: Buffer changed unexpectedly")); + EXTERN char e_not_allowed_to_edit_another_buffer_now[] + INIT(= N_("E788: Not allowed to edit another buffer now")); + EXTERN char e_error_missing_rsb_str[] + INIT(= N_("E789: Missing ']': %s")); + EXTERN char e_undojoin_is_not_allowed_after_undo[] + INIT(= N_("E790: undojoin is not allowed after undo")); + EXTERN char e_empty_keymap_entry[] + INIT(= N_("E791: Empty keymap entry")); + EXTERN char e_empty_menu_name[] + INIT(= N_("E792: Empty menu name")); + #ifdef FEAT_DIFF + EXTERN char e_no_other_buffer_in_diff_mode_is_modifiable[] + INIT(= N_("E793: No other buffer in diff mode is modifiable")); + #endif #ifdef FEAT_EVAL EXTERN char e_cannot_set_variable_in_sandbox[] INIT(= N_("E794: Cannot set variable in the sandbox")); *************** *** 1745,1765 **** INIT(= N_("E794: Cannot set variable in the sandbox: \"%s\"")); EXTERN char e_cannot_delete_variable[] INIT(= N_("E795: Cannot delete variable")); // E796 EXTERN char e_writing_to_device_disabled_with_opendevice_option[] INIT(= N_("writing to device disabled with 'opendevice' option")); - EXTERN char e_cannot_delete_variable_str[] - INIT(= N_("E795: Cannot delete variable %s")); #endif ! #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")); --- 1849,1878 ---- INIT(= N_("E794: Cannot set variable in the sandbox: \"%s\"")); EXTERN char e_cannot_delete_variable[] INIT(= N_("E795: Cannot delete variable")); + EXTERN char e_cannot_delete_variable_str[] + INIT(= N_("E795: Cannot delete variable %s")); // E796 EXTERN char e_writing_to_device_disabled_with_opendevice_option[] INIT(= N_("writing to device disabled with 'opendevice' option")); #endif ! #ifdef FEAT_SPELL ! EXTERN char e_spellfilemising_autocommand_deleted_buffer[] ! INIT(= N_("E797: SpellFileMissing autocommand deleted buffer")); ! #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")); *************** *** 1838,1843 **** --- 1951,1961 ---- EXTERN char e_cannot_lock_or_unlock_variable_str[] INIT(= N_("E940: Cannot lock or unlock variable %s")); #endif + EXTERN char e_reverse_range_in_character_class[] + INIT(= N_("E944: Reverse range in character class")); + EXTERN char e_range_too_large_in_character_class[] + INIT(= N_("E945: Range too large in character class")); + #ifdef FEAT_TERMINAL EXTERN char e_job_still_running[] INIT(= N_("E948: Job still running")); *************** *** 1848,1853 **** --- 1966,1973 ---- INIT(= N_("E949: File changed while writing")); EXTERN char e_autocommand_caused_recursive_behavior[] INIT(= N_("E952: Autocommand caused recursive behavior")); + EXTERN char e_cannot_use_pattern_recursively[] + INIT(= N_("E956: Cannot use pattern recursively")); EXTERN char e_invalid_window_number[] INIT(= N_("E957: Invalid window number")); EXTERN char_u e_invalid_column_number_nr[] *** ../vim-8.2.4007/src/diff.c 2022-01-01 14:19:44.032353878 +0000 --- src/diff.c 2022-01-05 15:49:25.218810134 +0000 *************** *** 2682,2688 **** if (idx_other == DB_COUNT) { if (found_not_ma) ! emsg(_("E793: No other buffer in diff mode is modifiable")); else emsg(_(e_no_other_buffer_in_diff_mode)); return; --- 2682,2688 ---- if (idx_other == DB_COUNT) { if (found_not_ma) ! emsg(_(e_no_other_buffer_in_diff_mode_is_modifiable)); else emsg(_(e_no_other_buffer_in_diff_mode)); return; *************** *** 2769,2775 **** change_warning(0); if (diff_buf_idx(curbuf) != idx_to) { ! emsg(_("E787: Buffer changed unexpectedly")); goto theend; } } --- 2769,2775 ---- change_warning(0); if (diff_buf_idx(curbuf) != idx_to) { ! emsg(_(e_buffer_changed_unexpectedly)); goto theend; } } *** ../vim-8.2.4007/src/digraph.c 2022-01-02 21:26:12.315264334 +0000 --- src/digraph.c 2022-01-05 15:50:13.534699150 +0000 *************** *** 2661,2667 **** || *kp->from == NUL || *kp->to == NUL) { if (kp->to != NULL && *kp->to == NUL) ! emsg(_("E791: Empty keymap entry")); vim_free(kp->from); vim_free(kp->to); } --- 2661,2667 ---- || *kp->from == NUL || *kp->to == NUL) { if (kp->to != NULL && *kp->to == NUL) ! emsg(_(e_empty_keymap_entry)); vim_free(kp->from); vim_free(kp->to); } *** ../vim-8.2.4007/src/evalfunc.c 2022-01-04 21:30:43.533800364 +0000 --- src/evalfunc.c 2022-01-05 15:45:29.875384995 +0000 *************** *** 6715,6721 **** } } else if (lv.ll_range) ! emsg(_("E786: Range not allowed")); else if (lv.ll_newkey != NULL) semsg(_(e_key_not_present_in_dictionary), lv.ll_newkey); else if (lv.ll_list != NULL) --- 6715,6721 ---- } } else if (lv.ll_range) ! emsg(_(e_range_not_allowed)); else if (lv.ll_newkey != NULL) semsg(_(e_key_not_present_in_dictionary), lv.ll_newkey); else if (lv.ll_list != NULL) *** ../vim-8.2.4007/src/evalvars.c 2022-01-04 21:30:43.533800364 +0000 --- src/evalvars.c 2022-01-05 14:36:45.287781614 +0000 *************** *** 1968,1974 **** if (recurse >= DICT_MAXNEST) { ! emsg(_("E743: variable nested too deep for (un)lock")); return; } if (deep == 0) --- 1968,1974 ---- if (recurse >= DICT_MAXNEST) { ! emsg(_(e_variable_nested_too_deep_for_unlock)); return; } if (deep == 0) *** ../vim-8.2.4007/src/ex_cmds.c 2022-01-02 20:20:41.373033185 +0000 --- src/ex_cmds.c 2022-01-05 15:14:00.091014605 +0000 *************** *** 2194,2201 **** else #endif { ! semsg(_("E768: Swap file exists: %s (:silent! overrides)"), ! swapname); vim_free(swapname); return FAIL; } --- 2194,2200 ---- else #endif { ! semsg(_(e_swap_file_exists_str_silent_overrides), swapname); vim_free(swapname); return FAIL; } *** ../vim-8.2.4007/src/ex_docmd.c 2022-01-04 21:30:43.537800355 +0000 --- src/ex_docmd.c 2022-01-05 15:46:01.807303090 +0000 *************** *** 6023,6029 **** else # endif if (first_tabpage->tp_next == NULL) ! emsg(_("E784: Cannot close last tab page")); else { tab_number = get_tabpage_arg(eap); --- 6023,6029 ---- else # endif if (first_tabpage->tp_next == NULL) ! emsg(_(e_cannot_close_last_tab_page)); else { tab_number = get_tabpage_arg(eap); *************** *** 7366,7372 **** if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged() && !forceit) { ! emsg(_("E747: Cannot change directory, buffer is modified (add ! to override)")); return FALSE; } --- 7366,7372 ---- if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged() && !forceit) { ! emsg(_(e_cannot_change_directory_buffer_is_modified_add_bang_to_override)); return FALSE; } *** ../vim-8.2.4007/src/ex_getln.c 2022-01-01 15:58:19.114486366 +0000 --- src/ex_getln.c 2022-01-05 15:46:33.459223300 +0000 *************** *** 2664,2670 **** { if (curbuf_lock > 0) { ! emsg(_("E788: Not allowed to edit another buffer now")); return TRUE; } return allbuf_locked(); --- 2664,2670 ---- { if (curbuf_lock > 0) { ! emsg(_(e_not_allowed_to_edit_another_buffer_now)); return TRUE; } return allbuf_locked(); *** ../vim-8.2.4007/src/insexpand.c 2022-01-04 17:01:40.598663106 +0000 --- src/insexpand.c 2022-01-05 15:47:10.707130986 +0000 *************** *** 2864,2870 **** if ((State & INSERT) == 0) { ! emsg(_("E785: complete() can only be used in Insert mode")); return; } --- 2864,2870 ---- if ((State & INSERT) == 0) { ! emsg(_(e_complete_can_only_be_used_in_insert_mode)); return; } *** ../vim-8.2.4007/src/match.c 2022-01-01 21:59:11.034521924 +0000 --- src/match.c 2022-01-05 15:54:00.598202020 +0000 *************** *** 45,52 **** return -1; if (id < -1 || id == 0) { ! semsg(_("E799: Invalid ID: %d (must be greater than or equal to 1)"), ! id); return -1; } if (id != -1) --- 45,51 ---- return -1; if (id < -1 || id == 0) { ! semsg(_(e_invalid_id_nr_must_be_greater_than_or_equal_to_one), id); return -1; } if (id != -1) *************** *** 1216,1222 **** return; if (id >= 1 && id <= 3) { ! semsg(_("E798: ID is reserved for \":match\": %d"), id); return; } --- 1215,1221 ---- return; if (id >= 1 && id <= 3) { ! semsg(_(e_id_is_reserved_for_match_nr), id); return; } *************** *** 1284,1290 **** // id == 3 is ok because matchaddpos() is supposed to substitute :3match if (id == 1 || id == 2) { ! semsg(_("E798: ID is reserved for \":match\": %d"), id); return; } --- 1283,1289 ---- // id == 3 is ok because matchaddpos() is supposed to substitute :3match if (id == 1 || id == 2) { ! semsg(_(e_id_is_reserved_for_match_nr), id); return; } *** ../vim-8.2.4007/src/memline.c 2022-01-02 17:00:37.002093302 +0000 --- src/memline.c 2022-01-05 15:23:43.646257135 +0000 *************** *** 4415,4421 **** // Limit symlink depth to 100, catch recursive loops. if (++depth == 100) { ! semsg(_("E773: Symlink loop for \"%s\""), fname); return FAIL; } --- 4415,4421 ---- // Limit symlink depth to 100, catch recursive loops. if (++depth == 100) { ! semsg(_(e_symlink_loop_for_str), fname); return FAIL; } *** ../vim-8.2.4007/src/menu.c 2022-01-04 19:57:50.930919989 +0000 --- src/menu.c 2022-01-05 15:54:29.678140736 +0000 *************** *** 512,518 **** if (*dname == NUL) { // Only a mnemonic or accelerator is not valid. ! emsg(_("E792: Empty menu name")); goto erret; } --- 512,518 ---- if (*dname == NUL) { // Only a mnemonic or accelerator is not valid. ! emsg(_(e_empty_menu_name)); goto erret; } *** ../vim-8.2.4007/src/ops.c 2022-01-02 13:05:41.992274960 +0000 --- src/ops.c 2022-01-05 15:25:02.434150226 +0000 *************** *** 3381,3387 **** typval_T rettv; if (*p_opfunc == NUL) ! emsg(_("E774: 'operatorfunc' is empty")); else { // Set '[ and '] marks to text to be operated on. --- 3381,3387 ---- typval_T rettv; if (*p_opfunc == NUL) ! emsg(_(e_operatorfunc_is_empty)); else { // Set '[ and '] marks to text to be operated on. *************** *** 3419,3425 **** } } #else ! emsg(_("E775: Eval feature not available")); #endif } --- 3419,3425 ---- } } #else ! emsg(_(e_eval_feature_not_available)); #endif } *** ../vim-8.2.4007/src/profiler.c 2022-01-01 14:19:44.052353829 +0000 --- src/profiler.c 2022-01-05 14:40:52.602687857 +0000 *************** *** 320,326 **** set_vim_var_nr(VV_PROFILING, 1L); } else if (do_profiling == PROF_NONE) ! emsg(_("E750: First use \":profile start {fname}\"")); else if (STRCMP(eap->arg, "pause") == 0) { if (do_profiling == PROF_YES) --- 320,326 ---- set_vim_var_nr(VV_PROFILING, 1L); } else if (do_profiling == PROF_NONE) ! emsg(_(e_first_use_profile_start_fname)); else if (STRCMP(eap->arg, "pause") == 0) { if (do_profiling == PROF_YES) *** ../vim-8.2.4007/src/quickfix.c 2022-01-04 21:30:43.541800349 +0000 --- src/quickfix.c 2022-01-05 15:25:31.146111089 +0000 *************** *** 7978,7984 **** return OK; } ! emsg(_("E777: String or List expected")); return FAIL; } --- 7978,7984 ---- return OK; } ! emsg(_(e_string_or_list_expected)); return FAIL; } *** ../vim-8.2.4007/src/regexp.c 2022-01-04 21:30:43.541800349 +0000 --- src/regexp.c 2022-01-05 15:18:42.058658130 +0000 *************** *** 71,81 **** #define MAX_LIMIT (32767L << 16L) - static char_u e_missingbracket[] = N_("E769: Missing ] after %s["); - static char_u e_reverse_range[] = N_("E944: Reverse range in character class"); - static char_u e_large_class[] = N_("E945: Range too large in character class"); - static char_u e_recursive[] = N_("E956: Cannot use pattern recursively"); - #define NOT_MULTI 0 #define MULTI_ONE 1 #define MULTI_MULT 2 --- 71,76 ---- *************** *** 2779,2785 **** // Cannot use the same prog recursively, it contains state. if (rmp->regprog->re_in_use) { ! emsg(_(e_recursive)); return FALSE; } rmp->regprog->re_in_use = TRUE; --- 2774,2780 ---- // Cannot use the same prog recursively, it contains state. if (rmp->regprog->re_in_use) { ! emsg(_(e_cannot_use_pattern_recursively)); return FALSE; } rmp->regprog->re_in_use = TRUE; *************** *** 2900,2906 **** // Cannot use the same prog recursively, it contains state. if (rmp->regprog->re_in_use) { ! emsg(_(e_recursive)); return FALSE; } rmp->regprog->re_in_use = TRUE; --- 2895,2901 ---- // Cannot use the same prog recursively, it contains state. if (rmp->regprog->re_in_use) { ! emsg(_(e_cannot_use_pattern_recursively)); return FALSE; } rmp->regprog->re_in_use = TRUE; *** ../vim-8.2.4007/src/regexp_bt.c 2022-01-04 21:30:43.541800349 +0000 --- src/regexp_bt.c 2022-01-05 15:18:17.190690438 +0000 *************** *** 1782,1794 **** endc = coll_get_char(); if (startc > endc) ! EMSG_RET_NULL(_(e_reverse_range)); if (has_mbyte && ((*mb_char2len)(startc) > 1 || (*mb_char2len)(endc) > 1)) { // Limit to a range of 256 chars. if (endc > startc + 256) ! EMSG_RET_NULL(_(e_large_class)); while (++startc <= endc) regmbc(startc); } --- 1782,1794 ---- endc = coll_get_char(); if (startc > endc) ! EMSG_RET_NULL(_(e_reverse_range_in_character_class)); if (has_mbyte && ((*mb_char2len)(startc) > 1 || (*mb_char2len)(endc) > 1)) { // Limit to a range of 256 chars. if (endc > startc + 256) ! EMSG_RET_NULL(_(e_range_too_large_in_character_class)); while (++startc <= endc) regmbc(startc); } *************** *** 2008,2014 **** break; } else if (reg_strict) ! EMSG2_RET_NULL(_(e_missingbracket), reg_magic > MAGIC_OFF); } // FALLTHROUGH --- 2008,2015 ---- break; } else if (reg_strict) ! EMSG2_RET_NULL(_(e_missing_rsb_after_str_lsb), ! reg_magic > MAGIC_OFF); } // FALLTHROUGH *** ../vim-8.2.4007/src/regexp_nfa.c 2022-01-04 21:30:43.541800349 +0000 --- src/regexp_nfa.c 2022-01-05 15:17:15.562769874 +0000 *************** *** 2019,2025 **** startc = oldstartc; if (startc > endc) ! EMSG_RET_FAIL(_(e_reverse_range)); if (endc > startc + 2) { --- 2019,2025 ---- startc = oldstartc; if (startc > endc) ! EMSG_RET_FAIL(_(e_reverse_range_in_character_class)); if (endc > startc + 2) { *************** *** 2128,2134 **** } // if exists closing ] if (reg_strict) ! EMSG_RET_FAIL(_(e_missingbracket)); // FALLTHROUGH default: --- 2128,2134 ---- } // if exists closing ] if (reg_strict) ! EMSG_RET_FAIL(_(e_missing_rsb_after_str_lsb)); // FALLTHROUGH default: *** ../vim-8.2.4007/src/register.c 2022-01-02 19:25:22.850078488 +0000 --- src/register.c 2022-01-05 14:38:05.075389861 +0000 *************** *** 575,581 **** { if (execreg_lastc == NUL) { ! emsg(_("E748: No previously used register")); return FAIL; } regname = execreg_lastc; --- 575,581 ---- { if (execreg_lastc == NUL) { ! emsg(_(e_no_previously_used_register)); return FAIL; } regname = execreg_lastc; *** ../vim-8.2.4007/src/spell.c 2022-01-01 14:19:44.052353829 +0000 --- src/spell.c 2022-01-05 15:55:26.126022801 +0000 *************** *** 478,484 **** if (endidxcnt == MAXWLEN) { // Must be a corrupted spell file. ! emsg(_(e_format)); return; } endlen[endidxcnt] = wlen; --- 478,484 ---- if (endidxcnt == MAXWLEN) { // Must be a corrupted spell file. ! emsg(_(e_format_error_in_spell_file)); return; } endlen[endidxcnt] = wlen; *************** *** 2095,2101 **** // destroying the buffer we are using... if (!bufref_valid(&bufref)) { ! ret_msg = N_("E797: SpellFileMissing autocommand deleted buffer"); goto theend; } } --- 2095,2101 ---- // destroying the buffer we are using... if (!bufref_valid(&bufref)) { ! ret_msg = N_(e_spellfilemising_autocommand_deleted_buffer); goto theend; } } *************** *** 2881,2887 **** if (repl_from == NULL || repl_to == NULL) { ! emsg(_("E752: No previous spell replacement")); return; } addlen = (int)(STRLEN(repl_to) - STRLEN(repl_from)); --- 2881,2887 ---- if (repl_from == NULL || repl_to == NULL) { ! emsg(_(e_no_previous_spell_replacement)); return; } addlen = (int)(STRLEN(repl_to) - STRLEN(repl_from)); *************** *** 2931,2937 **** vim_free(frompat); if (sub_nsubs == 0) ! semsg(_("E753: Not found: %s"), repl_from); else do_sub_msg(FALSE); } --- 2931,2937 ---- vim_free(frompat); if (sub_nsubs == 0) ! semsg(_(e_not_found_str), repl_from); else do_sub_msg(FALSE); } *** ../vim-8.2.4007/src/spell.h 2020-08-24 19:05:46.837560546 +0100 --- src/spell.h 2022-01-05 15:12:17.195137924 +0000 *************** *** 295,303 **** // file used for "zG" and "zW" SPELL_EXTERN char_u *int_wordlist SPELL_INIT(= NULL); - - SPELL_EXTERN char e_format[] SPELL_INIT(= N_("E759: Format error in spell file")); - SPELL_EXTERN spelltab_T spelltab; SPELL_EXTERN int did_set_spelltab; --- 295,300 ---- *** ../vim-8.2.4007/src/spellfile.c 2022-01-01 15:58:19.118486361 +0000 --- src/spellfile.c 2022-01-05 15:59:30.625525903 +0000 *************** *** 322,332 **** static void set_map_str(slang_T *lp, char_u *map); - static char *e_spell_trunc = N_("E758: Truncated spell file"); static char *e_afftrailing = N_("Trailing text in %s line %d: %s"); static char *e_affname = N_("Affix name too long in %s line %d: %s"); - static char *e_affform = N_("E761: Format error in affix file FOL, LOW or UPP"); - static char *e_affrange = N_("E762: Character in FOL, LOW or UPP is out of range"); static char *msg_compressing = N_("Compressing word tree..."); /* --- 322,329 ---- *************** *** 410,427 **** buf[i] = getc(fd); // if (STRNCMP(buf, VIMSPELLMAGIC, VIMSPELLMAGICL) != 0) { ! emsg(_("E757: This does not look like a spell file")); goto endFAIL; } c = getc(fd); // if (c < VIMSPELLVERSION) { ! emsg(_("E771: Old spell file, needs to be updated")); goto endFAIL; } else if (c > VIMSPELLVERSION) { ! emsg(_("E772: Spell file is for newer version of Vim")); goto endFAIL; } --- 407,424 ---- buf[i] = getc(fd); // if (STRNCMP(buf, VIMSPELLMAGIC, VIMSPELLMAGICL) != 0) { ! emsg(_(e_this_does_not_look_like_spell_file)); goto endFAIL; } c = getc(fd); // if (c < VIMSPELLVERSION) { ! emsg(_(e_old_spell_file_needs_to_be_updated)); goto endFAIL; } else if (c > VIMSPELLVERSION) { ! emsg(_(e_spell_file_is_for_newer_version_of_vim)); goto endFAIL; } *************** *** 528,534 **** // message. When it's not required skip the contents. if (c & SNF_REQUIRED) { ! emsg(_("E770: Unsupported section in spell file")); goto endFAIL; } while (--len >= 0) --- 525,531 ---- // message. When it's not required skip the contents. if (c & SNF_REQUIRED) { ! emsg(_(e_unsupported_section_in_spell_file)); goto endFAIL; } while (--len >= 0) *************** *** 539,551 **** someerror: if (res == SP_FORMERROR) { ! emsg(_(e_format)); goto endFAIL; } if (res == SP_TRUNCERROR) { truncerr: ! emsg(_(e_spell_trunc)); goto endFAIL; } if (res == SP_OTHERERROR) --- 536,548 ---- someerror: if (res == SP_FORMERROR) { ! emsg(_(e_format_error_in_spell_file)); goto endFAIL; } if (res == SP_TRUNCERROR) { truncerr: ! emsg(_(e_truncated_spell_file)); goto endFAIL; } if (res == SP_OTHERERROR) *************** *** 706,725 **** buf[i] = getc(fd); // if (STRNCMP(buf, VIMSUGMAGIC, VIMSUGMAGICL) != 0) { ! semsg(_("E778: This does not look like a .sug file: %s"), slang->sl_fname); goto nextone; } c = getc(fd); // if (c < VIMSUGVERSION) { ! semsg(_("E779: Old .sug file, needs to be updated: %s"), slang->sl_fname); goto nextone; } else if (c > VIMSUGVERSION) { ! semsg(_("E780: .sug file is for newer version of Vim: %s"), slang->sl_fname); goto nextone; } --- 703,722 ---- buf[i] = getc(fd); // if (STRNCMP(buf, VIMSUGMAGIC, VIMSUGMAGICL) != 0) { ! semsg(_(e_this_does_not_look_like_sug_file_str), slang->sl_fname); goto nextone; } c = getc(fd); // if (c < VIMSUGVERSION) { ! semsg(_(e_old_sug_file_needs_to_be_updated_str), slang->sl_fname); goto nextone; } else if (c > VIMSUGVERSION) { ! semsg(_(e_sug_file_is_for_newer_version_of_vim_str), slang->sl_fname); goto nextone; } *************** *** 729,735 **** timestamp = get8ctime(fd); // if (timestamp != slang->sl_sugtime) { ! semsg(_("E781: .sug file doesn't match .spl file: %s"), slang->sl_fname); goto nextone; } --- 726,732 ---- timestamp = get8ctime(fd); // if (timestamp != slang->sl_sugtime) { ! semsg(_(e_sug_file_doesnt_match_spl_file_str), slang->sl_fname); goto nextone; } *************** *** 742,748 **** FALSE, 0) != 0) { someerror: ! semsg(_("E782: error while reading .sug file: %s"), slang->sl_fname); slang_clear_sug(slang); goto nextone; --- 739,745 ---- FALSE, 0) != 0) { someerror: ! semsg(_(e_error_while_reading_sug_file_str), slang->sl_fname); slang_clear_sug(slang); goto nextone; *************** *** 3536,3542 **** // Read and ignore the first line: word count. if (vim_fgets(line, MAXLINELEN, fd) || !vim_isdigit(*skipwhite(line))) ! semsg(_("E760: No word count in %s"), fname); /* * Read all the lines in the file one by one. --- 3533,3539 ---- // Read and ignore the first line: word count. if (vim_fgets(line, MAXLINELEN, fd) || !vim_isdigit(*skipwhite(line))) ! semsg(_(e_no_word_count_in_str), fname); /* * Read all the lines in the file one by one. *************** *** 5965,5973 **** if (incount <= 0) emsg(_(e_invalid_argument)); // need at least output and input names else if (vim_strchr(gettail(wfname), '_') != NULL) ! emsg(_("E751: Output file name must not have region name")); else if (incount > MAXREGIONS) ! semsg(_("E754: Only up to %d regions supported"), MAXREGIONS); else { // Check for overwriting before doing things that may take a lot of --- 5962,5970 ---- if (incount <= 0) emsg(_(e_invalid_argument)); // need at least output and input names else if (vim_strchr(gettail(wfname), '_') != NULL) ! emsg(_(e_output_file_name_must_not_have_region_name)); else if (incount > MAXREGIONS) ! semsg(_(e_only_up_to_nr_regions_supported), MAXREGIONS); else { // Check for overwriting before doing things that may take a lot of *************** *** 6001,6007 **** if (STRLEN(gettail(innames[i])) < 5 || innames[i][len - 3] != '_') { ! semsg(_("E755: Invalid region in %s"), innames[i]); goto theend; } spin.si_region_name[i * 2] = TOLOWER_ASC(innames[i][len - 2]); --- 5998,6004 ---- if (STRLEN(gettail(innames[i])) < 5 || innames[i][len - 3] != '_') { ! semsg(_(e_invalid_region_in_str), innames[i]); goto theend; } spin.si_region_name[i * 2] = TOLOWER_ASC(innames[i][len - 2]); *************** *** 6228,6234 **** break; if (*spf == NUL) { ! semsg(_("E765: 'spellfile' does not have %d entries"), idx); vim_free(fnamebuf); return; } --- 6225,6231 ---- break; if (*spf == NUL) { ! semsg(_(e_spellfile_does_not_have_nr_entries), idx); vim_free(fnamebuf); return; } *************** *** 6445,6451 **** { if (*pl == NUL || *pu == NUL) { ! emsg(_(e_affform)); return FAIL; } f = mb_ptr2char_adv(&pf); --- 6442,6448 ---- { if (*pl == NUL || *pu == NUL) { ! emsg(_(e_format_error_in_affix_file_fol_low_or_upp)); return FAIL; } f = mb_ptr2char_adv(&pf); *************** *** 6466,6472 **** { if (f >= 256) { ! emsg(_(e_affrange)); return FAIL; } new_st.st_fold[l] = f; --- 6463,6469 ---- { if (f >= 256) { ! emsg(_(e_character_in_fol_low_or_upp_is_out_of_range)); return FAIL; } new_st.st_fold[l] = f; *************** *** 6479,6485 **** { if (f >= 256) { ! emsg(_(e_affrange)); return FAIL; } new_st.st_fold[u] = f; --- 6476,6482 ---- { if (f >= 256) { ! emsg(_(e_character_in_fol_low_or_upp_is_out_of_range)); return FAIL; } new_st.st_fold[u] = f; *************** *** 6490,6496 **** if (*pl != NUL || *pu != NUL) { ! emsg(_(e_affform)); return FAIL; } --- 6487,6493 ---- if (*pl != NUL || *pu != NUL) { ! emsg(_(e_format_error_in_affix_file_fol_low_or_upp)); return FAIL; } *************** *** 6550,6556 **** || spelltab.st_fold[i] != new_st->st_fold[i] || spelltab.st_upper[i] != new_st->st_upper[i]) { ! emsg(_("E763: Word characters differ between spell files")); return FAIL; } } --- 6547,6553 ---- || spelltab.st_fold[i] != new_st->st_fold[i] || spelltab.st_upper[i] != new_st->st_upper[i]) { ! emsg(_(e_word_characters_differ_between_spell_files)); return FAIL; } } *************** *** 6667,6673 **** { // This should have been checked when generating the .spl // file. ! emsg(_("E783: duplicate char in MAP entry")); vim_free(b); } } --- 6664,6670 ---- { // This should have been checked when generating the .spl // file. ! emsg(_(e_duplicate_char_in_map_entry)); vim_free(b); } } *** ../vim-8.2.4007/src/strings.c 2022-01-01 14:25:52.315548310 +0000 --- src/strings.c 2022-01-05 15:22:29.730356748 +0000 *************** *** 1862,1868 **** rettv->vval.v_string = vim_strnsave(head, tail - head); } ! static char *e_printf = N_("E766: Insufficient arguments for printf()"); /* * Get number argument from "idxp" entry in "tvs". First entry is 1. --- 1862,1868 ---- rettv->vval.v_string = vim_strnsave(head, tail - head); } ! static char *e_printf = N_(e_insufficient_arguments_for_printf); /* * Get number argument from "idxp" entry in "tvs". First entry is 1. *************** *** 2961,2967 **** } if (tvs != NULL && tvs[arg_idx - 1].v_type != VAR_UNKNOWN) ! emsg(_("E767: Too many arguments to printf()")); // Return the number of characters formatted (excluding trailing nul // character), that is, the number of characters that would have been --- 2961,2967 ---- } if (tvs != NULL && tvs[arg_idx - 1].v_type != VAR_UNKNOWN) ! emsg(_(e_too_many_arguments_to_printf)); // Return the number of characters formatted (excluding trailing nul // character), that is, the number of characters that would have been *** ../vim-8.2.4007/src/syntax.c 2022-01-02 19:25:22.854078479 +0000 --- src/syntax.c 2022-01-05 15:48:20.530962146 +0000 *************** *** 4882,4888 **** break; if (p[1] == NUL) { ! semsg(_("E789: Missing ']': %s"), kw); goto error; } if (p[1] == ']') --- 4882,4888 ---- break; if (p[1] == NUL) { ! semsg(_(e_error_missing_rsb_str), kw); goto error; } if (p[1] == ']') *** ../vim-8.2.4007/src/typval.c 2022-01-04 21:30:43.541800349 +0000 --- src/typval.c 2022-01-05 14:38:47.967195793 +0000 *************** *** 209,215 **** STR2NR_ALL, &n, NULL, 0, FALSE); return n; case VAR_LIST: ! emsg(_("E745: Using a List as a Number")); break; case VAR_DICT: emsg(_(e_using_dictionary_as_number)); --- 209,215 ---- STR2NR_ALL, &n, NULL, 0, FALSE); return n; case VAR_LIST: ! emsg(_(e_using_list_as_number)); break; case VAR_DICT: emsg(_(e_using_dictionary_as_number)); *** ../vim-8.2.4007/src/undo.c 2022-01-02 19:25:22.854078479 +0000 --- src/undo.c 2022-01-05 15:58:08.393690551 +0000 *************** *** 3180,3186 **** return; // nothing changed before if (curbuf->b_u_curhead != NULL) { ! emsg(_("E790: undojoin is not allowed after undo")); return; } if (!curbuf->b_u_synced) --- 3180,3186 ---- return; // nothing changed before if (curbuf->b_u_curhead != NULL) { ! emsg(_(e_undojoin_is_not_allowed_after_undo)); return; } if (!curbuf->b_u_synced) *** ../vim-8.2.4007/src/userfunc.c 2022-01-04 21:30:43.545800339 +0000 --- src/userfunc.c 2022-01-05 14:39:29.087019563 +0000 *************** *** 4524,4530 **** linenr_T save_lnum = SOURCING_LNUM; SOURCING_LNUM = sourcing_lnum_top; ! semsg(_("E746: Function name does not match script file name: %s"), name); SOURCING_LNUM = save_lnum; goto erret; } --- 4524,4531 ---- linenr_T save_lnum = SOURCING_LNUM; SOURCING_LNUM = sourcing_lnum_top; ! semsg(_(e_function_name_does_not_match_script_file_name_str), ! name); SOURCING_LNUM = save_lnum; goto erret; } *** ../vim-8.2.4007/src/version.c 2022-01-05 14:01:27.230992328 +0000 --- src/version.c 2022-01-05 16:00:40.113388347 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4008, /**/ -- hundred-and-one symptoms of being an internet addict: 226. You sit down at the computer right after dinner and your spouse says "See you in the morning." /// 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 ///