Patch 8.2.3190
Problem: Error messages are spread out.
Solution: Move error messages to errors.h and give them a clear name.
Files: src/globals.h, src/errors.h, src/buffer.c, src/debugger.c,
src/digraph.c, src/edit.c, src/ex_cmds.c, src/ex_cmds2.c,
src/ex_docmd.c, src/ex_eval.c, src/gui.c, src/list.c, src/main.c,
src/map.c, src/match.c, src/quickfix.c, src/regexp.c,
src/regexp_bt.c, src/regexp_nfa.c, src/register.c, src/search.c,
src/session.c, src/spell.c, src/syntax.c, src/time.c,
src/userfunc.c, src/vim9execute.c, src/window.c
*** ../vim-8.2.3189/src/globals.h 2021-07-20 17:51:48.243744105 +0200
--- src/globals.h 2021-07-20 19:57:43.044044097 +0200
***************
*** 1636,1665 ****
EXTERN char e_loadfunc[] INIT(= N_("E448: Could not load library
function %s"));
#endif
EXTERN char e_nobang[] INIT(= N_("E477: No ! allowed"));
- #if !defined(FEAT_GUI) || defined(VIMDLL)
- EXTERN char e_nogvim[] INIT(= N_("E25: GUI cannot be used: Not enabled
at compile time"));
- #endif
- #ifndef FEAT_RIGHTLEFT
- EXTERN char e_nohebrew[] INIT(= N_("E26: Hebrew cannot be used: Not
enabled at compile time\n"));
- #endif
- EXTERN char e_nofarsi[] INIT(= N_("E27: Farsi support has been
removed\n"));
#ifndef FEAT_ARABIC
EXTERN char e_noarabic[] INIT(= N_("E800: Arabic cannot be used: Not
enabled at compile time\n"));
#endif
- #if defined(FEAT_SEARCH_EXTRA) || defined(FEAT_SYN_HL)
- EXTERN char e_nogroup[] INIT(= N_("E28: No such highlight group name:
%s"));
- #endif
- EXTERN char e_noinstext[] INIT(= N_("E29: No inserted text yet"));
- EXTERN char e_nolastcmd[] INIT(= N_("E30: No previous command line"));
- EXTERN char e_nomap[] INIT(= N_("E31: No such mapping"));
EXTERN char e_nomatch[] INIT(= N_("E479: No match"));
EXTERN char e_nomatch2[] INIT(= N_("E480: No match: %s"));
- EXTERN char e_noname[] INIT(= N_("E32: No file name"));
- EXTERN char e_nopresub[] INIT(= N_("E33: No previous substitute regular
expression"));
- EXTERN char e_noprev[] INIT(= N_("E34: No previous command"));
- EXTERN char e_noprevre[] INIT(= N_("E35: No previous regular
expression"));
EXTERN char e_norange[] INIT(= N_("E481: No range allowed"));
- EXTERN char e_noroom[] INIT(= N_("E36: Not enough room"));
#ifdef FEAT_CLIENTSERVER
EXTERN char e_noserver[] INIT(= N_("E247: no registered server named
\"%s\""));
#endif
--- 1636,1647 ----
***************
*** 1667,1683 ****
EXTERN char e_notmp[] INIT(= N_("E483: Can't get temp file name"));
EXTERN char e_notopen[] INIT(= N_("E484: Can't open file %s"));
EXTERN char e_notread[] INIT(= N_("E485: Can't read file %s"));
- EXTERN char e_null[] INIT(= N_("E38: Null argument"));
- #if defined(FEAT_DIGRAPHS) || defined(FEAT_TIMERS) || defined(FEAT_EVAL)
- EXTERN char e_number_exp[] INIT(= N_("E39: Number expected"));
- #endif
- #ifdef FEAT_QUICKFIX
- EXTERN char e_openerrf[] INIT(= N_("E40: Can't open errorfile %s"));
- #endif
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
EXTERN char e_opendisp[] INIT(= N_("E233: cannot open display"));
#endif
- EXTERN char e_outofmem[] INIT(= N_("E41: Out of memory!"));
EXTERN char e_patnotf[] INIT(= N_("Pattern not found"));
EXTERN char e_patnotf2[] INIT(= N_("E486: Pattern not found: %s"));
EXTERN char e_positive[] INIT(= N_("E487: Argument must be positive"));
--- 1649,1657 ----
***************
*** 1686,1697 ****
#endif
#ifdef FEAT_QUICKFIX
- EXTERN char e_quickfix[] INIT(= N_("E42: No Errors"));
EXTERN char e_loclist[] INIT(= N_("E776: No location list"));
#endif
- EXTERN char e_re_damg[] INIT(= N_("E43: Damaged match string"));
- EXTERN char e_re_corr[] INIT(= N_("E44: Corrupted regexp
program"));
- EXTERN char e_readonly[] INIT(= N_("E45: 'readonly' option is set (add !
to override)"));
#ifdef FEAT_EVAL
EXTERN char e_letwrong[] INIT(= N_("E734: Wrong variable type for %s="));
EXTERN char e_illvar[] INIT(= N_("E461: Illegal variable name:
%s"));
--- 1660,1667 ----
*** ../vim-8.2.3189/src/errors.h 2021-07-20 17:51:48.239744107 +0200
--- src/errors.h 2021-07-20 21:04:44.368332722 +0200
***************
*** 48,54 ****
--- 48,110 ----
INIT(= N_("E23: No alternate file"));
EXTERN char e_no_such_abbreviation[]
INIT(= N_("E24: No such abbreviation"));
+ #if !defined(FEAT_GUI) || defined(VIMDLL)
+ EXTERN char e_gui_cannot_be_used_not_enabled_at_compile_time[]
+ INIT(= N_("E25: GUI cannot be used: Not enabled at compile time"));
+ #endif
+ #ifndef FEAT_RIGHTLEFT
+ EXTERN char e_hebrew_cannot_be_used_not_enabled_at_compile_time[]
+ INIT(= N_("E26: Hebrew cannot be used: Not enabled at compile time\n"));
+ #endif
+ EXTERN char e_farsi_support_has_been_removed[]
+ INIT(= N_("E27: Farsi support has been removed\n"));
#ifdef FEAT_EVAL
+ #if defined(FEAT_SEARCH_EXTRA) || defined(FEAT_SYN_HL)
+ EXTERN char e_no_such_highlight_group_name_str[]
+ INIT(= N_("E28: No such highlight group name: %s"));
+ #endif
+ EXTERN char e_no_inserted_text_yet[]
+ INIT(= N_("E29: No inserted text yet"));
+ EXTERN char e_no_previous_command_line[]
+ INIT(= N_("E30: No previous command line"));
+ EXTERN char e_no_such_mapping[]
+ INIT(= N_("E31: No such mapping"));
+ EXTERN char e_no_file_name[]
+ INIT(= N_("E32: No file name"));
+ EXTERN char e_no_previous_substitute_regular_expression[]
+ INIT(= N_("E33: No previous substitute regular expression"));
+ EXTERN char e_no_previous_command[]
+ INIT(= N_("E34: No previous command"));
+ EXTERN char e_no_previous_regular_expression[]
+ INIT(= N_("E35: No previous regular expression"));
+ EXTERN char e_not_enough_room[]
+ INIT(= N_("E36: Not enough room"));
+ EXTERN char e_no_write_since_last_change[]
+ INIT(= N_("E37: No write since last change"));
+ EXTERN char e_no_write_since_last_change_add_bang_to_override[]
+ INIT(= N_("E37: No write since last change (add ! to override)"));
+ EXTERN char e_null_argument[]
+ INIT(= N_("E38: Null argument"));
+ #if defined(FEAT_DIGRAPHS) || defined(FEAT_TIMERS) || defined(FEAT_EVAL)
+ EXTERN char e_number_expected[]
+ INIT(= N_("E39: Number expected"));
+ #endif
+ #ifdef FEAT_QUICKFIX
+ EXTERN char e_cant_open_errorfile_str[]
+ INIT(= N_("E40: Can't open errorfile %s"));
+ #endif
+ EXTERN char e_out_of_memory[]
+ INIT(= N_("E41: Out of memory!"));
+ #ifdef FEAT_QUICKFIX
+ EXTERN char e_no_errors[]
+ INIT(= N_("E42: No Errors"));
+ #endif
+ EXTERN char e_damaged_match_string[]
+ INIT(= N_("E43: Damaged match string"));
+ EXTERN char e_corrupted_regexp_program[]
+ INIT(= N_("E44: Corrupted regexp program"));
+ EXTERN char e_readonly_option_is_set_add_bang_to_override[]
+ INIT(= N_("E45: 'readonly' option is set (add ! to override)"));
EXTERN char e_undefined_variable_str[]
INIT(= N_("E121: Undefined variable: %s"));
EXTERN char e_undefined_variable_char_str[]
*** ../vim-8.2.3189/src/buffer.c 2021-07-04 13:27:05.964932390 +0200
--- src/buffer.c 2021-07-20 20:00:09.495824691 +0200
***************
*** 1942,1948 ****
emsg(_("E948: Job still running (add ! to end the job)"));
else
#endif
! emsg(_("E37: No write since last change (add ! to override)"));
}
void
--- 1942,1948 ----
emsg(_("E948: Job still running (add ! to end the job)"));
else
#endif
! emsg(_(e_no_write_since_last_change_add_bang_to_override));
}
void
***************
*** 1953,1959 ****
emsg(_("E948: Job still running"));
else
#endif
! emsg(_("E37: No write since last change"));
}
/*
--- 1953,1959 ----
emsg(_("E948: Job still running"));
else
#endif
! emsg(_(e_no_write_since_last_change));
}
/*
*** ../vim-8.2.3189/src/debugger.c 2021-06-20 19:28:10.273021391 +0200
--- src/debugger.c 2021-07-20 20:02:58.759432656 +0200
***************
*** 562,568 ****
{
if (curbuf->b_ffname == NULL)
{
! emsg(_(e_noname));
return FAIL;
}
bp->dbg_type = DBG_FILE;
--- 562,568 ----
{
if (curbuf->b_ffname == NULL)
{
! emsg(_(e_no_file_name));
return FAIL;
}
bp->dbg_type = DBG_FILE;
*** ../vim-8.2.3189/src/digraph.c 2021-07-19 20:07:16.697295626 +0200
--- src/digraph.c 2021-07-20 20:11:23.777678909 +0200
***************
*** 2074,2080 ****
str = skipwhite(str);
if (!VIM_ISDIGIT(*str))
{
! emsg(_(e_number_exp));
return;
}
n = getdigits(&str);
--- 2074,2080 ----
str = skipwhite(str);
if (!VIM_ISDIGIT(*str))
{
! emsg(_(e_number_expected));
return;
}
n = getdigits(&str);
***************
*** 2571,2577 ****
buflen = STRLEN(curbuf->b_p_keymap) + STRLEN(p_enc) + 14;
buf = alloc(buflen);
if (buf == NULL)
! return e_outofmem;
// try finding "keymap/'keymap'_'encoding'.vim" in 'runtimepath'
vim_snprintf((char *)buf, buflen, "keymap/%s_%s.vim",
--- 2571,2577 ----
buflen = STRLEN(curbuf->b_p_keymap) + STRLEN(p_enc) + 14;
buf = alloc(buflen);
if (buf == NULL)
! return e_out_of_memory;
// try finding "keymap/'keymap'_'encoding'.vim" in 'runtimepath'
vim_snprintf((char *)buf, buflen, "keymap/%s_%s.vim",
*** ../vim-8.2.3189/src/edit.c 2021-06-29 20:22:27.651393066 +0200
--- src/edit.c 2021-07-20 19:54:33.816326774 +0200
***************
*** 2874,2880 ****
ptr = get_last_insert();
if (ptr == NULL)
{
! emsg(_(e_noinstext));
return FAIL;
}
--- 2874,2880 ----
ptr = get_last_insert();
if (ptr == NULL)
{
! emsg(_(e_no_inserted_text_yet));
return FAIL;
}
*** ../vim-8.2.3189/src/ex_cmds.c 2021-06-27 22:03:28.641707728 +0200
--- src/ex_cmds.c 2021-07-20 21:05:00.432306743 +0200
***************
*** 466,472 ****
{
if (last_search_pat() == NULL)
{
! emsg(_(e_noprevre));
goto sortend;
}
regmatch.regprog = vim_regcomp(last_search_pat(), RE_MAGIC);
--- 466,472 ----
{
if (last_search_pat() == NULL)
{
! emsg(_(e_no_previous_regular_expression));
goto sortend;
}
regmatch.regprog = vim_regcomp(last_search_pat(), RE_MAGIC);
***************
*** 935,941 ****
{
if (prevcmd == NULL)
{
! emsg(_(e_noprev));
vim_free(newcmd);
return;
}
--- 935,941 ----
{
if (prevcmd == NULL)
{
! emsg(_(e_no_previous_command));
vim_free(newcmd);
return;
}
***************
*** 2356,2362 ****
else
#endif
if (buf->b_p_ro)
! emsg(_(e_readonly));
else
semsg(_("E505: \"%s\" is read-only (add ! to override)"),
buf->b_fname);
--- 2356,2362 ----
else
#endif
if (buf->b_p_ro)
! emsg(_(e_readonly_option_is_set_add_bang_to_override));
else
semsg(_("E505: \"%s\" is read-only (add ! to override)"),
buf->b_fname);
***************
*** 3763,3769 ****
{
if (old_sub == NULL) // there is no previous command
{
! emsg(_(e_nopresub));
return;
}
sub = old_sub;
--- 3763,3769 ----
{
if (old_sub == NULL) // there is no previous command
{
! emsg(_(e_no_previous_substitute_regular_expression));
return;
}
sub = old_sub;
***************
*** 3779,3785 ****
{
if (old_sub == NULL) // there is no previous command
{
! emsg(_(e_nopresub));
return;
}
pat = NULL; // search_regcomp() will use previous pattern
--- 3779,3785 ----
{
if (old_sub == NULL) // there is no previous command
{
! emsg(_(e_no_previous_substitute_regular_expression));
return;
}
pat = NULL; // search_regcomp() will use previous pattern
*** ../vim-8.2.3189/src/ex_cmds2.c 2020-10-24 20:49:37.494683051 +0200
--- src/ex_cmds2.c 2021-07-20 20:03:03.691411012 +0200
***************
*** 413,419 ****
{
if (curbuf->b_ffname == NULL)
{
! emsg(_(e_noname));
return FAIL;
}
return OK;
--- 413,419 ----
{
if (curbuf->b_ffname == NULL)
{
! emsg(_(e_no_file_name));
return FAIL;
}
return OK;
*** ../vim-8.2.3189/src/ex_docmd.c 2021-07-20 19:18:40.387377742 +0200
--- src/ex_docmd.c 2021-07-20 20:11:26.793670463 +0200
***************
*** 919,925 ****
next_cmdline = vim_strsave(next_cmdline);
if (next_cmdline == NULL)
{
! emsg(_(e_outofmem));
retval = FAIL;
break;
}
--- 919,925 ----
next_cmdline = vim_strsave(next_cmdline);
if (next_cmdline == NULL)
{
! emsg(_(e_out_of_memory));
retval = FAIL;
break;
}
***************
*** 6959,6965 ****
static void
ex_nogui(exarg_T *eap)
{
! eap->errmsg = _(e_nogvim);
}
#endif
--- 6959,6965 ----
static void
ex_nogui(exarg_T *eap)
{
! eap->errmsg = _(e_gui_cannot_be_used_not_enabled_at_compile_time);
}
#endif
*** ../vim-8.2.3189/src/ex_eval.c 2021-07-10 19:41:59.912341604 +0200
--- src/ex_eval.c 2021-07-20 20:11:38.705637241 +0200
***************
*** 255,261 ****
if (elem == NULL)
{
suppress_errthrow = TRUE;
! emsg(_(e_outofmem));
}
else
{
--- 255,261 ----
if (elem == NULL)
{
suppress_errthrow = TRUE;
! emsg(_(e_out_of_memory));
}
else
{
***************
*** 264,270 ****
{
vim_free(elem);
suppress_errthrow = TRUE;
! emsg(_(e_outofmem));
}
else
{
--- 264,270 ----
{
vim_free(elem);
suppress_errthrow = TRUE;
! emsg(_(e_out_of_memory));
}
else
{
***************
*** 592,598 ****
nomem:
vim_free(excp);
suppress_errthrow = TRUE;
! emsg(_(e_outofmem));
fail:
current_exception = NULL;
return FAIL;
--- 592,598 ----
nomem:
vim_free(excp);
suppress_errthrow = TRUE;
! emsg(_(e_out_of_memory));
fail:
current_exception = NULL;
return FAIL;
***************
*** 1639,1645 ****
elem = ALLOC_ONE(struct eslist_elem);
if (elem == NULL)
! emsg(_(e_outofmem));
else
{
elem->saved_emsg_silent = emsg_silent;
--- 1639,1645 ----
elem = ALLOC_ONE(struct eslist_elem);
if (elem == NULL)
! emsg(_(e_out_of_memory));
else
{
elem->saved_emsg_silent = emsg_silent;
*** ../vim-8.2.3189/src/gui.c 2021-06-23 20:46:46.914256853 +0200
--- src/gui.c 2021-07-20 19:50:22.312700560 +0200
***************
*** 5038,5044 ****
#if defined(VIMDLL) && !defined(EXPERIMENTAL_GUI_CMD)
if (!gui.starting)
{
! emsg(_(e_nogvim));
return;
}
#endif
--- 5038,5044 ----
#if defined(VIMDLL) && !defined(EXPERIMENTAL_GUI_CMD)
if (!gui.starting)
{
! emsg(_(e_gui_cannot_be_used_not_enabled_at_compile_time));
return;
}
#endif
*** ../vim-8.2.3189/src/list.c 2021-07-20 17:51:48.247744104 +0200
--- src/list.c 2021-07-20 20:09:11.710066867 +0200
***************
*** 3049,3055 ****
}
else if (argvars[2].v_type != VAR_NUMBER)
{
! emsg(_(e_number_exp));
return;
}
else
--- 3049,3055 ----
}
else if (argvars[2].v_type != VAR_NUMBER)
{
! emsg(_(e_number_expected));
return;
}
else
*** ../vim-8.2.3189/src/main.c 2021-06-02 15:08:47.334433838 +0200
--- src/main.c 2021-07-20 19:52:10.392540291 +0200
***************
*** 2133,2139 ****
break;
case 'F': // "-F" was for Farsi mode
! mch_errmsg(_(e_nofarsi));
mch_exit(2);
break;
--- 2133,2139 ----
break;
case 'F': // "-F" was for Farsi mode
! mch_errmsg(_(e_farsi_support_has_been_removed));
mch_exit(2);
break;
***************
*** 2151,2157 ****
p_hkmap = TRUE;
set_option_value((char_u *)"rl", 1L, NULL, 0);
#else
! mch_errmsg(_(e_nohebrew));
mch_exit(2);
#endif
break;
--- 2151,2157 ----
p_hkmap = TRUE;
set_option_value((char_u *)"rl", 1L, NULL, 0);
#else
!
mch_errmsg(_(e_hebrew_cannot_be_used_not_enabled_at_compile_time));
mch_exit(2);
#endif
break;
***************
*** 3282,3288 ****
#ifdef FEAT_GUI
gui.starting = TRUE; // start GUI a bit later
#else
! mch_errmsg(_(e_nogvim));
mch_errmsg("\n");
mch_exit(2);
#endif
--- 3282,3288 ----
#ifdef FEAT_GUI
gui.starting = TRUE; // start GUI a bit later
#else
! mch_errmsg(_(e_gui_cannot_be_used_not_enabled_at_compile_time));
mch_errmsg("\n");
mch_exit(2);
#endif
*** ../vim-8.2.3189/src/map.c 2021-07-20 17:51:48.247744104 +0200
--- src/map.c 2021-07-20 19:56:01.588195784 +0200
***************
*** 2723,2729 ****
{
case 1: emsg(_(e_invarg));
break;
! case 2: emsg((isabbrev ? _(e_no_such_abbreviation) : _(e_nomap)));
break;
}
}
--- 2723,2730 ----
{
case 1: emsg(_(e_invarg));
break;
! case 2: emsg((isabbrev ? _(e_no_such_abbreviation)
! : _(e_no_such_mapping)));
break;
}
}
*** ../vim-8.2.3189/src/match.c 2021-07-20 17:51:48.247744104 +0200
--- src/match.c 2021-07-20 19:53:59.592377782 +0200
***************
*** 64,70 ****
}
if ((hlg_id = syn_namen2id(grp, (int)STRLEN(grp))) == 0)
{
! semsg(_(e_nogroup), grp);
return -1;
}
if (pat != NULL && (regprog = vim_regcomp(pat, RE_MAGIC)) == NULL)
--- 64,70 ----
}
if ((hlg_id = syn_namen2id(grp, (int)STRLEN(grp))) == 0)
{
! semsg(_(e_no_such_highlight_group_name_str), grp);
return -1;
}
if (pat != NULL && (regprog = vim_regcomp(pat, RE_MAGIC)) == NULL)
*** ../vim-8.2.3189/src/quickfix.c 2021-07-20 17:51:48.247744104 +0200
--- src/quickfix.c 2021-07-20 20:12:42.037464831 +0200
***************
*** 1571,1577 ****
if (efile != NULL && (pstate->fd = mch_fopen((char *)efile, "r")) == NULL)
{
! semsg(_(e_openerrf), efile);
return FAIL;
}
--- 1571,1577 ----
if (efile != NULL && (pstate->fd = mch_fopen((char *)efile, "r")) == NULL)
{
! semsg(_(e_cant_open_errorfile_str), efile);
return FAIL;
}
***************
*** 3439,3445 ****
if (qf_stack_empty(qi) || qf_list_empty(qf_get_curlist(qi)))
{
! emsg(_(e_quickfix));
return;
}
--- 3439,3445 ----
if (qf_stack_empty(qi) || qf_list_empty(qf_get_curlist(qi)))
{
! emsg(_(e_no_errors));
return;
}
***************
*** 3619,3625 ****
if (qf_stack_empty(qi) || qf_list_empty(qf_get_curlist(qi)))
{
! emsg(_(e_quickfix));
return;
}
if (*arg == '+')
--- 3619,3625 ----
if (qf_stack_empty(qi) || qf_list_empty(qf_get_curlist(qi)))
{
! emsg(_(e_no_errors));
return;
}
if (*arg == '+')
***************
*** 4025,4031 ****
if (qf_list_empty(qf_get_curlist(qi)))
{
! emsg(_(e_quickfix));
return;
}
--- 4025,4031 ----
if (qf_list_empty(qf_get_curlist(qi)))
{
! emsg(_(e_no_errors));
return;
}
***************
*** 5668,5674 ****
buf_has_flag = BUF_HAS_LL_ENTRY;
if (!(curbuf->b_has_qf_entry & buf_has_flag))
{
! emsg(_(e_quickfix));
return;
}
--- 5668,5674 ----
buf_has_flag = BUF_HAS_LL_ENTRY;
if (!(curbuf->b_has_qf_entry & buf_has_flag))
{
! emsg(_(e_no_errors));
return;
}
***************
*** 5679,5685 ****
// check if the list has valid errors
if (!qf_list_has_valid_entries(qfl))
{
! emsg(_(e_quickfix));
return;
}
--- 5679,5685 ----
// check if the list has valid errors
if (!qf_list_has_valid_entries(qfl))
{
! emsg(_(e_no_errors));
return;
}
***************
*** 5843,5849 ****
// Pattern is empty, use last search pattern.
if (last_search_pat() == NULL)
{
! emsg(_(e_noprevre));
return;
}
regmatch->regprog = vim_regcomp(last_search_pat(), RE_MAGIC);
--- 5843,5849 ----
// Pattern is empty, use last search pattern.
if (last_search_pat() == NULL)
{
! emsg(_(e_no_previous_regular_expression));
return;
}
regmatch->regprog = vim_regcomp(last_search_pat(), RE_MAGIC);
*** ../vim-8.2.3189/src/regexp.c 2021-06-02 13:28:11.435120452 +0200
--- src/regexp.c 2021-07-20 21:02:58.716502877 +0200
***************
*** 1359,1365 ****
if (UCHARAT(((bt_regprog_T *)prog)->program) != REGMAGIC)
{
! emsg(_(e_re_corr));
return TRUE;
}
return FALSE;
--- 1359,1365 ----
if (UCHARAT(((bt_regprog_T *)prog)->program) != REGMAGIC)
{
! emsg(_(e_corrupted_regexp_program));
return TRUE;
}
return FALSE;
***************
*** 1982,1988 ****
// Be paranoid...
if ((source == NULL && expr == NULL) || dest == NULL)
{
! emsg(_(e_null));
return 0;
}
if (prog_magic_wrong())
--- 1982,1988 ----
// Be paranoid...
if ((source == NULL && expr == NULL) || dest == NULL)
{
! emsg(_(e_null_argument));
return 0;
}
if (prog_magic_wrong())
***************
*** 2289,2295 ****
else if (*s == NUL) // we hit NUL.
{
if (copy)
! iemsg(_(e_re_damg));
goto exit;
}
else
--- 2289,2295 ----
else if (*s == NUL) // we hit NUL.
{
if (copy)
! iemsg(_(e_damaged_match_string));
goto exit;
}
else
*** ../vim-8.2.3189/src/regexp_bt.c 2021-07-05 20:14:54.396221575 +0200
--- src/regexp_bt.c 2021-07-20 21:03:08.116487788 +0200
***************
*** 1424,1430 ****
}
}
else
! EMSG_RET_NULL(_(e_nopresub));
break;
case Magic('1'):
--- 1424,1430 ----
}
}
else
! EMSG_RET_NULL(_(e_no_previous_substitute_regular_expression));
break;
case Magic('1'):
***************
*** 2491,2497 ****
int flags;
if (expr == NULL)
! IEMSG_RET_NULL(_(e_null));
init_class_tab();
--- 2491,2497 ----
int flags;
if (expr == NULL)
! IEMSG_RET_NULL(_(e_null_argument));
init_class_tab();
***************
*** 3115,3121 ****
break;
default: // Oh dear. Called inappropriately.
! iemsg(_(e_re_corr));
#ifdef DEBUG
printf("Called regrepeat with op code %d\n", OP(p));
#endif
--- 3115,3121 ----
break;
default: // Oh dear. Called inappropriately.
! iemsg(_(e_corrupted_regexp_program));
#ifdef DEBUG
printf("Called regrepeat with op code %d\n", OP(p));
#endif
***************
*** 4309,4315 ****
break;
default:
! iemsg(_(e_re_corr));
#ifdef DEBUG
printf("Illegal op code %d\n", op);
#endif
--- 4309,4315 ----
break;
default:
! iemsg(_(e_corrupted_regexp_program));
#ifdef DEBUG
printf("Illegal op code %d\n", op);
#endif
***************
*** 4709,4715 ****
{
// We get here only if there's trouble -- normally "case END" is
// the terminating point.
! iemsg(_(e_re_corr));
#ifdef DEBUG
printf("Premature EOL\n");
#endif
--- 4709,4715 ----
{
// We get here only if there's trouble -- normally "case END" is
// the terminating point.
! iemsg(_(e_corrupted_regexp_program));
#ifdef DEBUG
printf("Premature EOL\n");
#endif
***************
*** 4859,4865 ****
// Be paranoid...
if (prog == NULL || line == NULL)
{
! iemsg(_(e_null));
goto theend;
}
--- 4859,4865 ----
// Be paranoid...
if (prog == NULL || line == NULL)
{
! iemsg(_(e_null_argument));
goto theend;
}
*** ../vim-8.2.3189/src/regexp_nfa.c 2021-07-08 18:04:57.185627006 +0200
--- src/regexp_nfa.c 2021-07-20 20:08:05.526276412 +0200
***************
*** 1527,1533 ****
// Generated as "\%(pattern\)".
if (reg_prev_sub == NULL)
{
! emsg(_(e_nopresub));
return FAIL;
}
for (lp = reg_prev_sub; *lp != NUL; MB_CPTR_ADV(lp))
--- 1527,1533 ----
// Generated as "\%(pattern\)".
if (reg_prev_sub == NULL)
{
! emsg(_(e_no_previous_substitute_regular_expression));
return FAIL;
}
for (lp = reg_prev_sub; *lp != NUL; MB_CPTR_ADV(lp))
***************
*** 7356,7362 ****
// Be paranoid...
if (prog == NULL || line == NULL)
{
! iemsg(_(e_null));
goto theend;
}
--- 7356,7362 ----
// Be paranoid...
if (prog == NULL || line == NULL)
{
! iemsg(_(e_null_argument));
goto theend;
}
*** ../vim-8.2.3189/src/register.c 2021-06-28 21:54:23.381479210 +0200
--- src/register.c 2021-07-20 20:06:10.714669232 +0200
***************
*** 594,600 ****
{
if (last_cmdline == NULL)
{
! emsg(_(e_nolastcmd));
return FAIL;
}
// don't keep the cmdline containing @:
--- 594,600 ----
{
if (last_cmdline == NULL)
{
! emsg(_(e_no_previous_command_line));
return FAIL;
}
// don't keep the cmdline containing @:
***************
*** 632,638 ****
p = get_last_insert_save();
if (p == NULL)
{
! emsg(_(e_noinstext));
return FAIL;
}
retval = put_in_typebuf(p, FALSE, colon, silent);
--- 632,638 ----
p = get_last_insert_save();
if (p == NULL)
{
! emsg(_(e_no_inserted_text_yet));
return FAIL;
}
retval = put_in_typebuf(p, FALSE, colon, silent);
***************
*** 867,879 ****
case ':': // last command line
if (last_cmdline == NULL && errmsg)
! emsg(_(e_nolastcmd));
*argp = last_cmdline;
return TRUE;
case '/': // last search-pattern
if (last_search_pat() == NULL && errmsg)
! emsg(_(e_noprevre));
*argp = last_search_pat();
return TRUE;
--- 867,879 ----
case ':': // last command line
if (last_cmdline == NULL && errmsg)
! emsg(_(e_no_previous_command_line));
*argp = last_cmdline;
return TRUE;
case '/': // last search-pattern
if (last_search_pat() == NULL && errmsg)
! emsg(_(e_no_previous_regular_expression));
*argp = last_search_pat();
return TRUE;
***************
*** 881,887 ****
*argp = get_last_insert_save();
*allocated = TRUE;
if (*argp == NULL && errmsg)
! emsg(_(e_noinstext));
return TRUE;
#ifdef FEAT_SEARCHPATH
--- 881,887 ----
*argp = get_last_insert_save();
*allocated = TRUE;
if (*argp == NULL && errmsg)
! emsg(_(e_no_inserted_text_yet));
return TRUE;
#ifdef FEAT_SEARCHPATH
*** ../vim-8.2.3189/src/search.c 2021-07-20 17:51:48.247744104 +0200
--- src/search.c 2021-07-20 20:06:16.790647390 +0200
***************
*** 148,156 ****
if (spats[i].pat == NULL) // pattern was never defined
{
if (pat_use == RE_SUBST)
! emsg(_(e_nopresub));
else
! emsg(_(e_noprevre));
rc_did_emsg = TRUE;
return FAIL;
}
--- 148,156 ----
if (spats[i].pat == NULL) // pattern was never defined
{
if (pat_use == RE_SUBST)
! emsg(_(e_no_previous_substitute_regular_expression));
else
! emsg(_(e_no_previous_regular_expression));
rc_did_emsg = TRUE;
return FAIL;
}
***************
*** 1323,1329 ****
searchstr = spats[RE_SUBST].pat;
if (searchstr == NULL)
{
! emsg(_(e_noprevre));
retval = 0;
goto end_do_search;
}
--- 1323,1329 ----
searchstr = spats[RE_SUBST].pat;
if (searchstr == NULL)
{
! emsg(_(e_no_previous_regular_expression));
retval = 0;
goto end_do_search;
}
*** ../vim-8.2.3189/src/session.c 2021-04-30 21:37:45.675056282 +0200
--- src/session.c 2021-07-20 20:03:07.451394599 +0200
***************
*** 977,983 ****
if (curbuf->b_ffname == NULL)
{
! emsg(_(e_noname));
return NULL;
}
sname = home_replace_save(NULL, curbuf->b_ffname);
--- 977,983 ----
if (curbuf->b_ffname == NULL)
{
! emsg(_(e_no_file_name));
return NULL;
}
sname = home_replace_save(NULL, curbuf->b_ffname);
*** ../vim-8.2.3189/src/spell.c 2021-06-11 19:07:36.734247944 +0200
--- src/spell.c 2021-07-20 20:11:43.873622921 +0200
***************
*** 2137,2143 ****
if (ga_grow(&ga, 1) == FAIL)
{
ga_clear(&ga);
! ret_msg = e_outofmem;
goto theend;
}
LANGP_ENTRY(ga, ga.ga_len)->lp_slang = slang;
--- 2137,2143 ----
if (ga_grow(&ga, 1) == FAIL)
{
ga_clear(&ga);
! ret_msg = e_out_of_memory;
goto theend;
}
LANGP_ENTRY(ga, ga.ga_len)->lp_slang = slang;
*** ../vim-8.2.3189/src/syntax.c 2021-06-02 13:28:11.439120443 +0200
--- src/syntax.c 2021-07-20 19:54:11.932359393 +0200
***************
*** 3723,3729 ****
id = syn_namen2id(arg, (int)(arg_end - arg));
if (id == 0)
{
! semsg(_(e_nogroup), arg);
break;
}
else
--- 3723,3729 ----
id = syn_namen2id(arg, (int)(arg_end - arg));
if (id == 0)
{
! semsg(_(e_no_such_highlight_group_name_str), arg);
break;
}
else
***************
*** 3921,3927 ****
{
id = syn_namen2id(arg, (int)(arg_end - arg));
if (id == 0)
! semsg(_(e_nogroup), arg);
else
syn_list_one(id, syncing, TRUE);
}
--- 3921,3927 ----
{
id = syn_namen2id(arg, (int)(arg_end - arg));
if (id == 0)
! semsg(_(e_no_such_highlight_group_name_str), arg);
else
syn_list_one(id, syncing, TRUE);
}
*** ../vim-8.2.3189/src/time.c 2021-07-20 17:51:48.251744105 +0200
--- src/time.c 2021-07-20 20:09:25.470024686 +0200
***************
*** 757,763 ****
if (argvars[0].v_type != VAR_UNKNOWN)
{
if (argvars[0].v_type != VAR_NUMBER)
! emsg(_(e_number_exp));
else
{
timer = find_timer((int)tv_get_number(&argvars[0]));
--- 757,763 ----
if (argvars[0].v_type != VAR_UNKNOWN)
{
if (argvars[0].v_type != VAR_NUMBER)
! emsg(_(e_number_expected));
else
{
timer = find_timer((int)tv_get_number(&argvars[0]));
***************
*** 783,789 ****
return;
if (argvars[0].v_type != VAR_NUMBER)
! emsg(_(e_number_exp));
else
{
int paused = (int)tv_get_bool(&argvars[1]);
--- 783,789 ----
return;
if (argvars[0].v_type != VAR_NUMBER)
! emsg(_(e_number_expected));
else
{
int paused = (int)tv_get_bool(&argvars[1]);
***************
*** 844,850 ****
if (argvars[0].v_type != VAR_NUMBER)
{
! emsg(_(e_number_exp));
return;
}
timer = find_timer((int)tv_get_number(&argvars[0]));
--- 844,850 ----
if (argvars[0].v_type != VAR_NUMBER)
{
! emsg(_(e_number_expected));
return;
}
timer = find_timer((int)tv_get_number(&argvars[0]));
*** ../vim-8.2.3189/src/userfunc.c 2021-07-19 21:04:20.179847743 +0200
--- src/userfunc.c 2021-07-20 20:11:48.433610314 +0200
***************
*** 5028,5034 ****
if ((cstack->cs_rettv[idx] = alloc_tv()) != NULL)
*(typval_T *)cstack->cs_rettv[idx] = *(typval_T *)rettv;
else
! emsg(_(e_outofmem));
}
else
cstack->cs_rettv[idx] = NULL;
--- 5028,5034 ----
if ((cstack->cs_rettv[idx] = alloc_tv()) != NULL)
*(typval_T *)cstack->cs_rettv[idx] = *(typval_T *)rettv;
else
! emsg(_(e_out_of_memory));
}
else
cstack->cs_rettv[idx] = NULL;
*** ../vim-8.2.3189/src/vim9execute.c 2021-07-15 18:09:45.371406801 +0200
--- src/vim9execute.c 2021-07-20 20:09:32.342003768 +0200
***************
*** 2337,2343 ****
else if (dest_type == VAR_LIST
&& tv_idx->v_type != VAR_NUMBER)
{
! emsg(_(e_number_exp));
status = FAIL;
}
}
--- 2337,2343 ----
else if (dest_type == VAR_LIST
&& tv_idx->v_type != VAR_NUMBER)
{
! emsg(_(e_number_expected));
status = FAIL;
}
}
***************
*** 3955,3961 ****
)
{
SOURCING_LNUM = iptr->isn_lnum;
! emsg(_(e_number_exp));
goto on_error;
}
#ifdef FEAT_FLOAT
--- 3955,3961 ----
)
{
SOURCING_LNUM = iptr->isn_lnum;
! emsg(_(e_number_expected));
goto on_error;
}
#ifdef FEAT_FLOAT
*** ../vim-8.2.3189/src/window.c 2021-07-07 19:26:15.929533940 +0200
--- src/window.c 2021-07-20 20:07:05.402477083 +0200
***************
*** 863,869 ****
{
if (VISIBLE_HEIGHT(oldwin) <= p_wmh && new_wp == NULL)
{
! emsg(_(e_noroom));
return FAIL;
}
need_status = STATUS_HEIGHT;
--- 863,869 ----
{
if (VISIBLE_HEIGHT(oldwin) <= p_wmh && new_wp == NULL)
{
! emsg(_(e_not_enough_room));
return FAIL;
}
need_status = STATUS_HEIGHT;
***************
*** 921,927 ****
}
if (available < needed && new_wp == NULL)
{
! emsg(_(e_noroom));
return FAIL;
}
if (new_size == 0)
--- 921,927 ----
}
if (available < needed && new_wp == NULL)
{
! emsg(_(e_not_enough_room));
return FAIL;
}
if (new_size == 0)
***************
*** 1004,1010 ****
}
if (available < needed && new_wp == NULL)
{
! emsg(_(e_noroom));
return FAIL;
}
oldwin_height = oldwin->w_height;
--- 1004,1010 ----
}
if (available < needed && new_wp == NULL)
{
! emsg(_(e_not_enough_room));
return FAIL;
}
oldwin_height = oldwin->w_height;
***************
*** 5867,5873 ****
--p_wmh;
if (first)
{
! emsg(_(e_noroom));
first = FALSE;
}
}
--- 5867,5873 ----
--p_wmh;
if (first)
{
! emsg(_(e_not_enough_room));
first = FALSE;
}
}
***************
*** 5893,5899 ****
--p_wmw;
if (first)
{
! emsg(_(e_noroom));
first = FALSE;
}
}
--- 5893,5899 ----
--p_wmw;
if (first)
{
! emsg(_(e_not_enough_room));
first = FALSE;
}
}
***************
*** 6385,6391 ****
{
if (frp == NULL)
{
! emsg(_(e_noroom));
p_ch = old_p_ch;
curtab->tp_ch_used = p_ch;
cmdline_row = Rows - p_ch;
--- 6385,6391 ----
{
if (frp == NULL)
{
! emsg(_(e_not_enough_room));
p_ch = old_p_ch;
curtab->tp_ch_used = p_ch;
cmdline_row = Rows - p_ch;
***************
*** 6476,6482 ****
{
if (fp == topframe)
{
! emsg(_(e_noroom));
return;
}
// In a column of frames: go to frame above. If already at
--- 6476,6482 ----
{
if (fp == topframe)
{
! emsg(_(e_not_enough_room));
return;
}
// In a column of frames: go to frame above. If already at
*** ../vim-8.2.3189/src/version.c 2021-07-20 19:18:40.387377742 +0200
--- src/version.c 2021-07-20 21:07:08.928098053 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3190,
/**/
--
hundred-and-one symptoms of being an internet addict:
191. You rate eating establishments not by the quality of the food,
but by the availability of electrical outlets for your PowerBook.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202107201908.16KJ8Qbo3365754%40masaka.moolenaar.net.