@@ -403,12 +403,26 @@ main
403403 debug_break_level = params .use_debug_break_level ;
404404#endif
405405
406+ /* Reset 'loadplugins' for "-u NONE" before "--cmd" arguments.
407+ * Allows for setting 'loadplugins' there. */
408+ if (params .use_vimrc != NULL
409+ && (STRCMP (params .use_vimrc , "NONE" ) == 0
410+ || STRCMP (params .use_vimrc , "DEFAULTS" ) == 0 ))
411+ p_lpl = FALSE;
412+
413+ /* Execute --cmd arguments. */
414+ exe_pre_commands (& params );
415+
416+ /* Source startup scripts. */
417+ source_startup_scripts (& params );
418+
406419#ifdef FEAT_MZSCHEME
407420 /*
408421 * Newer version of MzScheme (Racket) require earlier (trampolined)
409422 * initialisation via scheme_main_setup.
410423 * Implement this by initialising it as early as possible
411424 * and splitting off remaining Vim main into vim_main2().
425+ * Do source startup scripts, so that 'mzschemedll' can be set.
412426 */
413427 return mzscheme_main ();
414428#else
@@ -427,19 +441,6 @@ main
427441vim_main2 (void )
428442{
429443#ifndef NO_VIM_MAIN
430- /* Reset 'loadplugins' for "-u NONE" before "--cmd" arguments.
431- * Allows for setting 'loadplugins' there. */
432- if (params .use_vimrc != NULL
433- && (STRCMP (params .use_vimrc , "NONE" ) == 0
434- || STRCMP (params .use_vimrc , "DEFAULTS" ) == 0 ))
435- p_lpl = FALSE;
436-
437- /* Execute --cmd arguments. */
438- exe_pre_commands (& params );
439-
440- /* Source startup scripts. */
441- source_startup_scripts (& params );
442-
443444#ifdef FEAT_EVAL
444445 /*
445446 * Read all the plugin files.
0 commit comments