Mercurial > hg > xemacs-beta
comparison src/emacs.c @ 269:b2472a1930f2 r20-5b33
Import from CVS: tag r20-5b33
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:27:19 +0200 |
parents | 966663fcf606 |
children | c5d627a313b1 |
comparison
equal
deleted
inserted
replaced
268:6ced69ccd85f | 269:b2472a1930f2 |
---|---|
101 /* Version numbers and strings */ | 101 /* Version numbers and strings */ |
102 Lisp_Object Vemacs_major_version; | 102 Lisp_Object Vemacs_major_version; |
103 Lisp_Object Vemacs_minor_version; | 103 Lisp_Object Vemacs_minor_version; |
104 Lisp_Object Vemacs_beta_version; | 104 Lisp_Object Vemacs_beta_version; |
105 Lisp_Object Vxemacs_codename; | 105 Lisp_Object Vxemacs_codename; |
106 | |
107 /* The path under which XEmacs was invoked. */ | |
108 Lisp_Object Vinvocation_path; | |
106 | 109 |
107 /* The name under which XEmacs was invoked, with any leading directory | 110 /* The name under which XEmacs was invoked, with any leading directory |
108 names discarded. */ | 111 names discarded. */ |
109 Lisp_Object Vinvocation_name; | 112 Lisp_Object Vinvocation_name; |
110 | 113 |
537 if (initialized) | 540 if (initialized) |
538 if (malloc_jumpstart (malloc_cookie) != 0) | 541 if (malloc_jumpstart (malloc_cookie) != 0) |
539 printf ("malloc jumpstart failed!\n"); | 542 printf ("malloc jumpstart failed!\n"); |
540 #endif /* NeXT */ | 543 #endif /* NeXT */ |
541 | 544 |
545 /* | |
542 #if defined (GNU_MALLOC) && \ | 546 #if defined (GNU_MALLOC) && \ |
543 defined (ERROR_CHECK_MALLOC) && \ | 547 defined (ERROR_CHECK_MALLOC) && \ |
544 !defined (HAVE_LIBMCHECK) | 548 !defined (HAVE_LIBMCHECK) |
545 /* Prior to XEmacs 21, this was `#if 0'ed out. I'm putting it back in | 549 */ |
546 because it provides extremely valuable debugging code. -slb */ | 550 #if defined(LOSING_GCC_DESTRUCTOR_FREE_BUG) |
551 /* Prior to XEmacs 21, this was `#if 0'ed out. */ | |
552 /* I'm enabling this because it is the only reliable way I've found to */ | |
553 /* prevent a very annoying problem where GCC will attempt to free(3) */ | |
554 /* memory at exit() and cause a coredump. */ | |
547 init_free_hook (); | 555 init_free_hook (); |
548 #endif | 556 #endif |
549 | 557 |
550 sort_args (argc, argv); | 558 sort_args (argc, argv); |
551 | 559 |
683 if (argmatch (argv, argc, "-no-autoloads", "--no-autoloads", | 691 if (argmatch (argv, argc, "-no-autoloads", "--no-autoloads", |
684 7, NULL, &skip_args)) | 692 7, NULL, &skip_args)) |
685 { | 693 { |
686 /* Inhibit everything */ | 694 /* Inhibit everything */ |
687 inhibit_package_init = 1; | 695 inhibit_package_init = 1; |
688 inhibit_site_lisp = 1; | |
689 inhibit_update_autoloads = 1; | 696 inhibit_update_autoloads = 1; |
690 inhibit_update_dumped_lisp = 1; | 697 inhibit_update_dumped_lisp = 1; |
691 skip_args--; | 698 skip_args--; |
692 } | 699 } |
693 | 700 |
990 | 997 |
991 #ifdef EMACS_BTL | 998 #ifdef EMACS_BTL |
992 syms_of_btl (); | 999 syms_of_btl (); |
993 #endif | 1000 #endif |
994 | 1001 |
1002 /* | |
995 #if defined (GNU_MALLOC) && \ | 1003 #if defined (GNU_MALLOC) && \ |
996 defined (ERROR_CHECK_MALLOC) && \ | 1004 defined (ERROR_CHECK_MALLOC) && \ |
997 !defined (HAVE_LIBMCHECK) | 1005 !defined (HAVE_LIBMCHECK) |
1006 */ | |
998 /* Prior to XEmacs 21, this was `#if 0'ed out. -slb */ | 1007 /* Prior to XEmacs 21, this was `#if 0'ed out. -slb */ |
1008 #if defined (LOSING_GCC_DESTRUCTOR_FREE_BUG) | |
999 syms_of_free_hook (); | 1009 syms_of_free_hook (); |
1000 #endif | 1010 #endif |
1001 | 1011 |
1002 #ifdef TOOLTALK | 1012 #ifdef TOOLTALK |
1003 syms_of_tooltalk (); | 1013 syms_of_tooltalk (); |
1566 Vinvocation_name = build_string(getenv("SHELL")); | 1576 Vinvocation_name = build_string(getenv("SHELL")); |
1567 } | 1577 } |
1568 Vinvocation_directory = Vinvocation_name; | 1578 Vinvocation_directory = Vinvocation_name; |
1569 | 1579 |
1570 if (!NILP (Ffile_name_directory (Vinvocation_name))) | 1580 if (!NILP (Ffile_name_directory (Vinvocation_name))) |
1571 /* invocation-name includes a directory component -- presumably it | 1581 { |
1572 is relative to cwd, not $PATH */ | 1582 /* invocation-name includes a directory component -- presumably it |
1573 Vinvocation_directory = Fexpand_file_name (Vinvocation_name, | 1583 is relative to cwd, not $PATH */ |
1574 Qnil); | 1584 Vinvocation_directory = Fexpand_file_name (Vinvocation_name, |
1585 Qnil); | |
1586 Vinvocation_path = Qnil; | |
1587 } | |
1575 else | 1588 else |
1576 locate_file (Vexec_path, Vinvocation_name, EXEC_SUFFIXES, | 1589 { |
1577 &Vinvocation_directory, X_OK); | 1590 Vinvocation_path = decode_env_path ("PATH", NULL); |
1591 locate_file (Vinvocation_path, Vinvocation_name, EXEC_SUFFIXES, | |
1592 &Vinvocation_directory, X_OK); | |
1593 } | |
1578 | 1594 |
1579 if (NILP (Vinvocation_directory)) | 1595 if (NILP (Vinvocation_directory)) |
1580 Vinvocation_directory = Vinvocation_name; | 1596 Vinvocation_directory = Vinvocation_name; |
1581 | 1597 |
1582 Vinvocation_name = Ffile_name_nondirectory (Vinvocation_directory); | 1598 Vinvocation_name = Ffile_name_nondirectory (Vinvocation_directory); |
2551 DEFVAR_LISP ("invocation-directory", &Vinvocation_directory /* | 2567 DEFVAR_LISP ("invocation-directory", &Vinvocation_directory /* |
2552 The directory in which the XEmacs executable was found, to run it. | 2568 The directory in which the XEmacs executable was found, to run it. |
2553 The value is simply the program name if that directory's name is not known. | 2569 The value is simply the program name if that directory's name is not known. |
2554 */ ); | 2570 */ ); |
2555 | 2571 |
2572 DEFVAR_LISP ("invocation-path", &Vinvocation_path /* | |
2573 The path in which the XEmacs executable was found, to run it. | |
2574 The value is simply the value of environment variable PATH on startup | |
2575 if XEmacs was found there. | |
2576 */ ); | |
2577 | |
2556 #if 0 /* FSFmacs */ | 2578 #if 0 /* FSFmacs */ |
2557 xxDEFVAR_LISP ("installation-directory", &Vinstallation_directory, | 2579 xxDEFVAR_LISP ("installation-directory", &Vinstallation_directory, |
2558 "A directory within which to look for the `lib-src' and `etc' directories.\n" | 2580 "A directory within which to look for the `lib-src' and `etc' directories.\n" |
2559 "This is non-nil when we can't find those directories in their standard\n" | 2581 "This is non-nil when we can't find those directories in their standard\n" |
2560 "installed locations, but we can find them\n" | 2582 "installed locations, but we can find them\n" |
2629 */ ); | 2651 */ ); |
2630 | 2652 |
2631 DEFVAR_BOOL ("inhibit-site-lisp", &inhibit_site_lisp /* | 2653 DEFVAR_BOOL ("inhibit-site-lisp", &inhibit_site_lisp /* |
2632 Set to non-nil when the site-lisp should not be searched at startup. | 2654 Set to non-nil when the site-lisp should not be searched at startup. |
2633 */ ); | 2655 */ ); |
2656 #ifdef INHIBIT_SITE_LISP | |
2657 inhibit_site_lisp = 1; | |
2658 #endif | |
2634 | 2659 |
2635 DEFVAR_BOOL ("inhibit-update-dumped-lisp", &inhibit_update_dumped_lisp /* | 2660 DEFVAR_BOOL ("inhibit-update-dumped-lisp", &inhibit_update_dumped_lisp /* |
2636 Set to non-nil when modified dumped lisp should not be reloaded at startup. | 2661 Set to non-nil when modified dumped lisp should not be reloaded at startup. |
2637 */ ); | 2662 */ ); |
2638 inhibit_update_dumped_lisp = 1; | 2663 inhibit_update_dumped_lisp = 1; |