Mercurial > hg > xemacs-beta
diff src/emacs.c @ 235:85a06df23a9a r20-5b16
Import from CVS: tag r20-5b16
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:14:40 +0200 |
parents | 52952cbfc5b5 |
children | 89ec2bb86eea |
line wrap: on
line diff
--- a/src/emacs.c Mon Aug 13 10:14:17 2007 +0200 +++ b/src/emacs.c Mon Aug 13 10:14:40 2007 +0200 @@ -58,8 +58,7 @@ #endif #endif -#if defined (_WIN32) && defined (DEBUG_XEMACS) -/* For DebugBreak in asserf_failed() */ +#if defined (_WIN32) #include <windows.h> #endif @@ -162,6 +161,12 @@ /* Nonzero means don't perform package searches at startup */ int inhibit_package_init; +/* Nonzero means don't reload changed dumped lisp files at startup */ +int inhibit_update_dumped_lisp; + +/* Nonzero means don't reload changed or new auto-autoloads files at startup */ +int inhibit_update_autoloads; + /* Save argv and argc. */ char **initial_argv; int initial_argc; @@ -304,7 +309,20 @@ for (i = argc - 1; i >= 0; i--) { if (i == 0 || i > skip_args) - result = Fcons (build_ext_string (argv [i], FORMAT_FILENAME), result); + { +#ifdef _WIN32 + if (i == 0) + { + /* Do not trust to what crt0 has stuffed into argv[0] */ + char full_exe_path [MAX_PATH]; + GetModuleFileName (NULL, full_exe_path, MAX_PATH); + result = Fcons (build_ext_string (full_exe_path, FORMAT_FILENAME), + result); + } + else +#endif + result = Fcons (build_ext_string (argv [i], FORMAT_FILENAME), result); + } } return result; } @@ -615,18 +633,29 @@ /* Handle the -batch switch, which means don't do interactive display. */ if (argmatch (argv, argc, "-batch", "--batch", 5, NULL, &skip_args)) - noninteractive = 1; + { + inhibit_update_autoloads = 1; + inhibit_update_dumped_lisp = 1; + noninteractive = 1; + } /* Partially handle -no-packages and -vanilla. Packages are searched */ /* prior to the rest of the command line being parsed in startup.el */ if (argmatch (argv, argc, "-no-packages", "--no-packages", - 6, NULL, &skip_args) || - argmatch (argv, argc, "-vanilla", "--vanilla", - 7, NULL, &skip_args)) + 6, NULL, &skip_args)) { inhibit_package_init = 1; skip_args--; } + if (argmatch (argv, argc, "-vanilla", "--vanilla", + 7, NULL, &skip_args)) + { + inhibit_package_init = 1; + inhibit_update_autoloads = 1; + inhibit_update_dumped_lisp = 1; + skip_args--; + } + /* Partially handle the -version and -help switches: they imply -batch, but are not removed from the list. */ @@ -2420,6 +2449,16 @@ Set to non-nil when the package-path should not be searched at startup. */ ); + DEFVAR_BOOL ("inhibit-update-dumped-lisp", &inhibit_update_dumped_lisp /* +Set to non-nil when modified dumped lisp should not be reloaded at startup. +*/ ); + inhibit_update_dumped_lisp = 1; + + DEFVAR_BOOL ("inhibit-update-autoloads", &inhibit_update_autoloads /* +Set to non-nil when modified or new autoloads files should not be reloaded. +*/ ); + inhibit_update_autoloads = 0; + DEFVAR_INT ("emacs-priority", &emacs_priority /* Priority for XEmacs to run at. This value is effective only if set before XEmacs is dumped,