To: vim_dev@googlegroups.com Subject: Patch 8.2.4005 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4005 Problem: Error messages are spread out. Solution: Move more error messages to errors.h. Files: src/errors.h, src/dict.c, src/eval.c, src/evalfunc.c, src/evalvars.c, src/ex_cmds2.c, src/ex_docmd.c, src/ex_eval.c, src/filepath.c, src/gui.c, src/gui_w32.c, src/hardcopy.c, src/help.c, src/highlight.c, src/if_python.c, src/list.c, src/misc1.c, src/normal.c, src/quickfix.c, src/regexp.c, src/regexp_bt.c, src/regexp_nfa.c, src/typval.c, src/userfunc.c *** ../vim-8.2.4004/src/errors.h 2022-01-04 19:57:50.926919998 +0000 --- src/errors.h 2022-01-04 21:27:02.842242904 +0000 *************** *** 1517,1523 **** EXTERN char e_invalid_buffer_identifier_in_getanno[] INIT(= "E652: Invalid buffer identifier in getAnno"); #endif ! #ifdef FEAT_NETBEANS_INTG // E656 EXTERN char e_netbeans_disallows_writes_of_unmodified_buffers[] --- 1517,1527 ---- EXTERN char e_invalid_buffer_identifier_in_getanno[] INIT(= "E652: Invalid buffer identifier in getAnno"); #endif ! // E653 unused ! EXTERN char e_missing_delimiter_after_search_pattern_str[] ! INIT(= N_("E654: missing delimiter after search pattern: %s")); ! EXTERN char e_too_many_symbolic_links_cycle[] ! INIT(= N_("E655: Too many symbolic links (cycle?)")); #ifdef FEAT_NETBEANS_INTG // E656 EXTERN char e_netbeans_disallows_writes_of_unmodified_buffers[] *************** *** 1527,1535 **** --- 1531,1561 ---- INIT(= N_("Partial writes disallowed for NetBeans buffers")); EXTERN char e_netbeans_connection_lost_for_buffer_nr[] INIT(= N_("E658: NetBeans connection lost for buffer %d")); + #endif + #ifdef FEAT_PYTHON + EXTERN char e_cannot_invoke_python_recursively[] + INIT(= N_("E659: Cannot invoke Python recursively")); + #endif + #ifdef FEAT_NETBEANS_INTG EXTERN char e_cannot_open_netbeans_connection_info_file[] INIT(= "E660: Cannot open NetBeans connection info file"); #endif + #ifdef FEAT_MULTI_LANG + EXTERN char e_sorry_no_str_help_for_str[] + INIT(= N_("E661: Sorry, no '%s' help for %s")); + #endif + EXTERN char e_at_start_of_changelist[] + INIT(= N_("E662: At start of changelist")); + EXTERN char e_at_end_of_changelist[] + INIT(= N_("E663: At end of changelist")); + EXTERN char e_changelist_is_empty[] + INIT(= N_("E664: changelist is empty")); + #ifdef FEAT_GUI + EXTERN char e_cannot_start_gui_no_valid_font_found[] + INIT(= N_("E665: Cannot start GUI, no valid font found")); + #endif + EXTERN char e_compiler_not_supported_str[] + INIT(= N_("E666: compiler not supported: %s")); #ifdef HAVE_FSYNC EXTERN char e_fsync_failed[] INIT(= N_("E667: Fsync failed")); *************** *** 1538,1549 **** --- 1564,1601 ---- EXTERN char e_wrong_access_mode_for_netbeans_connection_info_file_str[] INIT(= N_("E668: Wrong access mode for NetBeans connection info file: \"%s\"")); #endif + EXTERN char e_unprintable_character_in_group_name[] + INIT(= N_("E669: Unprintable character in group name")); + EXTERN char e_mix_of_help_file_encodings_within_language_str[] + INIT(= N_("E670: Mix of help file encodings within a language: %s")); + #ifdef FEAT_GUI_MSWIN + EXTERN char e_cannot_find_window_title_str[] + INIT(= N_("E671: Cannot find window title \"%s\"")); + EXTERN char e_unable_to_open_window_inside_mdi_application[] + INIT(= N_("E672: Unable to open window inside MDI application")); + #endif + EXTERN char e_incompatible_multi_byte_encoding_and_character_set[] + INIT(= N_("E673: Incompatible multi-byte encoding and character set")); + EXTERN char e_printmbcharset_cannot_be_empty_with_multi_byte_encoding[] + INIT(= N_("E674: printmbcharset cannot be empty with multi-byte encoding.")); + EXTERN char e_no_default_font_specified_for_multi_byte_printing[] + INIT(= N_("E675: No default font specified for multi-byte printing.")); EXTERN char e_no_matching_autocommands_for_acwrite_buffer[] INIT(= N_("E676: No matching autocommands for acwrite buffer")); + EXTERN char e_error_writing_temp_file[] + INIT(= N_("E677: Error writing temp file")); + EXTERN char e_invalid_character_after_str_2[] + INIT(= N_("E678: Invalid character after %s%%[dxouU]")); + EXTERN char e_recursive_loop_loading_syncolor_vim[] + INIT(= N_("E679: recursive loop loading syncolor.vim")); EXTERN char e_buffer_nr_invalid_buffer_number[] INIT(= N_("E680: : invalid buffer number")); + EXTERN char e_buffer_is_not_loaded[] + INIT(= N_("E681: Buffer is not loaded")); EXTERN char e_invalid_search_pattern_or_delimiter[] INIT(= N_("E682: Invalid search pattern or delimiter")); + EXTERN char e_file_name_missing_or_invalid_pattern[] + INIT(= N_("E683: File name missing or invalid pattern")); #ifdef FEAT_EVAL EXTERN char e_list_index_out_of_range_nr[] INIT(= N_("E684: list index out of range: %ld")); *************** *** 1553,1567 **** #ifdef FEAT_EVAL EXTERN char e_argument_of_str_must_be_list[] INIT(= N_("E686: Argument of %s must be a List")); EXTERN char e_missing_in_after_for[] INIT(= N_("E690: Missing \"in\" after :for")); // E693 unused EXTERN char e_cannot_index_a_funcref[] INIT(= N_("E695: Cannot index a Funcref")); EXTERN char e_missing_end_of_list_rsb_str[] INIT(= N_("E697: Missing end of List ']': %s")); ! // E706 unused EXTERN char e_list_value_has_more_items_than_targets[] INIT(= N_("E710: List value has more items than targets")); EXTERN char e_list_value_does_not_have_enough_items[] --- 1605,1654 ---- #ifdef FEAT_EVAL EXTERN char e_argument_of_str_must_be_list[] INIT(= N_("E686: Argument of %s must be a List")); + EXTERN char e_less_targets_than_list_items[] + INIT(= N_("E687: Less targets than List items")); + EXTERN char e_more_targets_than_list_items[] + INIT(= N_("E688: More targets than List items")); + EXTERN char e_can_only_index_list_dictionary_or_blob[] + INIT(= N_("E689: Can only index a List, Dictionary or Blob")); EXTERN char e_missing_in_after_for[] INIT(= N_("E690: Missing \"in\" after :for")); + EXTERN char e_can_only_compare_list_with_list[] + INIT(= N_("E691: Can only compare List with List")); + EXTERN char e_invalid_operation_for_list[] + INIT(= N_("E692: Invalid operation for List")); // E693 unused + EXTERN char e_invalid_operation_for_funcrefs[] + INIT(= N_("E694: Invalid operation for Funcrefs")); EXTERN char e_cannot_index_a_funcref[] INIT(= N_("E695: Cannot index a Funcref")); + EXTERN char e_missing_comma_in_list_str[] + INIT(= N_("E696: Missing comma in List: %s")); EXTERN char e_missing_end_of_list_rsb_str[] INIT(= N_("E697: Missing end of List ']': %s")); ! EXTERN char e_variable_nested_too_deep_for_making_copy[] ! INIT(= N_("E698: variable nested too deep for making a copy")); ! EXTERN char e_too_many_arguments[] ! INIT(= N_("E699: Too many arguments")); ! EXTERN char e_unknown_function_str_2[] ! INIT(= N_("E700: Unknown function: %s")); ! EXTERN char e_invalid_type_for_len[] ! INIT(= N_("E701: Invalid type for len()")); ! EXTERN char e_sort_compare_function_failed[] ! INIT(= N_("E702: Sort compare function failed")); ! EXTERN char e_using_funcref_as_number[] ! INIT(= N_("E703: Using a Funcref as a Number")); ! EXTERN char e_funcref_variable_name_must_start_with_capital_str[] ! INIT(= N_("E704: Funcref variable name must start with a capital: %s")); ! EXTERN char e_variable_name_conflicts_with_existing_function_str[] ! INIT(= N_("E705: Variable name conflicts with existing function: %s")); // E706 unused + EXTERN char e_function_name_conflicts_with_variable_str[] + INIT(= N_("E707: Function name conflicts with variable: %s")); + EXTERN char e_slice_must_come_last[] + INIT(= N_("E708: [:] must come last")); + EXTERN char e_slice_requires_list_or_blob_value[] + INIT(= N_("E709: [:] requires a List or Blob value")); EXTERN char e_list_value_has_more_items_than_targets[] INIT(= N_("E710: List value has more items than targets")); EXTERN char e_list_value_does_not_have_enough_items[] *************** *** 1576,1581 **** --- 1663,1672 ---- INIT(= N_("E715: Dictionary required")); EXTERN char e_key_not_present_in_dictionary[] INIT(= N_("E716: Key not present in Dictionary: \"%s\"")); + EXTERN char e_dictionary_entry_already_exists[] + INIT(= N_("E717: Dictionary entry already exists")); + EXTERN char e_funcref_required[] + INIT(= N_("E718: Funcref required")); EXTERN char e_cannot_slice_dictionary[] INIT(= N_("E719: Cannot slice a Dictionary")); EXTERN char e_missing_colon_in_dictionary[] *************** *** 1586,1593 **** --- 1677,1716 ---- INIT(= N_("E722: Missing comma in Dictionary: %s")); EXTERN char e_missing_dict_end[] INIT(= N_("E723: Missing end of Dictionary '}': %s")); + EXTERN char e_variable_nested_too_deep_for_displaying[] + INIT(= N_("E724: variable nested too deep for displaying")); + EXTERN char e_calling_dict_function_without_dictionary_str[] + INIT(= N_("E725: Calling dict function without Dictionary: %s")); + EXTERN char e_stride_is_zero[] + INIT(= N_("E726: Stride is zero")); + EXTERN char e_start_past_end[] + INIT(= N_("E727: Start past end")); + EXTERN char e_using_dictionary_as_number[] + INIT(= N_("E728: Using a Dictionary as a Number")); + EXTERN char e_using_funcref_as_string[] + INIT(= N_("E729: Using a Funcref as a String")); + EXTERN char e_using_list_as_string[] + INIT(= N_("E730: Using a List as a String")); + EXTERN char e_using_dictionary_as_string[] + INIT(= N_("E731: Using a Dictionary as a String")); + EXTERN char e_using_endfor_with_while[] + INIT(= N_("E732: Using :endfor with :while")); + EXTERN char e_using_endwhile_with_for[] + INIT(= N_("E733: Using :endwhile with :for")); EXTERN char e_wrong_variable_type_for_str_equal[] INIT(= N_("E734: Wrong variable type for %s=")); + EXTERN char e_can_only_compare_dictionary_with_dictionary[] + INIT(= N_("E735: Can only compare Dictionary with Dictionary")); + EXTERN char e_invalid_operation_for_dictionary[] + INIT(= N_("E736: Invalid operation for Dictionary")); + EXTERN char e_key_already_exists_str[] + INIT(= N_("E737: Key already exists: %s")); + EXTERN char e_cant_list_variables_for_str[] + INIT(= N_("E738: Can't list variables for %s")); + EXTERN char e_cannot_create_directory_str[] + INIT(= N_("E739: Cannot create directory: %s")); + EXTERN char e_too_many_arguments_for_function_str_2[] + INIT(= N_("E740: Too many arguments for function %s")); EXTERN char e_value_is_locked[] INIT(= N_("E741: Value is locked")); EXTERN char e_value_is_locked_str[] *************** *** 1700,1705 **** --- 1823,1830 ---- EXTERN char e_buffer_cannot_be_registered[] INIT(= N_("E931: Buffer cannot be registered")); #ifdef FEAT_EVAL + EXTERN char e_closure_function_should_not_be_at_top_level[] + INIT(= N_("E932: Closure function should not be at top level: %s")); EXTERN char e_function_was_deleted_str[] INIT(= N_("E933: Function was deleted: %s")); #endif *** ../vim-8.2.4004/src/dict.c 2022-01-04 15:54:34.592486131 +0000 --- src/dict.c 2022-01-04 21:18:56.139354071 +0000 *************** *** 1116,1122 **** } else if (*action == 'e') { ! semsg(_("E737: Key already exists: %s"), hi2->hi_key); break; } else if (*action == 'f' && HI2DI(hi2) != di1) --- 1116,1122 ---- } else if (*action == 'e') { ! semsg(_(e_key_already_exists_str), hi2->hi_key); break; } else if (*action == 'f' && HI2DI(hi2) != di1) *** ../vim-8.2.4004/src/eval.c 2022-01-03 12:27:59.359039951 +0000 --- src/eval.c 2022-01-04 21:12:06.888592828 +0000 *************** *** 958,964 **** && lp->ll_tv->v_type != VAR_BLOB) { if (!quiet) ! emsg(_("E689: Can only index a List, Dictionary or Blob")); return NULL; } --- 958,964 ---- && lp->ll_tv->v_type != VAR_BLOB) { if (!quiet) ! emsg(_(e_can_only_index_list_dictionary_or_blob)); return NULL; } *************** *** 972,978 **** if (lp->ll_range) { if (!quiet) ! emsg(_("E708: [:] must come last")); return NULL; } --- 972,978 ---- if (lp->ll_range) { if (!quiet) ! emsg(_(e_slice_must_come_last)); return NULL; } *************** *** 1039,1045 **** && rettv->vval.v_blob != NULL)) { if (!quiet) ! emsg(_("E709: [:] requires a List or Blob value")); clear_tv(&var1); return NULL; } --- 1039,1045 ---- && rettv->vval.v_blob != NULL)) { if (!quiet) ! emsg(_(e_slice_requires_list_or_blob_value)); clear_tv(&var1); return NULL; } *************** *** 5010,5016 **** // flooding the user with errors. And stop iterating over lists // and dicts. did_echo_string_emsg = TRUE; ! emsg(_("E724: variable nested too deep for displaying")); } *tofree = NULL; return (char_u *)"{E724}"; --- 5010,5016 ---- // flooding the user with errors. And stop iterating over lists // and dicts. did_echo_string_emsg = TRUE; ! emsg(_(e_variable_nested_too_deep_for_displaying)); } *tofree = NULL; return (char_u *)"{E724}"; *************** *** 6020,6026 **** if (recurse >= DICT_MAXNEST) { ! emsg(_("E698: variable nested too deep for making a copy")); return FAIL; } ++recurse; --- 6020,6026 ---- if (recurse >= DICT_MAXNEST) { ! emsg(_(e_variable_nested_too_deep_for_making_copy)); return FAIL; } ++recurse; *** ../vim-8.2.4004/src/evalfunc.c 2022-01-04 20:05:00.098011230 +0000 --- src/evalfunc.c 2022-01-04 21:23:04.310756824 +0000 *************** *** 4113,4119 **** else if (trans_name != NULL && (is_funcref ? find_func(trans_name, is_global, NULL) == NULL : !translated_function_exists(trans_name, is_global))) ! semsg(_("E700: Unknown function: %s"), s); else { int dict_idx = 0; --- 4113,4119 ---- else if (trans_name != NULL && (is_funcref ? find_func(trans_name, is_global, NULL) == NULL : !translated_function_exists(trans_name, is_global))) ! semsg(_(e_unknown_function_str_2), s); else { int dict_idx = 0; *************** *** 6779,6785 **** case VAR_JOB: case VAR_CHANNEL: case VAR_INSTR: ! emsg(_("E701: Invalid type for len()")); break; } } --- 6779,6785 ---- case VAR_JOB: case VAR_CHANNEL: case VAR_INSTR: ! emsg(_(e_invalid_type_for_len)); break; } } *************** *** 7836,7844 **** if (error) return; // type error; errmsg already given if (stride == 0) ! emsg(_("E726: Stride is zero")); else if (stride > 0 ? end + 1 < start : end - 1 > start) ! emsg(_("E727: Start past end")); else if (rettv_list_alloc(rettv) == OK) { list_T *list = rettv->vval.v_list; --- 7836,7844 ---- if (error) return; // type error; errmsg already given if (stride == 0) ! emsg(_(e_stride_is_zero)); else if (stride > 0 ? end + 1 < start : end - 1 > start) ! emsg(_(e_start_past_end)); else if (rettv_list_alloc(rettv) == OK) { list_T *list = rettv->vval.v_list; *** ../vim-8.2.4004/src/evalvars.c 2022-01-02 20:20:41.373033185 +0000 --- src/evalvars.c 2022-01-04 21:19:25.731278388 +0000 *************** *** 964,975 **** i = list_len(l); if (semicolon == 0 && var_count < i) { ! emsg(_("E687: Less targets than List items")); return FAIL; } if (var_count - semicolon > i) { ! emsg(_("E688: More targets than List items")); return FAIL; } --- 964,975 ---- i = list_len(l); if (semicolon == 0 && var_count < i) { ! emsg(_(e_less_targets_than_list_items)); return FAIL; } if (var_count - semicolon > i) { ! emsg(_(e_more_targets_than_list_items)); return FAIL; } *************** *** 1256,1262 **** case 's': list_script_vars(first); break; case 'l': list_func_vars(first); break; default: ! semsg(_("E738: Can't list variables for %s"), name); } } else --- 1256,1262 ---- case 's': list_script_vars(first); break; case 'l': list_func_vars(first); break; default: ! semsg(_(e_cant_list_variables_for_str), name); } } else *************** *** 3691,3698 **** && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':') ? name[2] : name[0])) { ! semsg(_("E704: Funcref variable name must start with a capital: %s"), ! name); return TRUE; } // Don't allow hiding a function. When "v" is not NULL we might be --- 3691,3697 ---- && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':') ? name[2] : name[0])) { ! semsg(_(e_funcref_variable_name_must_start_with_capital_str), name); return TRUE; } // Don't allow hiding a function. When "v" is not NULL we might be *************** *** 3700,3706 **** // below. if (new_var && function_exists(name, FALSE)) { ! semsg(_("E705: Variable name conflicts with existing function: %s"), name); return TRUE; } --- 3699,3705 ---- // below. if (new_var && function_exists(name, FALSE)) { ! semsg(_(e_variable_name_conflicts_with_existing_function_str), name); return TRUE; } *** ../vim-8.2.4004/src/ex_cmds2.c 2021-12-31 17:25:44.040304835 +0000 --- src/ex_cmds2.c 2022-01-04 20:46:31.730288418 +0000 *************** *** 761,767 **** sprintf((char *)buf, "compiler/%s.vim", eap->arg); if (source_runtime(buf, DIP_ALL) == FAIL) ! semsg(_("E666: compiler not supported: %s"), eap->arg); vim_free(buf); do_cmdline_cmd((char_u *)":delcommand CompilerSet"); --- 761,767 ---- sprintf((char *)buf, "compiler/%s.vim", eap->arg); if (source_runtime(buf, DIP_ALL) == FAIL) ! semsg(_(e_compiler_not_supported_str), eap->arg); vim_free(buf); do_cmdline_cmd((char_u *)":delcommand CompilerSet"); *** ../vim-8.2.4004/src/ex_docmd.c 2022-01-04 19:57:50.926919998 +0000 --- src/ex_docmd.c 2022-01-04 21:19:57.559198489 +0000 *************** *** 8273,8279 **** { if (vim_mkdir(name, prot) != 0) { ! semsg(_("E739: Cannot create directory: %s"), name); return FAIL; } return OK; --- 8273,8279 ---- { if (vim_mkdir(name, prot) != 0) { ! semsg(_(e_cannot_create_directory_str), name); return FAIL; } return OK; *** ../vim-8.2.4004/src/ex_eval.c 2022-01-04 19:57:50.926919998 +0000 --- src/ex_eval.c 2022-01-04 21:20:43.015086959 +0000 *************** *** 1406,1414 **** // If we are in a ":while" or ":for" but used the wrong endloop // command, do not rewind to the next enclosing ":for"/":while". if (fl & CSF_WHILE) ! eap->errmsg = _("E732: Using :endfor with :while"); else if (fl & CSF_FOR) ! eap->errmsg = _("E733: Using :endwhile with :for"); } if (!(fl & (CSF_WHILE | CSF_FOR))) { --- 1406,1414 ---- // If we are in a ":while" or ":for" but used the wrong endloop // command, do not rewind to the next enclosing ":for"/":while". if (fl & CSF_WHILE) ! eap->errmsg = _(e_using_endfor_with_while); else if (fl & CSF_FOR) ! eap->errmsg = _(e_using_endwhile_with_for); } if (!(fl & (CSF_WHILE | CSF_FOR))) { *** ../vim-8.2.4004/src/filepath.c 2022-01-02 17:00:37.002093302 +0000 --- src/filepath.c 2022-01-04 20:41:50.222232600 +0000 *************** *** 2056,2062 **** { vim_free(p); vim_free(remain); ! emsg(_("E655: Too many symbolic links (cycle?)")); rettv->vval.v_string = NULL; goto fail; } --- 2056,2062 ---- { vim_free(p); vim_free(remain); ! emsg(_(e_too_many_symbolic_links_cycle)); rettv->vval.v_string = NULL; goto fail; } *** ../vim-8.2.4004/src/gui.c 2022-01-02 21:26:12.315264334 +0000 --- src/gui.c 2022-01-04 20:47:09.386278077 +0000 *************** *** 682,688 **** gui_init_font(*p_guifont == NUL ? hl_get_font_name() : p_guifont, FALSE) == FAIL) { ! emsg(_("E665: Cannot start GUI, no valid font found")); goto error2; } if (gui_get_wide_font() == FAIL) --- 682,688 ---- gui_init_font(*p_guifont == NUL ? hl_get_font_name() : p_guifont, FALSE) == FAIL) { ! emsg(_(e_cannot_start_gui_no_valid_font_found)); goto error2; } if (gui_get_wide_font() == FAIL) *** ../vim-8.2.4004/src/gui_w32.c 2022-01-01 19:33:46.769076797 +0000 --- src/gui_w32.c 2022-01-04 20:52:00.714102712 +0000 *************** *** 4965,4971 **** EnumWindows(FindWindowTitle, (LPARAM)title); if (vim_parent_hwnd == NULL) { ! semsg(_("E671: Cannot find window title \"%s\""), title); mch_exit(2); } } --- 4965,4971 ---- EnumWindows(FindWindowTitle, (LPARAM)title); if (vim_parent_hwnd == NULL) { ! semsg(_(e_cannot_find_window_title_str), title); mch_exit(2); } } *************** *** 5303,5309 **** #endif if (s_hwnd == NULL) { ! emsg(_("E672: Unable to open window inside MDI application")); mch_exit(2); } } --- 5303,5309 ---- #endif if (s_hwnd == NULL) { ! emsg(_(e_unable_to_open_window_inside_mdi_application)); mch_exit(2); } } *** ../vim-8.2.4004/src/hardcopy.c 2022-01-04 19:57:50.930919989 +0000 --- src/hardcopy.c 2022-01-04 20:54:23.137971511 +0000 *************** *** 2417,2423 **** // Check encoding and character set are compatible if ((p_mbenc->needs_charset & p_mbchar->has_charset) == 0) { ! emsg(_("E673: Incompatible multi-byte encoding and character set.")); return FALSE; } --- 2417,2423 ---- // Check encoding and character set are compatible if ((p_mbenc->needs_charset & p_mbchar->has_charset) == 0) { ! emsg(_(e_incompatible_multi_byte_encoding_and_character_set)); return FALSE; } *************** *** 2434,2440 **** // Add custom CMap character set name if (*p_pmcs == NUL) { ! emsg(_("E674: printmbcharset cannot be empty with multi-byte encoding.")); return FALSE; } vim_strncpy((char_u *)prt_cmap, p_pmcs, sizeof(prt_cmap) - 3); --- 2434,2440 ---- // Add custom CMap character set name if (*p_pmcs == NUL) { ! emsg(_(e_printmbcharset_cannot_be_empty_with_multi_byte_encoding)); return FALSE; } vim_strncpy((char_u *)prt_cmap, p_pmcs, sizeof(prt_cmap) - 3); *************** *** 2452,2458 **** if (!mbfont_opts[OPT_MBFONT_REGULAR].present) { ! emsg(_("E675: No default font specified for multi-byte printing.")); return FALSE; } --- 2452,2458 ---- if (!mbfont_opts[OPT_MBFONT_REGULAR].present) { ! emsg(_(e_no_default_font_specified_for_multi_byte_printing)); return FALSE; } *** ../vim-8.2.4004/src/help.c 2022-01-04 16:44:52.980024484 +0000 --- src/help.c 2022-01-04 20:55:11.029922559 +0000 *************** *** 104,110 **** { #ifdef FEAT_MULTI_LANG if (lang != NULL) ! semsg(_("E661: Sorry, no '%s' help for %s"), lang, arg); else #endif semsg(_(e_sorry_no_help_for_str), arg); --- 104,110 ---- { #ifdef FEAT_MULTI_LANG if (lang != NULL) ! semsg(_(e_sorry_no_str_help_for_str), lang, arg); else #endif semsg(_(e_sorry_no_help_for_str), arg); *************** *** 1058,1064 **** utf8 = this_utf8; else if (utf8 != this_utf8) { ! semsg(_("E670: Mix of help file encodings within a language: %s"), files[fi]); mix = !got_int; got_int = TRUE; } --- 1058,1064 ---- utf8 = this_utf8; else if (utf8 != this_utf8) { ! semsg(_(e_mix_of_help_file_encodings_within_language_str), files[fi]); mix = !got_int; got_int = TRUE; } *** ../vim-8.2.4004/src/highlight.c 2022-01-02 20:20:41.377033186 +0000 --- src/highlight.c 2022-01-04 20:55:52.377878636 +0000 *************** *** 447,453 **** static int recursive = 0; if (recursive >= 5) ! emsg(_("E679: recursive loop loading syncolor.vim")); else { ++recursive; --- 447,453 ---- static int recursive = 0; if (recursive >= 5) ! emsg(_(e_recursive_loop_loading_syncolor_vim)); else { ++recursive; *************** *** 3443,3449 **** { if (!vim_isprintc(*p)) { ! emsg(_("E669: Unprintable character in group name")); vim_free(name); return 0; } --- 3443,3449 ---- { if (!vim_isprintc(*p)) { ! emsg(_(e_unprintable_character_in_group_name)); vim_free(name); return 0; } *** ../vim-8.2.4004/src/if_python.c 2022-01-01 21:59:11.030521935 +0000 --- src/if_python.c 2022-01-04 20:43:07.778275281 +0000 *************** *** 1024,1030 **** #ifndef PY_CAN_RECURSE if (recursive) { ! emsg(_("E659: Cannot invoke Python recursively")); return; } ++recursive; --- 1024,1030 ---- #ifndef PY_CAN_RECURSE if (recursive) { ! emsg(_(e_cannot_invoke_python_recursively)); return; } ++recursive; *** ../vim-8.2.4004/src/list.c 2022-01-04 15:54:34.592486131 +0000 --- src/list.c 2022-01-04 21:08:35.632896935 +0000 *************** *** 1542,1548 **** semsg(_(e_no_white_space_allowed_before_str_str), ",", *arg); else ! semsg(_("E696: Missing comma in List: %s"), *arg); } goto failret; } --- 1542,1548 ---- semsg(_(e_no_white_space_allowed_before_str_str), ",", *arg); else ! semsg(_(e_missing_comma_in_list_str), *arg); } goto failret; } *************** *** 2002,2008 **** || info->item_compare_partial != NULL) && item_compare2((void *)&ptrs[0], (void *)&ptrs[1]) == ITEM_COMPARE_FAIL) ! emsg(_("E702: Sort compare function failed")); else { // Sort the array with item pointers. --- 2002,2008 ---- || info->item_compare_partial != NULL) && item_compare2((void *)&ptrs[0], (void *)&ptrs[1]) == ITEM_COMPARE_FAIL) ! emsg(_(e_sort_compare_function_failed)); else { // Sort the array with item pointers. *** ../vim-8.2.4004/src/misc1.c 2022-01-01 14:19:44.048353841 +0000 --- src/misc1.c 2022-01-04 20:56:17.525851222 +0000 *************** *** 2447,2453 **** err = TRUE; if (err) { ! emsg(_("E677: Error writing temp file")); goto errret; } } --- 2447,2453 ---- err = TRUE; if (err) { ! emsg(_(e_error_writing_temp_file)); goto errret; } } *** ../vim-8.2.4004/src/normal.c 2022-01-03 13:47:45.960911768 +0000 --- src/normal.c 2022-01-04 20:49:30.306211981 +0000 *************** *** 5627,5637 **** else if (cap->cmdchar == 'g') { if (curbuf->b_changelistlen == 0) ! emsg(_("E664: changelist is empty")); else if (cap->count1 < 0) ! emsg(_("E662: At start of changelist")); else ! emsg(_("E663: At end of changelist")); } else clearopbeep(cap->oap); --- 5627,5637 ---- else if (cap->cmdchar == 'g') { if (curbuf->b_changelistlen == 0) ! emsg(_(e_changelist_is_empty)); else if (cap->count1 < 0) ! emsg(_(e_at_start_of_changelist)); else ! emsg(_(e_at_end_of_changelist)); } else clearopbeep(cap->oap); *** ../vim-8.2.4004/src/quickfix.c 2022-01-02 21:26:12.319264330 +0000 --- src/quickfix.c 2022-01-04 21:01:17.293491505 +0000 *************** *** 6116,6122 **** p = skipwhite(p); if (*p == NUL) { ! emsg(_("E683: File name missing or invalid pattern")); return FAIL; } --- 6116,6122 ---- p = skipwhite(p); if (*p == NUL) { ! emsg(_(e_file_name_missing_or_invalid_pattern)); return FAIL; } *************** *** 7785,7791 **** if (buf->b_ml.ml_mfp == NULL) { ! emsg(_("E681: Buffer is not loaded")); return FAIL; } --- 7785,7791 ---- if (buf->b_ml.ml_mfp == NULL) { ! emsg(_(e_buffer_is_not_loaded)); return FAIL; } *** ../vim-8.2.4004/src/regexp.c 2022-01-02 21:26:12.319264330 +0000 --- src/regexp.c 2022-01-04 20:43:41.830286761 +0000 *************** *** 552,558 **** if (*p != delim) { ! semsg(_("E654: missing delimiter after search pattern: %s"), startp); return NULL; } return p; --- 552,558 ---- if (*p != delim) { ! semsg(_(e_missing_delimiter_after_search_pattern_str), startp); return NULL; } return p; *** ../vim-8.2.4004/src/regexp_bt.c 2022-01-02 17:00:37.002093302 +0000 --- src/regexp_bt.c 2022-01-04 20:57:24.489775786 +0000 *************** *** 1612,1619 **** if (i < 0 || i > INT_MAX) EMSG2_RET_NULL( ! _("E678: Invalid character after %s%%[dxouU]"), ! reg_magic == MAGIC_ALL); if (use_multibytecode(i)) ret = regnode(MULTIBYTECODE); else --- 1612,1619 ---- if (i < 0 || i > INT_MAX) EMSG2_RET_NULL( ! _(e_invalid_character_after_str_2), ! reg_magic == MAGIC_ALL); if (use_multibytecode(i)) ret = regnode(MULTIBYTECODE); else *** ../vim-8.2.4004/src/regexp_nfa.c 2022-01-01 15:58:19.118486361 +0000 --- src/regexp_nfa.c 2022-01-04 20:58:04.377729321 +0000 *************** *** 1638,1646 **** } if (nr < 0 || nr > INT_MAX) ! EMSG2_RET_FAIL( ! _("E678: Invalid character after %s%%[dxouU]"), ! reg_magic == MAGIC_ALL); // A NUL is stored in the text as NL // TODO: what if a composing character follows? EMIT(nr == 0 ? 0x0a : nr); --- 1638,1645 ---- } if (nr < 0 || nr > INT_MAX) ! EMSG2_RET_FAIL(_(e_invalid_character_after_str_2), ! reg_magic == MAGIC_ALL); // A NUL is stored in the text as NL // TODO: what if a composing character follows? EMIT(nr == 0 ? 0x0a : nr); *** ../vim-8.2.4004/src/typval.c 2022-01-04 19:57:50.930919989 +0000 --- src/typval.c 2022-01-04 21:21:34.646963612 +0000 *************** *** 196,202 **** #endif case VAR_FUNC: case VAR_PARTIAL: ! emsg(_("E703: Using a Funcref as a Number")); break; case VAR_STRING: if (in_vim9script()) --- 196,202 ---- #endif case VAR_FUNC: case VAR_PARTIAL: ! emsg(_(e_using_funcref_as_number)); break; case VAR_STRING: if (in_vim9script()) *************** *** 212,218 **** emsg(_("E745: Using a List as a Number")); break; case VAR_DICT: ! emsg(_("E728: Using a Dictionary as a Number")); break; case VAR_BOOL: case VAR_SPECIAL: --- 212,218 ---- emsg(_("E745: Using a List as a Number")); break; case VAR_DICT: ! emsg(_(e_using_dictionary_as_number)); break; case VAR_BOOL: case VAR_SPECIAL: *************** *** 927,939 **** return buf; case VAR_FUNC: case VAR_PARTIAL: ! emsg(_("E729: Using a Funcref as a String")); break; case VAR_LIST: ! emsg(_("E730: Using a List as a String")); break; case VAR_DICT: ! emsg(_("E731: Using a Dictionary as a String")); break; case VAR_FLOAT: #ifdef FEAT_FLOAT --- 927,939 ---- return buf; case VAR_FUNC: case VAR_PARTIAL: ! emsg(_(e_using_funcref_as_string)); break; case VAR_LIST: ! emsg(_(e_using_list_as_string)); break; case VAR_DICT: ! emsg(_(e_using_dictionary_as_string)); break; case VAR_FLOAT: #ifdef FEAT_FLOAT *************** *** 1345,1353 **** || (type != EXPR_EQUAL && type != EXPR_NEQUAL)) { if (tv1->v_type != tv2->v_type) ! emsg(_("E691: Can only compare List with List")); else ! emsg(_("E692: Invalid operation for List")); return FAIL; } else --- 1345,1353 ---- || (type != EXPR_EQUAL && type != EXPR_NEQUAL)) { if (tv1->v_type != tv2->v_type) ! emsg(_(e_can_only_compare_list_with_list)); else ! emsg(_(e_invalid_operation_for_list)); return FAIL; } else *************** *** 1427,1435 **** || (type != EXPR_EQUAL && type != EXPR_NEQUAL)) { if (tv1->v_type != tv2->v_type) ! emsg(_("E735: Can only compare Dictionary with Dictionary")); else ! emsg(_("E736: Invalid operation for Dictionary")); return FAIL; } else --- 1427,1435 ---- || (type != EXPR_EQUAL && type != EXPR_NEQUAL)) { if (tv1->v_type != tv2->v_type) ! emsg(_(e_can_only_compare_dictionary_with_dictionary)); else ! emsg(_(e_invalid_operation_for_dictionary)); return FAIL; } else *************** *** 1460,1466 **** if (type != EXPR_EQUAL && type != EXPR_NEQUAL && type != EXPR_IS && type != EXPR_ISNOT) { ! emsg(_("E694: Invalid operation for Funcrefs")); return FAIL; } if ((tv1->v_type == VAR_PARTIAL && tv1->vval.v_partial == NULL) --- 1460,1466 ---- if (type != EXPR_EQUAL && type != EXPR_NEQUAL && type != EXPR_IS && type != EXPR_ISNOT) { ! emsg(_(e_invalid_operation_for_funcrefs)); return FAIL; } if ((tv1->v_type == VAR_PARTIAL && tv1->vval.v_partial == NULL) *** ../vim-8.2.4004/src/userfunc.c 2022-01-02 20:20:41.381033185 +0000 --- src/userfunc.c 2022-01-04 21:28:24.582076040 +0000 *************** *** 29,37 **** // item in it is still being used. static funccall_T *previous_funccal = NULL; - static char *e_funcdict = N_("E717: Dictionary entry already exists"); - static char *e_funcref = N_("E718: Funcref required"); - static void funccal_unref(funccall_T *fc, ufunc_T *fp, int force); static void func_clear(ufunc_T *fp, int force); static int func_free(ufunc_T *fp, int force); --- 29,34 ---- *************** *** 1802,1808 **** else if (!aborting()) { if (argcount == MAX_FUNC_ARGS) ! emsg_funcname(N_("E740: Too many arguments for function %s"), name); else emsg_funcname(e_invalid_arguments_for_function_str, name); } --- 1799,1805 ---- else if (!aborting()) { if (argcount == MAX_FUNC_ARGS) ! emsg_funcname(e_too_many_arguments_for_function_str_2, name); else emsg_funcname(e_invalid_arguments_for_function_str, name); } *************** *** 3156,3162 **** { if (argc == MAX_FUNC_ARGS - (partial == NULL ? 0 : partial->pt_argc)) { ! emsg(_("E699: Too many arguments")); break; } // Make a copy of each argument. This is needed to be able to set --- 3153,3159 ---- { if (argc == MAX_FUNC_ARGS - (partial == NULL ? 0 : partial->pt_argc)) { ! emsg(_(e_too_many_arguments)); break; } // Make a copy of each argument. This is needed to be able to set *************** *** 3274,3294 **** emsg_funcname(e_function_was_deleted_str, name); break; case FCERR_TOOMANY: ! emsg_funcname((char *)e_too_many_arguments_for_function_str, ! name); break; case FCERR_TOOFEW: ! emsg_funcname((char *)e_not_enough_arguments_for_function_str, ! name); break; case FCERR_SCRIPT: emsg_funcname( e_using_sid_not_in_script_context_str, name); break; case FCERR_DICT: ! emsg_funcname( ! N_("E725: Calling dict function without Dictionary: %s"), ! name); break; } } --- 3271,3288 ---- emsg_funcname(e_function_was_deleted_str, name); break; case FCERR_TOOMANY: ! emsg_funcname(e_too_many_arguments_for_function_str, name); break; case FCERR_TOOFEW: ! emsg_funcname(e_not_enough_arguments_for_function_str, name); break; case FCERR_SCRIPT: emsg_funcname( e_using_sid_not_in_script_context_str, name); break; case FCERR_DICT: ! emsg_funcname(e_calling_dict_function_without_dictionary_str, ! name); break; } } *************** *** 3725,3731 **** { if (!skip && !(flags & TFN_QUIET) && (fdp == NULL || lv.ll_dict == NULL || fdp->fd_newkey == NULL)) ! emsg(_(e_funcref)); else *pp = end; name = NULL; --- 3719,3725 ---- { if (!skip && !(flags & TFN_QUIET) && (fdp == NULL || lv.ll_dict == NULL || fdp->fd_newkey == NULL)) ! emsg(_(e_funcref_required)); else *pp = end; name = NULL; *************** *** 4258,4264 **** : eval_isnamec(name_base[i])); ++i) ; if (name_base[i] != NUL) ! emsg_funcname((char *)e_invalid_argument_str, arg); // In Vim9 script a function cannot have the same name as a // variable. --- 4252,4258 ---- : eval_isnamec(name_base[i])); ++i) ; if (name_base[i] != NUL) ! emsg_funcname(e_invalid_argument_str, arg); // In Vim9 script a function cannot have the same name as a // variable. *************** *** 4344,4350 **** p += 7; if (current_funccal == NULL) { ! emsg_funcname(N_("E932: Closure function should not be at top level: %s"), name == NULL ? (char_u *)"" : name); goto erret; } --- 4338,4344 ---- p += 7; if (current_funccal == NULL) { ! emsg_funcname(e_closure_function_should_not_be_at_top_level, name == NULL ? (char_u *)"" : name); goto erret; } *************** *** 4378,4384 **** if (!eap->skip && !eap->forceit) { if (fudi.fd_dict != NULL && fudi.fd_newkey == NULL) ! emsg(_(e_funcdict)); else if (name != NULL && find_func(name, is_global, NULL) != NULL) emsg_funcname(e_function_str_already_exists_add_bang_to_replace, name); } --- 4372,4378 ---- if (!eap->skip && !eap->forceit) { if (fudi.fd_dict != NULL && fudi.fd_newkey == NULL) ! emsg(_(e_dictionary_entry_already_exists)); else if (name != NULL && find_func(name, is_global, NULL) != NULL) emsg_funcname(e_function_str_already_exists_add_bang_to_replace, name); } *************** *** 4409,4416 **** v = find_var(name, &ht, TRUE); if (v != NULL && v->di_tv.v_type == VAR_FUNC) { ! emsg_funcname(N_("E707: Function name conflicts with variable: %s"), ! name); goto erret; } --- 4403,4409 ---- v = find_var(name, &ht, TRUE); if (v != NULL && v->di_tv.v_type == VAR_FUNC) { ! emsg_funcname(e_function_name_conflicts_with_variable_str, name); goto erret; } *************** *** 4481,4487 **** fp = NULL; if (fudi.fd_newkey == NULL && !eap->forceit) { ! emsg(_(e_funcdict)); goto erret; } if (fudi.fd_di == NULL) --- 4474,4480 ---- fp = NULL; if (fudi.fd_newkey == NULL && !eap->forceit) { ! emsg(_(e_dictionary_entry_already_exists)); goto erret; } if (fudi.fd_di == NULL) *************** *** 4893,4899 **** if (name == NULL) { if (fudi.fd_dict != NULL && !eap->skip) ! emsg(_(e_funcref)); return; } if (!ends_excmd(*skipwhite(p))) --- 4886,4892 ---- if (name == NULL) { if (fudi.fd_dict != NULL && !eap->skip) ! emsg(_(e_funcref_required)); return; } if (!ends_excmd(*skipwhite(p))) *** ../vim-8.2.4004/src/version.c 2022-01-04 20:05:00.098011230 +0000 --- src/version.c 2022-01-04 21:28:40.674043625 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4005, /**/ -- hundred-and-one symptoms of being an internet addict: 222. You send more than 20 personal e-mails a day. /// 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 ///