diff src/regexp_nfa.c @ 26436:ef0c07cbf53f v8.2.3749

patch 8.2.3749: error messages are everywhere Commit: https://github.com/vim/vim/commit/12f3c1b77fb39dc338304d5484cdbc99da27389a Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 5 21:46:34 2021 +0000 patch 8.2.3749: error messages are everywhere Problem: Error messages are everywhere. Solution: Move more error messages to errors.h and adjust the names.
author Bram Moolenaar <Bram@vim.org>
date Sun, 05 Dec 2021 23:00:06 +0100
parents 9835f424bef5
children 9f445e07f766
line wrap: on
line diff
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -1586,7 +1586,7 @@ nfa_regatom(void)
 		case '9':
 		    // \z1...\z9
 		    if ((reg_do_extmatch & REX_USE) == 0)
-			EMSG_RET_FAIL(_(e_z1_not_allowed));
+			EMSG_RET_FAIL(_(e_z1_z9_not_allowed_here));
 		    EMIT(NFA_ZREF1 + (no_Magic(c) - '1'));
 		    // No need to set rex.nfa_has_backref, the sub-matches don't
 		    // change when \z1 .. \z9 matches or not.
@@ -1595,7 +1595,7 @@ nfa_regatom(void)
 		case '(':
 		    // \z(
 		    if ((reg_do_extmatch & REX_SET) == 0)
-			EMSG_RET_FAIL(_(e_z_not_allowed));
+			EMSG_RET_FAIL(_(e_z_not_allowed_here));
 		    if (nfa_reg(REG_ZPAREN) == FAIL)
 			return FAIL;	    // cascaded error
 		    re_has_z = REX_SET;
@@ -1677,7 +1677,7 @@ nfa_regatom(void)
 			for (n = 0; (c = peekchr()) != ']'; ++n)
 			{
 			    if (c == NUL)
-				EMSG2_RET_FAIL(_(e_missing_sb),
+				EMSG2_RET_FAIL(_(e_missing_sb_after_str),
 						      reg_magic == MAGIC_ALL);
 			    // recursive call!
 			    if (nfa_regatom() == FAIL)
@@ -1685,7 +1685,7 @@ nfa_regatom(void)
 			}
 			getchr();  // get the ]
 			if (n == 0)
-			    EMSG2_RET_FAIL(_(e_empty_sb),
+			    EMSG2_RET_FAIL(_(e_empty_str_brackets),
 						      reg_magic == MAGIC_ALL);
 			EMIT(NFA_OPT_CHARS);
 			EMIT(n);