]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.4008: error messages are spread out v8.2.4008
authorBram Moolenaar <Bram@vim.org>
Wed, 5 Jan 2022 16:09:06 +0000 (16:09 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 5 Jan 2022 16:09:06 +0000 (16:09 +0000)
Problem:    Error messages are spread out.
Solution:   Move more error messages to errors.h.

28 files changed:
src/diff.c
src/digraph.c
src/errors.h
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
src/version.c

index 59b7891b920f2e314563253b28889dacdf5b26f3..fa2ab41f868343d91417e22774429988919e4b79 100644 (file)
@@ -2682,7 +2682,7 @@ ex_diffgetput(exarg_T *eap)
        if (idx_other == DB_COUNT)
        {
            if (found_not_ma)
-               emsg(_("E793: No other buffer in diff mode is modifiable"));
+               emsg(_(e_no_other_buffer_in_diff_mode_is_modifiable));
            else
                emsg(_(e_no_other_buffer_in_diff_mode));
            return;
@@ -2769,7 +2769,7 @@ ex_diffgetput(exarg_T *eap)
        change_warning(0);
        if (diff_buf_idx(curbuf) != idx_to)
        {
-           emsg(_("E787: Buffer changed unexpectedly"));
+           emsg(_(e_buffer_changed_unexpectedly));
            goto theend;
        }
     }
index 391b64a91fb95563e86669fd056f60f3e1f912ed..4c45e08900dce69e00730634a14c83f6626a7c73 100644 (file)
@@ -2661,7 +2661,7 @@ ex_loadkeymap(exarg_T *eap)
                    || *kp->from == NUL || *kp->to == NUL)
            {
                if (kp->to != NULL && *kp->to == NUL)
-                   emsg(_("E791: Empty keymap entry"));
+                   emsg(_(e_empty_keymap_entry));
                vim_free(kp->from);
                vim_free(kp->to);
            }
index a04267ff1c56f25816e43be73fdea0bc6f416bfd..8a6e85fc76f5fc7c29c3d25b9e4ce4a5e93b9e20 100644 (file)
@@ -1719,25 +1719,129 @@ EXTERN char e_cannot_change_value[]
        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"));
-#endif
+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,21 +1849,30 @@ EXTERN char e_cannot_set_variable_in_sandbox_str[]
        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"));
-EXTERN char e_cannot_delete_variable_str[]
-       INIT(= N_("E795: Cannot delete variable %s"));
 #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,6 +1951,11 @@ EXTERN char e_positive_count_required[]
 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,6 +1966,8 @@ EXTERN char e_file_changed_while_writing[]
        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[]
index b8f8f3ed3aa846fe8556988bb58958447905c6a5..d4358183102c2b6ff26f11905f5fd0f78490b11c 100644 (file)
@@ -6715,7 +6715,7 @@ f_islocked(typval_T *argvars, typval_T *rettv)
                }
            }
            else if (lv.ll_range)
-               emsg(_("E786: Range not allowed"));
+               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)
index ce27cee33ee45d2fe0d6ef63904ee7ee5d3f5081..462cdc20ee06341b24778f4f545b0378f71d6b71 100644 (file)
@@ -1968,7 +1968,7 @@ item_lock(typval_T *tv, int deep, int lock, int check_refcount)
 
     if (recurse >= DICT_MAXNEST)
     {
-       emsg(_("E743: variable nested too deep for (un)lock"));
+       emsg(_(e_variable_nested_too_deep_for_unlock));
        return;
     }
     if (deep == 0)
index 351ce8286e56850437a55fa9e7b85979ac60dc7a..95209985e190af2ae1586c7055fefa0fac623a81 100644 (file)
@@ -2194,8 +2194,7 @@ check_overwrite(
                else
 #endif
                {
-                   semsg(_("E768: Swap file exists: %s (:silent! overrides)"),
-                                                                   swapname);
+                   semsg(_(e_swap_file_exists_str_silent_overrides), swapname);
                    vim_free(swapname);
                    return FAIL;
                }
index 445e4eee9dbeb435154844b28cfd9b3c403f6823..41cbd3090f86ab7b3654191fb5e6b57da263ad14 100644 (file)
@@ -6023,7 +6023,7 @@ ex_tabclose(exarg_T *eap)
     else
 # endif
        if (first_tabpage->tp_next == NULL)
-           emsg(_("E784: Cannot close last tab page"));
+           emsg(_(e_cannot_close_last_tab_page));
        else
        {
            tab_number = get_tabpage_arg(eap);
@@ -7366,7 +7366,7 @@ changedir_func(
 
     if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged() && !forceit)
     {
-       emsg(_("E747: Cannot change directory, buffer is modified (add ! to override)"));
+       emsg(_(e_cannot_change_directory_buffer_is_modified_add_bang_to_override));
        return FALSE;
     }
 
index 636dd38bf2154766fa27463b4cb810ec5fe49b3d..01bd3b4f172069da168298590b326df4e3279079 100644 (file)
@@ -2664,7 +2664,7 @@ curbuf_locked(void)
 {
     if (curbuf_lock > 0)
     {
-       emsg(_("E788: Not allowed to edit another buffer now"));
+       emsg(_(e_not_allowed_to_edit_another_buffer_now));
        return TRUE;
     }
     return allbuf_locked();
index 09786091f836a922b1cd67270978679ef4b8019a..5dbd78216168de8ee8a07d85d8f293207394a0b3 100644 (file)
@@ -2864,7 +2864,7 @@ f_complete(typval_T *argvars, typval_T *rettv UNUSED)
 
     if ((State & INSERT) == 0)
     {
-       emsg(_("E785: complete() can only be used in Insert mode"));
+       emsg(_(e_complete_can_only_be_used_in_insert_mode));
        return;
     }
 
index 8b175f3880721d48cc594cbbcb2f09a6cdc4b336..6bd2b8fdce06d517613cc1fbc3ac53245cc10f3b 100644 (file)
@@ -45,8 +45,7 @@ match_add(
        return -1;
     if (id < -1 || id == 0)
     {
-       semsg(_("E799: Invalid ID: %d (must be greater than or equal to 1)"),
-                                                                          id);
+       semsg(_(e_invalid_id_nr_must_be_greater_than_or_equal_to_one), id);
        return -1;
     }
     if (id != -1)
@@ -1216,7 +1215,7 @@ f_matchadd(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
        return;
     if (id >= 1 && id <= 3)
     {
-       semsg(_("E798: ID is reserved for \":match\": %d"), id);
+       semsg(_(e_id_is_reserved_for_match_nr), id);
        return;
     }
 
@@ -1284,7 +1283,7 @@ f_matchaddpos(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
     // 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);
+       semsg(_(e_id_is_reserved_for_match_nr), id);
        return;
     }
 
index b8ed03ea48935cc95fafa6427adb9b00e5b38191..07b0f5737c71f551b65c698b6d3f7e9a82ab2587 100644 (file)
@@ -4415,7 +4415,7 @@ resolve_symlink(char_u *fname, char_u *buf)
        // Limit symlink depth to 100, catch recursive loops.
        if (++depth == 100)
        {
-           semsg(_("E773: Symlink loop for \"%s\""), fname);
+           semsg(_(e_symlink_loop_for_str), fname);
            return FAIL;
        }
 
index 88b8b84594ede2820e1d64a938d25141f4eb61c4..614196aa0b2131052ce75dac705c682fe11ecaac 100644 (file)
@@ -512,7 +512,7 @@ add_menu_path(
        if (*dname == NUL)
        {
            // Only a mnemonic or accelerator is not valid.
-           emsg(_("E792: Empty menu name"));
+           emsg(_(e_empty_menu_name));
            goto erret;
        }
 
index 0685a06e0ea6cc038c0e7c11e810294dc236ff5b..44a6a6e8e7d6f056d4eca2e0c06bf55720e1adfa 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -3381,7 +3381,7 @@ op_function(oparg_T *oap UNUSED)
     typval_T   rettv;
 
     if (*p_opfunc == NUL)
-       emsg(_("E774: 'operatorfunc' is empty"));
+       emsg(_(e_operatorfunc_is_empty));
     else
     {
        // Set '[ and '] marks to text to be operated on.
@@ -3419,7 +3419,7 @@ op_function(oparg_T *oap UNUSED)
        }
     }
 #else
-    emsg(_("E775: Eval feature not available"));
+    emsg(_(e_eval_feature_not_available));
 #endif
 }
 
index 0aec8623963cea1cab87e093e58d5c96f488e9d5..00350ca6fea0708710aeb842a076dd9c92e7241d 100644 (file)
@@ -320,7 +320,7 @@ ex_profile(exarg_T *eap)
        set_vim_var_nr(VV_PROFILING, 1L);
     }
     else if (do_profiling == PROF_NONE)
-       emsg(_("E750: First use \":profile start {fname}\""));
+       emsg(_(e_first_use_profile_start_fname));
     else if (STRCMP(eap->arg, "pause") == 0)
     {
        if (do_profiling == PROF_YES)
index f7d35f8054da455c0187a60f5953d2b0577b2783..90210294a96291aa03ef8750905fa175d78b810a 100644 (file)
@@ -7978,7 +7978,7 @@ cexpr_core(exarg_T *eap, typval_T *tv)
        return OK;
     }
 
-    emsg(_("E777: String or List expected"));
+    emsg(_(e_string_or_list_expected));
     return FAIL;
 }
 
index 40b21d3f41807ca9bd97538818849b11f702b7c9..2dad2b81287f4705b5382bb6561cae05c2e3c6be 100644 (file)
@@ -71,11 +71,6 @@ toggle_Magic(int x)
 
 #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
@@ -2779,7 +2774,7 @@ vim_regexec_string(
     // Cannot use the same prog recursively, it contains state.
     if (rmp->regprog->re_in_use)
     {
-       emsg(_(e_recursive));
+       emsg(_(e_cannot_use_pattern_recursively));
        return FALSE;
     }
     rmp->regprog->re_in_use = TRUE;
@@ -2900,7 +2895,7 @@ vim_regexec_multi(
     // Cannot use the same prog recursively, it contains state.
     if (rmp->regprog->re_in_use)
     {
-       emsg(_(e_recursive));
+       emsg(_(e_cannot_use_pattern_recursively));
        return FALSE;
     }
     rmp->regprog->re_in_use = TRUE;
index b3943429175e1c9e04340f45250b4b5ac8d879a4..9286d911aeab0aa5232ca43db888e4a0cbe47b9d 100644 (file)
@@ -1782,13 +1782,13 @@ collection:
                                endc = coll_get_char();
 
                            if (startc > endc)
-                               EMSG_RET_NULL(_(e_reverse_range));
+                               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_large_class));
+                                   EMSG_RET_NULL(_(e_range_too_large_in_character_class));
                                while (++startc <= endc)
                                    regmbc(startc);
                            }
@@ -2008,7 +2008,8 @@ collection:
                break;
            }
            else if (reg_strict)
-               EMSG2_RET_NULL(_(e_missingbracket), reg_magic > MAGIC_OFF);
+               EMSG2_RET_NULL(_(e_missing_rsb_after_str_lsb),
+                                                       reg_magic > MAGIC_OFF);
        }
        // FALLTHROUGH
 
index aa752d19fcba3708daca80ee76e5699c2a1444db..e90f98d474b5d76934efa4a86db734965515c20f 100644 (file)
@@ -2019,7 +2019,7 @@ collection:
 
                        startc = oldstartc;
                        if (startc > endc)
-                           EMSG_RET_FAIL(_(e_reverse_range));
+                           EMSG_RET_FAIL(_(e_reverse_range_in_character_class));
 
                        if (endc > startc + 2)
                        {
@@ -2128,7 +2128,7 @@ collection:
            } // if exists closing ]
 
            if (reg_strict)
-               EMSG_RET_FAIL(_(e_missingbracket));
+               EMSG_RET_FAIL(_(e_missing_rsb_after_str_lsb));
            // FALLTHROUGH
 
        default:
index 36fe954c1015a3c239a7925cd813631282a343da..eaabbd55503143f8c06aadf38d615b69ce9a598f 100644 (file)
@@ -575,7 +575,7 @@ do_execreg(
     {
        if (execreg_lastc == NUL)
        {
-           emsg(_("E748: No previously used register"));
+           emsg(_(e_no_previously_used_register));
            return FAIL;
        }
        regname = execreg_lastc;
index 21ffc3de92e5485c2632683e214be361eab95608..1fae9b74b93b441d8a19a1e2252568a03d625c4d 100644 (file)
@@ -478,7 +478,7 @@ find_word(matchinf_T *mip, int mode)
            if (endidxcnt == MAXWLEN)
            {
                // Must be a corrupted spell file.
-               emsg(_(e_format));
+               emsg(_(e_format_error_in_spell_file));
                return;
            }
            endlen[endidxcnt] = wlen;
@@ -2095,7 +2095,7 @@ did_set_spelllang(win_T *wp)
                // destroying the buffer we are using...
                if (!bufref_valid(&bufref))
                {
-                   ret_msg = N_("E797: SpellFileMissing autocommand deleted buffer");
+                   ret_msg = N_(e_spellfilemising_autocommand_deleted_buffer);
                    goto theend;
                }
            }
@@ -2881,7 +2881,7 @@ ex_spellrepall(exarg_T *eap UNUSED)
 
     if (repl_from == NULL || repl_to == NULL)
     {
-       emsg(_("E752: No previous spell replacement"));
+       emsg(_(e_no_previous_spell_replacement));
        return;
     }
     addlen = (int)(STRLEN(repl_to) - STRLEN(repl_from));
@@ -2931,7 +2931,7 @@ ex_spellrepall(exarg_T *eap UNUSED)
     vim_free(frompat);
 
     if (sub_nsubs == 0)
-       semsg(_("E753: Not found: %s"), repl_from);
+       semsg(_(e_not_found_str), repl_from);
     else
        do_sub_msg(FALSE);
 }
index 7e4f813b46f49cdef0190e9496e6bd4e6cbed94e..e1ca380e051c1f35fe208aba81ff027b23412349 100644 (file)
@@ -295,9 +295,6 @@ SPELL_EXTERN slang_T        *first_lang SPELL_INIT(= NULL);
 // 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;
 
index 17976639333eeac2e42bada2994cd32acb9e2154..473d600d56c3b8cdea1ad69254c9d88617fcc9df 100644 (file)
@@ -322,11 +322,8 @@ static int set_spell_chartab(char_u *fol, char_u *low, char_u *upp);
 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...");
 
 /*
@@ -410,18 +407,18 @@ spell_load_file(
        buf[i] = getc(fd);                              // <fileID>
     if (STRNCMP(buf, VIMSPELLMAGIC, VIMSPELLMAGICL) != 0)
     {
-       emsg(_("E757: This does not look like a spell file"));
+       emsg(_(e_this_does_not_look_like_spell_file));
        goto endFAIL;
     }
     c = getc(fd);                                      // <versionnr>
     if (c < VIMSPELLVERSION)
     {
-       emsg(_("E771: Old spell file, needs to be updated"));
+       emsg(_(e_old_spell_file_needs_to_be_updated));
        goto endFAIL;
     }
     else if (c > VIMSPELLVERSION)
     {
-       emsg(_("E772: Spell file is for newer version of Vim"));
+       emsg(_(e_spell_file_is_for_newer_version_of_vim));
        goto endFAIL;
     }
 
@@ -528,7 +525,7 @@ spell_load_file(
                // message.  When it's not required skip the contents.
                if (c & SNF_REQUIRED)
                {
-                   emsg(_("E770: Unsupported section in spell file"));
+                   emsg(_(e_unsupported_section_in_spell_file));
                    goto endFAIL;
                }
                while (--len >= 0)
@@ -539,13 +536,13 @@ spell_load_file(
 someerror:
        if (res == SP_FORMERROR)
        {
-           emsg(_(e_format));
+           emsg(_(e_format_error_in_spell_file));
            goto endFAIL;
        }
        if (res == SP_TRUNCERROR)
        {
 truncerr:
-           emsg(_(e_spell_trunc));
+           emsg(_(e_truncated_spell_file));
            goto endFAIL;
        }
        if (res == SP_OTHERERROR)
@@ -706,20 +703,20 @@ suggest_load_files(void)
                buf[i] = getc(fd);                      // <fileID>
            if (STRNCMP(buf, VIMSUGMAGIC, VIMSUGMAGICL) != 0)
            {
-               semsg(_("E778: This does not look like a .sug file: %s"),
+               semsg(_(e_this_does_not_look_like_sug_file_str),
                                                             slang->sl_fname);
                goto nextone;
            }
            c = getc(fd);                               // <versionnr>
            if (c < VIMSUGVERSION)
            {
-               semsg(_("E779: Old .sug file, needs to be updated: %s"),
+               semsg(_(e_old_sug_file_needs_to_be_updated_str),
                                                             slang->sl_fname);
                goto nextone;
            }
            else if (c > VIMSUGVERSION)
            {
-               semsg(_("E780: .sug file is for newer version of Vim: %s"),
+               semsg(_(e_sug_file_is_for_newer_version_of_vim_str),
                                                             slang->sl_fname);
                goto nextone;
            }
@@ -729,7 +726,7 @@ suggest_load_files(void)
            timestamp = get8ctime(fd);                  // <timestamp>
            if (timestamp != slang->sl_sugtime)
            {
-               semsg(_("E781: .sug file doesn't match .spl file: %s"),
+               semsg(_(e_sug_file_doesnt_match_spl_file_str),
                                                             slang->sl_fname);
                goto nextone;
            }
@@ -742,7 +739,7 @@ suggest_load_files(void)
                                                               FALSE, 0) != 0)
            {
 someerror:
-               semsg(_("E782: error while reading .sug file: %s"),
+               semsg(_(e_error_while_reading_sug_file_str),
                                                             slang->sl_fname);
                slang_clear_sug(slang);
                goto nextone;
@@ -3536,7 +3533,7 @@ spell_read_dic(spellinfo_T *spin, char_u *fname, afffile_T *affile)
 
     // 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);
+       semsg(_(e_no_word_count_in_str), fname);
 
     /*
      * Read all the lines in the file one by one.
@@ -5965,9 +5962,9 @@ mkspell(
     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"));
+       emsg(_(e_output_file_name_must_not_have_region_name));
     else if (incount > MAXREGIONS)
-       semsg(_("E754: Only up to %d regions supported"), MAXREGIONS);
+       semsg(_(e_only_up_to_nr_regions_supported), MAXREGIONS);
     else
     {
        // Check for overwriting before doing things that may take a lot of
@@ -6001,7 +5998,7 @@ mkspell(
                if (STRLEN(gettail(innames[i])) < 5
                                                || innames[i][len - 3] != '_')
                {
-                   semsg(_("E755: Invalid region in %s"), innames[i]);
+                   semsg(_(e_invalid_region_in_str), innames[i]);
                    goto theend;
                }
                spin.si_region_name[i * 2] = TOLOWER_ASC(innames[i][len - 2]);
@@ -6228,7 +6225,7 @@ spell_add_word(
                break;
            if (*spf == NUL)
            {
-               semsg(_("E765: 'spellfile' does not have %d entries"), idx);
+               semsg(_(e_spellfile_does_not_have_nr_entries), idx);
                vim_free(fnamebuf);
                return;
            }
@@ -6445,7 +6442,7 @@ set_spell_chartab(char_u *fol, char_u *low, char_u *upp)
     {
        if (*pl == NUL || *pu == NUL)
        {
-           emsg(_(e_affform));
+           emsg(_(e_format_error_in_affix_file_fol_low_or_upp));
            return FAIL;
        }
        f = mb_ptr2char_adv(&pf);
@@ -6466,7 +6463,7 @@ set_spell_chartab(char_u *fol, char_u *low, char_u *upp)
        {
            if (f >= 256)
            {
-               emsg(_(e_affrange));
+               emsg(_(e_character_in_fol_low_or_upp_is_out_of_range));
                return FAIL;
            }
            new_st.st_fold[l] = f;
@@ -6479,7 +6476,7 @@ set_spell_chartab(char_u *fol, char_u *low, char_u *upp)
        {
            if (f >= 256)
            {
-               emsg(_(e_affrange));
+               emsg(_(e_character_in_fol_low_or_upp_is_out_of_range));
                return FAIL;
            }
            new_st.st_fold[u] = f;
@@ -6490,7 +6487,7 @@ set_spell_chartab(char_u *fol, char_u *low, char_u *upp)
 
     if (*pl != NUL || *pu != NUL)
     {
-       emsg(_(e_affform));
+       emsg(_(e_format_error_in_affix_file_fol_low_or_upp));
        return FAIL;
     }
 
@@ -6550,7 +6547,7 @@ set_spell_finish(spelltab_T *new_st)
                    || 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"));
+               emsg(_(e_word_characters_differ_between_spell_files));
                return FAIL;
            }
        }
@@ -6667,7 +6664,7 @@ set_map_str(slang_T *lp, char_u *map)
                {
                    // This should have been checked when generating the .spl
                    // file.
-                   emsg(_("E783: duplicate char in MAP entry"));
+                   emsg(_(e_duplicate_char_in_map_entry));
                    vim_free(b);
                }
            }
index 6abf89a35b83bcf542b90ceb2a919479b8f44415..496312ded755c0d3d98e43edda09757d2839c0f2 100644 (file)
@@ -1862,7 +1862,7 @@ f_trim(typval_T *argvars, typval_T *rettv)
     rettv->vval.v_string = vim_strnsave(head, tail - head);
 }
 
-static char *e_printf = N_("E766: Insufficient arguments for printf()");
+static char *e_printf = N_(e_insufficient_arguments_for_printf);
 
 /*
  * Get number argument from "idxp" entry in "tvs".  First entry is 1.
@@ -2961,7 +2961,7 @@ vim_vsnprintf_typval(
     }
 
     if (tvs != NULL && tvs[arg_idx - 1].v_type != VAR_UNKNOWN)
-       emsg(_("E767: Too many arguments to printf()"));
+       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
index 6e1feb5c66789571044f6a349399de2a851ebfb4..7758254bad57b305ba9ccaa0544529bde5f06919 100644 (file)
@@ -4882,7 +4882,7 @@ syn_cmd_keyword(exarg_T *eap, int syncing UNUSED)
                            break;
                        if (p[1] == NUL)
                        {
-                           semsg(_("E789: Missing ']': %s"), kw);
+                           semsg(_(e_error_missing_rsb_str), kw);
                            goto error;
                        }
                        if (p[1] == ']')
index 2ffc4ab08de580de11d6ed90023248fc0eaf9f47..564cc50e3ae224c3f24698e0b75ddf0d36a81f1a 100644 (file)
@@ -209,7 +209,7 @@ tv_get_bool_or_number_chk(typval_T *varp, int *denote, int want_bool)
                                            STR2NR_ALL, &n, NULL, 0, FALSE);
            return n;
        case VAR_LIST:
-           emsg(_("E745: Using a List as a Number"));
+           emsg(_(e_using_list_as_number));
            break;
        case VAR_DICT:
            emsg(_(e_using_dictionary_as_number));
index a376150fba116c3ceba48de8835bc6da7a08821e..40f97b1844a9b1a91a973071bdc6ab940819c567 100644 (file)
@@ -3180,7 +3180,7 @@ ex_undojoin(exarg_T *eap UNUSED)
        return;             // nothing changed before
     if (curbuf->b_u_curhead != NULL)
     {
-       emsg(_("E790: undojoin is not allowed after undo"));
+       emsg(_(e_undojoin_is_not_allowed_after_undo));
        return;
     }
     if (!curbuf->b_u_synced)
index 4c9c46d51edb3ec79915b4a9b4b5acc01ee3a221..fb9e97e79fd2d68ee2d2d54031f9733dffc0ac73 100644 (file)
@@ -4524,7 +4524,8 @@ define_function(exarg_T *eap, char_u *name_arg, char_u **line_to_free)
                linenr_T save_lnum = SOURCING_LNUM;
 
                SOURCING_LNUM = sourcing_lnum_top;
-               semsg(_("E746: Function name does not match script file name: %s"), name);
+               semsg(_(e_function_name_does_not_match_script_file_name_str),
+                                                                        name);
                SOURCING_LNUM = save_lnum;
                goto erret;
            }
index c12bbead444eff5a0c5017fa12a207e7ac1f34e6..48a1c9820e1f9cf980814e61160a55e91ef03a78 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4008,
 /**/
     4007,
 /**/