mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 19:25:11 -07:00
stdpaths: Rename export functions so that they have common prefix
This commit is contained in:
parent
120ec8c2ea
commit
afb0f2f9b1
@ -1840,7 +1840,7 @@ static void source_startup_scripts(mparm_T *parmp)
|
|||||||
* - second user exrc file ($VIM/.exrc for Dos)
|
* - second user exrc file ($VIM/.exrc for Dos)
|
||||||
* The first that exists is used, the rest is ignored.
|
* The first that exists is used, the rest is ignored.
|
||||||
*/
|
*/
|
||||||
char_u *user_vimrc = (char_u *)get_from_user_conf("init.vim");
|
char_u *user_vimrc = (char_u *)stdpaths_user_conf_subpath("init.vim");
|
||||||
if (process_env("VIMINIT", true) != OK) {
|
if (process_env("VIMINIT", true) != OK) {
|
||||||
if (do_source(user_vimrc, true, DOSO_VIMRC) == FAIL
|
if (do_source(user_vimrc, true, DOSO_VIMRC) == FAIL
|
||||||
&& process_env("EXINIT", FALSE) == FAIL
|
&& process_env("EXINIT", FALSE) == FAIL
|
||||||
|
@ -579,10 +579,11 @@ void set_init_1(void)
|
|||||||
"system('lpr' . (&printdevice == '' ? '' : ' -P' . &printdevice) . ' ' . v:fname_in) . delete(v:fname_in) + v:shell_error"
|
"system('lpr' . (&printdevice == '' ? '' : ' -P' . &printdevice) . ' ' . v:fname_in) . delete(v:fname_in) + v:shell_error"
|
||||||
);
|
);
|
||||||
|
|
||||||
set_string_default("viewdir", (char_u *)get_from_user_data("view"));
|
set_string_default("viewdir", (char_u *)stdpaths_user_data_subpath("view"));
|
||||||
set_string_default("backupdir", (char_u *)get_from_user_data("backup"));
|
set_string_default("backupdir",
|
||||||
set_string_default("directory", (char_u *)get_from_user_data("swap"));
|
(char_u *)stdpaths_user_data_subpath("backup"));
|
||||||
set_string_default("undodir", (char_u *)get_from_user_data("undo"));
|
set_string_default("directory", (char_u *)stdpaths_user_data_subpath("swap"));
|
||||||
|
set_string_default("undodir", (char_u *)stdpaths_user_data_subpath("undo"));
|
||||||
// Set default for &runtimepath. All necessary expansions are performed in
|
// Set default for &runtimepath. All necessary expansions are performed in
|
||||||
// this function.
|
// this function.
|
||||||
set_runtimepath_default();
|
set_runtimepath_default();
|
||||||
|
@ -82,13 +82,13 @@ static void create_dir(const char *dir, int mode, const char *suffix)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
char *get_from_user_conf(const char *fname)
|
char *stdpaths_user_conf_subpath(const char *fname)
|
||||||
FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL
|
FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL
|
||||||
{
|
{
|
||||||
return concat_fnames(get_xdg_home(kXDGConfigHome), fname, true);
|
return concat_fnames(get_xdg_home(kXDGConfigHome), fname, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *get_from_user_data(const char *fname)
|
char *stdpaths_user_data_subpath(const char *fname)
|
||||||
FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL
|
FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL
|
||||||
{
|
{
|
||||||
char *dir = concat_fnames(get_xdg_home(kXDGDataHome), fname, true);
|
char *dir = concat_fnames(get_xdg_home(kXDGDataHome), fname, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user