]> granicus.if.org Git - vim/commitdiff
patch 8.2.4246: one error message not in errors.h v8.2.4246
authorBram Moolenaar <Bram@vim.org>
Fri, 28 Jan 2022 21:00:51 +0000 (21:00 +0000)
committerBram Moolenaar <Bram@vim.org>
Fri, 28 Jan 2022 21:00:51 +0000 (21:00 +0000)
Problem:    One error message not in errors.h. (Antonio Colombo)
Solution:   Move the message and rename.

src/errors.h
src/if_perl.xs
src/version.c

index da45df2100d99718eab986d57193e79f2d1e421e..7e6d0dbd185816e710f653e07ad7722151651555 100644 (file)
@@ -747,7 +747,10 @@ EXTERN char e_didnt_get_block_nr_one[]
        INIT(= N_("E298: Didn't get block nr 1?"));
 EXTERN char e_didnt_get_block_nr_two[]
        INIT(= N_("E298: Didn't get block nr 2?"));
-// E299 unused
+#ifdef FEAT_PERL
+EXTERN char e_perl_evaluation_forbidden_in_sandbox_without_safe_module[]
+       INIT(= N_("E299: Perl evaluation forbidden in sandbox without the Safe module"));
+#endif
 EXTERN char e_swap_file_already_exists_symlink_attack[]
        INIT(= N_("E300: Swap file already exists (symlink attack?)"));
 EXTERN char e_oops_lost_the_swap_file[]
index 37b9cb292e367236afe3f0a46d16e59168518fb2..c7177700ff41ead7d676006619df0c125abd52eb 100644 (file)
@@ -1030,7 +1030,6 @@ VIM_init(void)
 #ifdef DYNAMIC_PERL
 static char *e_noperl = N_("Sorry, this command is disabled: the Perl library could not be loaded.");
 #endif
-static char *e_perlsandbox = N_("E299: Perl evaluation forbidden in sandbox without the Safe module");
 
 /*
  * ":perl"
@@ -1084,7 +1083,7 @@ ex_perl(exarg_T *eap)
        safe = perl_get_sv("VIM::safe", FALSE);
 # ifndef MAKE_TEST  /* avoid a warning for unreachable code */
        if (safe == NULL || !SvTRUE(safe))
-           emsg(_(e_perlsandbox));
+           emsg(_(e_perl_evaluation_forbidden_in_sandbox_without_safe_module));
        else
 # endif
        {
@@ -1361,7 +1360,7 @@ do_perleval(char_u *str, typval_T *rettv)
            safe = get_sv("VIM::safe", FALSE);
 # ifndef MAKE_TEST  /* avoid a warning for unreachable code */
            if (safe == NULL || !SvTRUE(safe))
-               emsg(_(e_perlsandbox));
+               emsg(_(e_perl_evaluation_forbidden_in_sandbox_without_safe_module));
            else
 # endif
            {
index 8275e8f2ae6da16d869d88bffc214c0da2a4e7ee..b0d48d50a612966d83713cfaddfddab38e7e83ec 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4246,
 /**/
     4245,
 /**/