comparison 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
comparison
equal deleted inserted replaced
234:946e7f6ce379 235:85a06df23a9a
56 #ifndef APOLLO_SR10 56 #ifndef APOLLO_SR10
57 #include <default_acl.h> 57 #include <default_acl.h>
58 #endif 58 #endif
59 #endif 59 #endif
60 60
61 #if defined (_WIN32) && defined (DEBUG_XEMACS) 61 #if defined (_WIN32)
62 /* For DebugBreak in asserf_failed() */
63 #include <windows.h> 62 #include <windows.h>
64 #endif 63 #endif
65 64
66 /* For PATH_EXEC */ 65 /* For PATH_EXEC */
67 #include "paths.h" 66 #include "paths.h"
159 158
160 int noninteractive1; 159 int noninteractive1;
161 160
162 /* Nonzero means don't perform package searches at startup */ 161 /* Nonzero means don't perform package searches at startup */
163 int inhibit_package_init; 162 int inhibit_package_init;
163
164 /* Nonzero means don't reload changed dumped lisp files at startup */
165 int inhibit_update_dumped_lisp;
166
167 /* Nonzero means don't reload changed or new auto-autoloads files at startup */
168 int inhibit_update_autoloads;
164 169
165 /* Save argv and argc. */ 170 /* Save argv and argc. */
166 char **initial_argv; 171 char **initial_argv;
167 int initial_argc; 172 int initial_argc;
168 173
302 REGISTER int i; 307 REGISTER int i;
303 308
304 for (i = argc - 1; i >= 0; i--) 309 for (i = argc - 1; i >= 0; i--)
305 { 310 {
306 if (i == 0 || i > skip_args) 311 if (i == 0 || i > skip_args)
307 result = Fcons (build_ext_string (argv [i], FORMAT_FILENAME), result); 312 {
313 #ifdef _WIN32
314 if (i == 0)
315 {
316 /* Do not trust to what crt0 has stuffed into argv[0] */
317 char full_exe_path [MAX_PATH];
318 GetModuleFileName (NULL, full_exe_path, MAX_PATH);
319 result = Fcons (build_ext_string (full_exe_path, FORMAT_FILENAME),
320 result);
321 }
322 else
323 #endif
324 result = Fcons (build_ext_string (argv [i], FORMAT_FILENAME), result);
325 }
308 } 326 }
309 return result; 327 return result;
310 } 328 }
311 329
312 Lisp_Object 330 Lisp_Object
613 if (argmatch (argv, argc, "-nw", "--no-windows", 6, NULL, &skip_args)) 631 if (argmatch (argv, argc, "-nw", "--no-windows", 6, NULL, &skip_args))
614 inhibit_window_system = 1; 632 inhibit_window_system = 1;
615 633
616 /* Handle the -batch switch, which means don't do interactive display. */ 634 /* Handle the -batch switch, which means don't do interactive display. */
617 if (argmatch (argv, argc, "-batch", "--batch", 5, NULL, &skip_args)) 635 if (argmatch (argv, argc, "-batch", "--batch", 5, NULL, &skip_args))
618 noninteractive = 1; 636 {
637 inhibit_update_autoloads = 1;
638 inhibit_update_dumped_lisp = 1;
639 noninteractive = 1;
640 }
619 641
620 /* Partially handle -no-packages and -vanilla. Packages are searched */ 642 /* Partially handle -no-packages and -vanilla. Packages are searched */
621 /* prior to the rest of the command line being parsed in startup.el */ 643 /* prior to the rest of the command line being parsed in startup.el */
622 if (argmatch (argv, argc, "-no-packages", "--no-packages", 644 if (argmatch (argv, argc, "-no-packages", "--no-packages",
623 6, NULL, &skip_args) || 645 6, NULL, &skip_args))
624 argmatch (argv, argc, "-vanilla", "--vanilla",
625 7, NULL, &skip_args))
626 { 646 {
627 inhibit_package_init = 1; 647 inhibit_package_init = 1;
628 skip_args--; 648 skip_args--;
629 } 649 }
650 if (argmatch (argv, argc, "-vanilla", "--vanilla",
651 7, NULL, &skip_args))
652 {
653 inhibit_package_init = 1;
654 inhibit_update_autoloads = 1;
655 inhibit_update_dumped_lisp = 1;
656 skip_args--;
657 }
658
630 659
631 /* Partially handle the -version and -help switches: they imply -batch, 660 /* Partially handle the -version and -help switches: they imply -batch,
632 but are not removed from the list. */ 661 but are not removed from the list. */
633 if (argmatch (argv, argc, "-help", "--help", 3, NULL, &skip_args)) 662 if (argmatch (argv, argc, "-help", "--help", 3, NULL, &skip_args))
634 noninteractive = 1, skip_args--; 663 noninteractive = 1, skip_args--;
2418 2447
2419 DEFVAR_BOOL ("inhibit-package-init", &inhibit_package_init /* 2448 DEFVAR_BOOL ("inhibit-package-init", &inhibit_package_init /*
2420 Set to non-nil when the package-path should not be searched at startup. 2449 Set to non-nil when the package-path should not be searched at startup.
2421 */ ); 2450 */ );
2422 2451
2452 DEFVAR_BOOL ("inhibit-update-dumped-lisp", &inhibit_update_dumped_lisp /*
2453 Set to non-nil when modified dumped lisp should not be reloaded at startup.
2454 */ );
2455 inhibit_update_dumped_lisp = 1;
2456
2457 DEFVAR_BOOL ("inhibit-update-autoloads", &inhibit_update_autoloads /*
2458 Set to non-nil when modified or new autoloads files should not be reloaded.
2459 */ );
2460 inhibit_update_autoloads = 0;
2461
2423 DEFVAR_INT ("emacs-priority", &emacs_priority /* 2462 DEFVAR_INT ("emacs-priority", &emacs_priority /*
2424 Priority for XEmacs to run at. 2463 Priority for XEmacs to run at.
2425 This value is effective only if set before XEmacs is dumped, 2464 This value is effective only if set before XEmacs is dumped,
2426 and only if the XEmacs executable is installed with setuid to permit 2465 and only if the XEmacs executable is installed with setuid to permit
2427 it to change priority. (XEmacs sets its uid back to the real uid.) 2466 it to change priority. (XEmacs sets its uid back to the real uid.)