diff src/fileio.c @ 26962:85866e069c24 v8.2.4010

patch 8.2.4010: error messages are spread out Commit: https://github.com/vim/vim/commit/9d00e4a8146862c17ed429dc6b1b43349acb2b5f Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 5 17:49:15 2022 +0000 patch 8.2.4010: error messages are spread out Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
author Bram Moolenaar <Bram@vim.org>
date Wed, 05 Jan 2022 19:00:06 +0100
parents 3631d2deb36c
children c9474ae175f4
line wrap: on
line diff
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -41,7 +41,6 @@ static char_u *check_for_cryptkey(char_u
 #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 *sfna
     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;
     }