]> granicus.if.org Git - vim/commitdiff
patch 8.2.4010: error messages are spread out v8.2.4010
authorBram Moolenaar <Bram@vim.org>
Wed, 5 Jan 2022 17:49:15 +0000 (17:49 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 5 Jan 2022 17:49:15 +0000 (17:49 +0000)
Problem:    Error messages are spread out.
Solution:   Move more error messages to errors.h.

31 files changed:
src/crypt.c
src/diff.c
src/errors.h
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/version.c
src/window.c

index f2f643f35afa63a51f3f8add457db8ef219b6e56..5a8358891714c515af902a3f6407919b45ac5816 100644 (file)
@@ -200,7 +200,7 @@ crypt_method_nr_from_magic(char *ptr, int len)
 
     i = (int)STRLEN(crypt_magic_head);
     if (len >= i && memcmp(ptr, crypt_magic_head, i) == 0)
-       emsg(_("E821: File is encrypted with unknown method"));
+       emsg(_(e_file_is_encrypted_with_unknown_method));
 
     return -1;
 }
index fa2ab41f868343d91417e22774429988919e4b79..5a981961262f979d509f6eae3386b15d4762f6c0 100644 (file)
@@ -1096,7 +1096,7 @@ check_external_diff(diffio_T *diffio)
     if (!ok)
     {
        if (io_error)
-           emsg(_("E810: Cannot read or write temp files"));
+           emsg(_(e_cannot_read_or_write_temp_files));
        emsg(_(e_cannot_create_diffs));
        diff_a_works = MAYBE;
 #if defined(MSWIN)
@@ -1337,7 +1337,7 @@ ex_diffpatch(exarg_T *eap)
 
     // 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"));
+       emsg(_(e_cannot_read_patch_output));
     else
     {
        if (curbuf->b_fname != NULL)
index 8a6e85fc76f5fc7c29c3d25b9e4ce4a5e93b9e20..41ce5c10cd993d7ed1f5002e7b5b98f29dfabc04 100644 (file)
@@ -1861,24 +1861,55 @@ EXTERN char e_spellfilemising_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)"));
+// 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,21 +1918,83 @@ EXTERN char e_blowfish_test_failed[]
        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 \"<slnum>\""));
+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,6 +2003,38 @@ EXTERN char e_assert_fails_second_arg[]
 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,6 +2089,9 @@ EXTERN char e_job_still_running_add_bang_to_end_the_job[]
 #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[]
index 1f15bc8544d77b1d76a0779f6db802580d11dd1e..1df6e236f8a1d70adbfc6ee960eb4e973a09e6aa 100644 (file)
@@ -9051,7 +9051,7 @@ eval_vars(
                        return NULL;
                    }
 #else
-                   *errormsg = _("E809: #< is not available without the +eval feature");
+                   *errormsg = _(e_hashsmall_is_not_available_without_the_eval_feature);
                    return NULL;
 #endif
                }
@@ -9147,7 +9147,7 @@ eval_vars(
        case SPEC_SLNUM:        // line in file for ":so" command
                if (SOURCING_NAME == NULL || SOURCING_LNUM == 0)
                {
-                   *errormsg = _("E842: no line number to use for \"<slnum>\"");
+                   *errormsg = _(e_no_line_number_to_use_for_slnum);
                    return NULL;
                }
                sprintf((char *)strbuf, "%ld", SOURCING_LNUM);
index 01bd3b4f172069da168298590b326df4e3279079..ede0f2020f9e5be8c1fed052cdbe42a45016945d 100644 (file)
@@ -2679,7 +2679,7 @@ allbuf_locked(void)
 {
     if (allbuf_lock > 0)
     {
-       emsg(_("E811: Not allowed to change buffer information now"));
+       emsg(_(e_not_allowed_to_change_buffer_information_now));
        return TRUE;
     }
     return FALSE;
index 739030985750a62fc809df40fe5c1b0eedcf57e5..c33625ad66e4a942d05a9722f0277f4f7bf1d037 100644 (file)
@@ -41,7 +41,6 @@ static char_u *check_for_cryptkey(char_u *cryptkey, char_u *ptr, long *sizep, of
 #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;
@@ -527,7 +526,7 @@ readfile(
                                || (using_b_fname
                                         && (old_b_fname != curbuf->b_fname)))
                        {
-                           emsg(_(e_auchangedbuf));
+                           emsg(_(e_autocommands_changed_buffer_or_buffer_name));
                            return FAIL;
                        }
                    }
@@ -605,7 +604,7 @@ readfile(
                || (using_b_ffname && (old_b_ffname != curbuf->b_ffname))
                || (using_b_fname && (old_b_fname != curbuf->b_fname))))
        {
-           emsg(_(e_auchangedbuf));
+           emsg(_(e_autocommands_changed_buffer_or_buffer_name));
            if (!read_buffer)
                close(fd);
            return FAIL;
@@ -3012,7 +3011,7 @@ set_rw_fname(char_u *fname, char_u *sfname)
     if (curbuf != buf)
     {
        // We are in another buffer now, don't do the renaming.
-       emsg(_(e_auchangedbuf));
+       emsg(_(e_autocommands_changed_buffer_or_buffer_name));
        return FAIL;
     }
 
index cc0cc6e92e2c5e48467973b8f9fd45abb00458ae..230f4870d45bcd5e2b3ff3ebb868b8037035e77f 100644 (file)
@@ -206,8 +206,6 @@ static ff_stack_T *ff_create_stack_element(char_u *, int, int);
 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
@@ -501,7 +499,7 @@ vim_findfile_init(
        {
            if (len + 5 >= MAXPATHL)
            {
-               emsg(_(e_pathtoolong));
+               emsg(_(e_path_too_long_for_completion));
                break;
            }
            if (STRNCMP(wc_part, "**", 2) == 0)
@@ -551,7 +549,7 @@ vim_findfile_init(
     if (STRLEN(search_ctx->ffsc_start_dir)
                          + STRLEN(search_ctx->ffsc_fix_path) + 3 >= MAXPATHL)
     {
-       emsg(_(e_pathtoolong));
+       emsg(_(e_path_too_long_for_completion));
        goto error_return;
     }
     STRCPY(ff_expand_buffer, search_ctx->ffsc_start_dir);
index ee0ceda72ea3c1437276ba656b26e77803f34f6b..ef9b8309e04dc500c3381125bc09387be1315283 100644 (file)
@@ -99,7 +99,7 @@ get_float_arg(typval_T *argvars, float_T *f)
        *f = (float_T)argvars[0].vval.v_number;
        return OK;
     }
-    emsg(_("E808: Number or Float required"));
+    emsg(_(e_number_or_float_required));
     return FAIL;
 }
 
index 2e2097d68443918441009fe80754c047f7883541..4aae106e50ef87235c981c6eff3d11b217bd18d3 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -241,7 +241,7 @@ gui_do_fork(void)
     pid = fork();
     if (pid < 0)           // Fork error
     {
-       emsg(_("E851: Failed to create a new process for the GUI"));
+       emsg(_(e_failed_to_create_new_process_for_GUI));
        return;
     }
     else if (pid > 0)      // Parent
@@ -265,7 +265,7 @@ gui_do_fork(void)
 # else
                waitpid(pid, &exit_status, 0);
 # endif
-               emsg(_("E852: The child process failed to start the GUI"));
+               emsg(_(e_the_child_process_failed_to_start_GUI));
                return;
            }
            else if (status == GUI_CHILD_IO_ERROR)
index 484634bf9395f2889c39c8867844914346131c75..fa329813d89b6fd63ccf29fba97b23814877360c 100644 (file)
@@ -3466,7 +3466,7 @@ syn_add_group(char_u *name)
 
     if (highlight_ga.ga_len >= MAX_HL_ID)
     {
-       emsg(_("E849: Too many highlight and syntax groups"));
+       emsg(_(e_too_many_highlight_and_syntax_groups));
        vim_free(name);
        return 0;
     }
index 2d87238fefde264114f19ebaf3a5331d709d5bf2..09dd3de57506f10fea11059fed54d9a62731cada 100644 (file)
@@ -1242,7 +1242,7 @@ mzscheme_init(void)
 #ifdef DYNAMIC_MZSCHEME
        if (disabled || !mzscheme_enabled(TRUE))
        {
-           emsg(_("E815: Sorry, this command is disabled, the MzScheme libraries could not be loaded."));
+           emsg(_(e_sorry_this_command_is_disabled_the_mzscheme_libraries_could_not_be_loaded));
            return -1;
        }
 #endif
index b8716fa8ef1467af57390019ebd31ad225234370..ab495a821f037aab53b1ea9ce2c411d30ddd05f3 100644 (file)
@@ -5850,13 +5850,13 @@ run_eval(const char *cmd, typval_T *rettv
        {
            if (PyErr_Occurred() && !msg_silent)
                PyErr_PrintEx(0);
-           emsg(_("E858: Eval did not return a valid python object"));
+           emsg(_(e_eval_did_not_return_valid_python_object));
        }
     }
     else
     {
        if (ConvertFromPyObject(run_ret, rettv) == -1)
-           emsg(_("E859: Failed to convert returned python object to a Vim value"));
+           emsg(_(e_failed_to_convert_returned_python_object_to_vim_value));
        Py_DECREF(run_ret);
     }
     PyErr_Clear();
index 63e9068f3770962f262bb73e8577ec64242c2c42..06d45d8c67efc781b94d1e72d62ed22bdf2a9edd 100644 (file)
@@ -679,7 +679,7 @@ python_runtime_link_init(char *libname, int verbose)
     if (python3_loaded())
     {
        if (verbose)
-           emsg(_("E836: This Vim cannot execute :python after using :py3"));
+           emsg(_(e_this_vim_cannot_execute_python_after_using_py3));
        return FAIL;
     }
 # endif
index 3bf387aa67eb3d517925bcce954a1c6246badcd6..c8ca3c37920c11f43401f9e350db46a18c65a73c 100644 (file)
@@ -771,7 +771,7 @@ py3_runtime_link_init(char *libname, int verbose)
     if (python_loaded())
     {
        if (verbose)
-           emsg(_("E837: This Vim cannot execute :py3 after using :python"));
+           emsg(_(e_this_vim_cannot_execute_py3_after_using_python));
        return FAIL;
     }
 # endif
index 5dbd78216168de8ee8a07d85d8f293207394a0b3..e6d05bfe980de7bf4cad72e46d829119d52436db 100644 (file)
@@ -124,9 +124,6 @@ struct compl_S
 # 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.
@@ -2670,7 +2667,7 @@ expand_by_function(int type, char_u *base)
     validate_cursor();
     if (!EQUAL_POS(curwin->w_cursor, pos))
     {
-       emsg(_(e_compldel));
+       emsg(_(e_complete_function_deleted_text));
        goto theend;
     }
 
@@ -4506,7 +4503,7 @@ get_userdefined_compl_info(colnr_T curs_col UNUSED)
     validate_cursor();
     if (!EQUAL_POS(curwin->w_cursor, pos))
     {
-       emsg(_(e_compldel));
+       emsg(_(e_complete_function_deleted_text));
        return FAIL;
     }
 
index 6bd2b8fdce06d517613cc1fbc3ac53245cc10f3b..491f8c03a0c10050c30d61a2e669796ffed931ea 100644 (file)
@@ -55,7 +55,7 @@ match_add(
        {
            if (cur->id == id)
            {
-               semsg(_("E801: ID already taken: %d"), id);
+               semsg(_(e_id_already_taken_nr), id);
                return -1;
            }
            cur = cur->next;
@@ -233,8 +233,7 @@ match_delete(win_T *wp, int id, int perr)
     if (id < 1)
     {
        if (perr == TRUE)
-           semsg(_("E802: 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;
     }
     while (cur != NULL && cur->id != id)
@@ -245,7 +244,7 @@ match_delete(win_T *wp, int id, int perr)
     if (cur == NULL)
     {
        if (perr == TRUE)
-           semsg(_("E803: ID not found: %d"), id);
+           semsg(_(e_id_not_found_nr), id);
        return -1;
     }
     if (cur == prev)
index 07b0f5737c71f551b65c698b6d3f7e9a82ab2587..a42c5f1562483f50762443b3979923acd84481f3 100644 (file)
@@ -621,7 +621,7 @@ ml_set_crypt_key(
            mf_put(mfp, hp, FALSE, FALSE);  // release previous block
 
        if (error > 0)
-           emsg(_("E843: Error while updating swap file crypt"));
+           emsg(_(e_error_while_updating_swap_file_crypt));
     }
 
     mfp->mf_old_key = NULL;
@@ -1342,7 +1342,7 @@ ml_recover(int checkext)
 #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);
+       semsg(_(e_str_is_encrypted_and_this_version_of_vim_does_not_support_encryption), mfp->mf_fname);
        goto theend;
     }
 #endif
index ef1908f41049351e04614ebe210c672af8f63969..9cd303138a433f360bf34654397eadd8ccb2d061 100644 (file)
@@ -1558,7 +1558,7 @@ do_set(
                    p = find_termcode(key_name);
                    if (p == NULL)
                    {
-                       errmsg = N_("E846: Key code not set");
+                       errmsg = N_(e_key_code_not_set);
                        goto skip;
                    }
                    else
index a556f68e4214c1afbdff6ae104ce5fa47bdf6234..07022221eb5beb142b065c9a083d2f22d033237f 100644 (file)
@@ -1883,7 +1883,7 @@ popup_create(typval_T *argvars, typval_T *rettv, create_type_T type)
 #ifdef FEAT_TERMINAL
            if (buf->b_term != NULL && popup_terminal_exists())
            {
-               emsg(_("E861: Cannot open a second popup with a terminal"));
+               emsg(_(e_cannot_open_second_popup_with_terminal));
                return NULL;
            }
 #endif
@@ -3162,7 +3162,7 @@ error_if_term_popup_window()
     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"));
+       emsg(_(e_not_allowed_for_terminal_in_popup_window));
        return TRUE;
     }
     return FALSE;
index 2dad2b81287f4705b5382bb6561cae05c2e3c6be..115231eefb80414abb118fe7041c46819d3111d5 100644 (file)
@@ -2638,7 +2638,7 @@ vim_regcomp(char_u *expr_arg, int re_flags)
        }
        else
        {
-           emsg(_("E864: \\%#= can only be followed by 0, 1, or 2. The automatic engine will be used "));
+           emsg(_(e_percent_hash_can_only_be_followed_by_zero_one_two_automatic_engine_will_be_used));
            regexp_engine = AUTOMATIC_ENGINE;
        }
     }
index e90f98d474b5d76934efa4a86db734965515c20f..5592957f27846eb4f017a00c00bbd538a2f36096 100644 (file)
@@ -243,11 +243,6 @@ static int nfa_classcodes[] = {
     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.
@@ -1377,7 +1372,7 @@ nfa_regatom(void)
     switch (c)
     {
        case NUL:
-           EMSG_RET_FAIL(_(e_nul_found));
+           EMSG_RET_FAIL(_(e_nfa_regexp_end_encountered_prematurely));
 
        case Magic('^'):
            EMIT(NFA_BOL);
@@ -1401,7 +1396,7 @@ nfa_regatom(void)
        case Magic('_'):
            c = no_Magic(getchr());
            if (c == NUL)
-               EMSG_RET_FAIL(_(e_nul_found));
+               EMSG_RET_FAIL(_(e_nfa_regexp_end_encountered_prematurely));
 
            if (c == '^')       // "\_^" is start-of-line
            {
@@ -1461,7 +1456,7 @@ nfa_regatom(void)
            {
                if (extra == NFA_ADD_NL)
                {
-                   semsg(_(e_ill_char_class), c);
+                   semsg(_(e_nfa_regexp_invalid_character_class_nr), c);
                    rc_did_emsg = TRUE;
                    return FAIL;
                }
@@ -1506,7 +1501,7 @@ nfa_regatom(void)
        case Magic('|'):
        case Magic('&'):
        case Magic(')'):
-           semsg(_(e_misplaced), no_Magic(c));
+           semsg(_(e_nfa_regexp_misplaced_chr), no_Magic(c));
            return FAIL;
 
        case Magic('='):
@@ -1516,7 +1511,7 @@ nfa_regatom(void)
        case Magic('*'):
        case Magic('{'):
            // these should follow an atom, not form an atom
-           semsg(_(e_misplaced), no_Magic(c));
+           semsg(_(e_nfa_regexp_misplaced_chr), no_Magic(c));
            return FAIL;
 
        case Magic('~'):
@@ -1602,8 +1597,7 @@ nfa_regatom(void)
                    break;
 #endif
                default:
-                   semsg(_("E867: (NFA) Unknown operator '\\z%c'"),
-                                                                no_Magic(c));
+                   semsg(_(e_nfa_unknown_operator_z_chr), no_Magic(c));
                    return FAIL;
            }
            break;
@@ -1725,7 +1719,7 @@ nfa_regatom(void)
                            if (tmp < n)
                            {
                                // overflow.
-                               emsg(_(e_value_too_large));
+                               emsg(_(e_percent_value_too_large));
                                return FAIL;
                            }
                            n = tmp;
@@ -1773,7 +1767,7 @@ nfa_regatom(void)
                            }
                            if (n >= limit)
                            {
-                               emsg(_(e_value_too_large));
+                               emsg(_(e_percent_value_too_large));
                                return FAIL;
                            }
                            EMIT((int)n);
@@ -1788,8 +1782,7 @@ nfa_regatom(void)
                            break;
                        }
                    }
-                   semsg(_("E867: (NFA) Unknown operator '\\%%%c'"),
-                                                                no_Magic(c));
+                   semsg(_(e_nfa_unknown_operator_percent_chr), no_Magic(c));
                    return FAIL;
            }
            break;
@@ -1947,7 +1940,7 @@ collection:
                            if (result == FAIL)
                            {
                                // should never happen
-                               EMSG_RET_FAIL(_("E868: Error building NFA with equivalence class!"));
+                               EMSG_RET_FAIL(_(e_error_building_nfa_with_equivalence_class));
                            }
                            continue;
                        }
@@ -2273,7 +2266,7 @@ nfa_regpiece(void)
            }
            if (i == 0)
            {
-               semsg(_("E869: (NFA) Unknown operator '\\@%c'"), op);
+               semsg(_(e_nfa_unknown_operator_at_chr), op);
                return FAIL;
            }
            EMIT(i);
@@ -5125,7 +5118,7 @@ check_char_class(int class, int c)
 
        default:
            // should not be here :P
-           siemsg(_(e_ill_char_class), class);
+           siemsg(_(e_nfa_regexp_invalid_character_class_nr), class);
            return FAIL;
     }
     return FAIL;
index 473d600d56c3b8cdea1ad69254c9d88617fcc9df..c00930dfeda186ec6a46e85ef0f7144d95976d78 100644 (file)
@@ -4307,7 +4307,7 @@ getroom(
        {
            if (!spin->si_did_emsg)
            {
-               emsg(_("E845: Insufficient memory, word list will be incomplete"));
+               emsg(_(e_insufficient_memory_word_list_will_be_incomplete));
                spin->si_did_emsg = TRUE;
            }
            return NULL;
index 496312ded755c0d3d98e43edda09757d2839c0f2..5c55c1ecbf36d2955840993092d7ebafb3c29f14 100644 (file)
@@ -1934,7 +1934,7 @@ tv_float(typval_T *tvs, int *idxp)
        else if (tvs[idx].v_type == VAR_NUMBER)
            f = (double)tvs[idx].vval.v_number;
        else
-           emsg(_("E807: Expected Float argument for printf()"));
+           emsg(_(e_expected_float_argument_for_printf));
     }
     return f;
 }
index 7758254bad57b305ba9ccaa0544529bde5f06919..36f3510deb74f863152fa39eca1b21def1dcf1d1 100644 (file)
@@ -4635,7 +4635,7 @@ get_syn_options(
 #ifdef FEAT_CONCEAL
            if (!vim_isprintc_strict(*conceal_char))
            {
-               emsg(_("E844: invalid cchar value"));
+               emsg(_(e_invalid_cchar_value));
                return NULL;
            }
 #endif
@@ -4785,7 +4785,7 @@ syn_cmd_include(exarg_T *eap, int syncing UNUSED)
      */
     if (running_syn_inc_tag >= MAX_SYN_INC_TAG)
     {
-       emsg(_("E847: Too many syntax includes"));
+       emsg(_(e_too_many_syntax_includes));
        return;
     }
     prev_syn_inc_tag = current_syn_inc_tag;
@@ -5522,7 +5522,7 @@ syn_add_cluster(char_u *name)
     len = curwin->w_s->b_syn_clusters.ga_len;
     if (len >= MAX_CLUSTER_ID)
     {
-       emsg(_("E848: Too many syntax clusters"));
+       emsg(_(e_too_many_syntax_clusters));
        vim_free(name);
        return 0;
     }
index c28d4e42a9f33b6fe90427dad10db6ea19feb731..1f039080a179e874d51bef541ee9ac46b9d62425 100644 (file)
@@ -801,7 +801,7 @@ f_prop_find(typval_T *argvars, typval_T *rettv)
     }
     if (both && (!id_found || type_id == -1))
     {
-       emsg(_("E860: Need 'id' and 'type' with 'both'"));
+       emsg(_(e_need_id_and_type_with_both));
        return;
     }
 
@@ -1224,7 +1224,7 @@ f_prop_remove(typval_T *argvars, typval_T *rettv)
     }
     if (both && (id == -1 || type_id == -1))
     {
-       emsg(_("E860: Need 'id' and 'type' with 'both'"));
+       emsg(_(e_need_id_and_type_with_both));
        return;
     }
 
index 564cc50e3ae224c3f24698e0b75ddf0d36a81f1a..75cc336f87a34ec3105ed491f6a3dd48d7373e60 100644 (file)
@@ -191,7 +191,7 @@ tv_get_bool_or_number_chk(typval_T *varp, int *denote, int want_bool)
            return varp->vval.v_number;
        case VAR_FLOAT:
 #ifdef FEAT_FLOAT
-           emsg(_("E805: Using a Float as a Number"));
+           emsg(_(e_using_float_as_number));
            break;
 #endif
        case VAR_FUNC:
index 40f97b1844a9b1a91a973071bdc6ab940819c567..4c02551d1e11adc7cfd8329ff33e7e8e7d72dfac 100644 (file)
@@ -784,8 +784,6 @@ nomem:
 // 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].
  */
@@ -898,7 +896,7 @@ u_get_undo_file_name(char_u *buf_ffname, int reading)
     static void
 corruption_error(char *mesg, char_u *file_name)
 {
-    semsg(_("E825: Corrupted undo file (%s): %s"), mesg, file_name);
+    semsg(_(e_corrupted_undo_file_str_str), mesg, file_name);
 }
 
     static void
@@ -1680,7 +1678,7 @@ u_write_undo(
                            O_CREAT|O_EXTRA|O_WRONLY|O_EXCL|O_NOFOLLOW, perm);
     if (fd < 0)
     {
-       semsg(_(e_not_open), file_name);
+       semsg(_(e_cannot_open_undo_file_for_writing_str), file_name);
        goto theend;
     }
     (void)mch_setperm(file_name, perm);
@@ -1719,7 +1717,7 @@ u_write_undo(
     fp = fdopen(fd, "w");
     if (fp == NULL)
     {
-       semsg(_(e_not_open), file_name);
+       semsg(_(e_cannot_open_undo_file_for_writing_str), file_name);
        close(fd);
        mch_remove(file_name);
        goto theend;
@@ -1792,7 +1790,7 @@ u_write_undo(
 write_error:
     fclose(fp);
     if (!write_ok)
-       semsg(_("E829: write error in undo file: %s"), file_name);
+       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,7 +1902,7 @@ u_read_undo(char_u *name, char_u *hash, char_u *orig_name UNUSED)
     if (fp == NULL)
     {
        if (name != NULL || p_verbose > 0)
-           semsg(_("E822: Cannot open undo file for reading: %s"), file_name);
+           semsg(_(e_cannot_open_undo_file_for_reading_str), file_name);
        goto error;
     }
     bi.bi_buf = curbuf;
@@ -1916,7 +1914,7 @@ u_read_undo(char_u *name, char_u *hash, char_u *orig_name UNUSED)
     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);
+       semsg(_(e_not_an_undo_file_str), file_name);
        goto error;
     }
     version = get2c(fp);
@@ -1925,14 +1923,13 @@ u_read_undo(char_u *name, char_u *hash, char_u *orig_name UNUSED)
 #ifdef FEAT_CRYPT
        if (*curbuf->b_p_key == NUL)
        {
-           semsg(_("E832: Non-encrypted file has encrypted undo file: %s"),
-                                                                  file_name);
+           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(_("E826: Undo file decryption failed: %s"), file_name);
+           semsg(_(e_undo_file_decryption_failed), file_name);
            goto error;
        }
        if (crypt_whole_undofile(bi.bi_state->method_nr))
@@ -1948,13 +1945,13 @@ u_read_undo(char_u *name, char_u *hash, char_u *orig_name UNUSED)
            bi.bi_used = 0;
        }
 #else
-       semsg(_("E827: Undo file is encrypted: %s"), file_name);
+       semsg(_(e_undo_file_is_encrypted_str), file_name);
        goto error;
 #endif
     }
     else if (version != UF_VERSION)
     {
-       semsg(_("E824: Incompatible undo file: %s"), file_name);
+       semsg(_(e_incompatible_undo_file_str), file_name);
        goto error;
     }
 
@@ -2522,7 +2519,7 @@ undo_time(
 
        if (absolute)
        {
-           semsg(_("E830: Undo number %ld not found"), step);
+           semsg(_(e_undo_number_nr_not_found), step);
            return;
        }
 
index 72c011bf74e108664302439579e1eaf5d73bbe4e..d4ed0a46a0af8b3f6edfa6d41ca9e337a7ab0047 100644 (file)
@@ -1101,7 +1101,7 @@ ex_command(exarg_T *eap)
     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"));
+       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
index fb9e97e79fd2d68ee2d2d54031f9733dffc0ac73..b7f9dfcba047444b8039e5a70ee85b74cca6a0b7 100644 (file)
@@ -109,7 +109,7 @@ one_function_arg(
            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);
+                   semsg(_(e_duplicate_argument_name_str), arg_copy);
                    vim_free(arg_copy);
                    return arg;
                }
@@ -4268,7 +4268,7 @@ define_function(exarg_T *eap, char_u *name_arg, char_u **line_to_free)
        // Disallow using the g: dict.
        if (fudi.fd_dict != NULL && fudi.fd_dict->dv_scope == VAR_DEF_SCOPE)
        {
-           emsg(_("E862: Cannot use g: here"));
+           emsg(_(e_cannot_use_g_here));
            goto ret_free;
        }
     }
index 6b7a915c4fc195f587966c024506484c5e88ef8b..8a508d35adf1c91459deb0acebc3ebb49c769eb5 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4010,
 /**/
     4009,
 /**/
index 1d09781212361df354ee200c087fa8e83be6f69f..4a17c6241e2a6fb868522b1be40511ae06e6f60a 100644 (file)
@@ -2501,7 +2501,7 @@ win_close(win_T *win, int free_buf)
     }
     if ((firstwin == aucmd_win || lastwin == aucmd_win) && one_window())
     {
-       emsg(_("E814: Cannot close window, only autocmd window would remain"));
+       emsg(_(e_cannot_close_window_only_autocmd_window_would_remain));
        return FAIL;
     }