main,version: Remove USR_EXRC_FILE*

This commit is contained in:
ZyX 2015-10-17 21:53:16 +03:00
parent a82a059921
commit afcc842881
6 changed files with 5 additions and 33 deletions

View File

@ -1046,7 +1046,7 @@ You type: ab esc ^V^V^V^V^V^[
You see: ab esc ^V^V^[
The command-line contains two actual ^Vs before the ^[. This is
how it should appear in your .exrc file, if you choose to go that
how it should appear in your vimrc file, if you choose to go that
route. The first ^V is there to quote the second ^V; the :ab
command uses ^V as its own quote character, so you can include quoted
whitespace or the | character in the abbreviation. The :ab command

View File

@ -407,7 +407,7 @@ accordingly. Vim proceeds in this order:
":version" command. Mostly it's "$VIM/vimrc".
For the Macintosh the $VIMRUNTIME/macmap.vim is read.
*VIMINIT* *EXINIT* *.exrc* *_exrc* *$MYVIMRC*
*VIMINIT* *EXINIT* *$MYVIMRC*
b. Four places are searched for initializations. The first that exists
is used, the others are ignored. The $MYVIMRC environment variable is
set to the file that was first found, unless $MYVIMRC was already set
@ -417,9 +417,6 @@ accordingly. Vim proceeds in this order:
- The user vimrc file: $XDG_CONFIG_HOME/nvim/init.vim.
- The environment variable EXINIT.
The value of $EXINIT is used as an Ex command line.
- The user exrc file(s). Same as for the user vimrc file, but with
"vimrc" replaced by "exrc". But only one of ".exrc" and "_exrc" is
used, depending on the system.
c. If the 'exrc' option is on (which is not the default), the current
directory is searched for three files. The first that exists is used,

View File

@ -1834,12 +1834,8 @@ static void source_startup_scripts(mparm_T *parmp)
// The first that exists is used, the rest is ignored.
char_u *user_vimrc = (char_u *)stdpaths_user_conf_subpath("init.vim");
if (process_env("VIMINIT", true) != OK) {
if (do_source(user_vimrc, true, DOSO_VIMRC) == FAIL
&& process_env("EXINIT", false) == FAIL
&& do_source((char_u *)USR_EXRC_FILE, false, DOSO_NONE) == FAIL) {
#ifdef USR_EXRC_FILE2
(void)do_source((char_u *)USR_EXRC_FILE2, false, DOSO_NONE);
#endif
if (do_source(user_vimrc, true, DOSO_VIMRC) == FAIL) {
process_env("EXINIT", false);
}
}
@ -1877,14 +1873,7 @@ static void source_startup_scripts(mparm_T *parmp)
else
secure = 0;
#endif
if ( path_full_compare((char_u *)USR_EXRC_FILE,
(char_u *)EXRC_FILE, FALSE) != kEqualFiles
#ifdef USR_EXRC_FILE2
&& path_full_compare((char_u *)USR_EXRC_FILE2,
(char_u *)EXRC_FILE, FALSE) != kEqualFiles
#endif
)
(void)do_source((char_u *)EXRC_FILE, FALSE, DOSO_NONE);
(void) do_source((char_u *)EXRC_FILE, FALSE, DOSO_NONE);
}
}
xfree(user_vimrc);

View File

@ -28,9 +28,6 @@
#ifndef SYNTAX_FNAME
# define SYNTAX_FNAME "$VIMRUNTIME/syntax/%s.vim"
#endif
#ifndef USR_EXRC_FILE
# define USR_EXRC_FILE "~/.exrc"
#endif
#ifndef EXRC_FILE
# define EXRC_FILE ".exrc"
#endif

View File

@ -7,7 +7,6 @@
#define TEMP_FILE_PATH_MAXLEN _MAX_PATH
// Defines needed to fix the build on Windows:
// - USR_EXRC_FILE
// - DFLT_DIR
// - DFLT_BDIR
// - DFLT_VDIR

View File

@ -1067,16 +1067,6 @@ void list_version(void)
version_msg(SYS_VIMRC_FILE);
version_msg("\"\n");
#endif // ifdef SYS_VIMRC_FILE
#ifdef USR_EXRC_FILE
version_msg(_(" user exrc file: \""));
version_msg(USR_EXRC_FILE);
version_msg("\"\n");
#endif // ifdef USR_EXRC_FILE
#ifdef USR_EXRC_FILE2
version_msg(_(" 2nd user exrc file: \""));
version_msg(USR_EXRC_FILE2);
version_msg("\"\n");
#endif // ifdef USR_EXRC_FILE2
#ifdef HAVE_PATHDEF
if (*default_vim_dir != NUL) {