Mercurial > hg > xemacs-beta
comparison src/callproc.c @ 110:fe104dbd9147 r20-1b7
Import from CVS: tag r20-1b7
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:19:45 +0200 |
parents | 4be1180a9e89 |
children | 9f59509498e1 |
comparison
equal
deleted
inserted
replaced
109:e183fc049578 | 110:fe104dbd9147 |
---|---|
53 Lisp_Object Vbinary_process_input; | 53 Lisp_Object Vbinary_process_input; |
54 Lisp_Object Vbinary_process_output; | 54 Lisp_Object Vbinary_process_output; |
55 #endif /* DOS_NT */ | 55 #endif /* DOS_NT */ |
56 | 56 |
57 Lisp_Object Vexec_path, Vexec_directory, Vdata_directory, Vdoc_directory; | 57 Lisp_Object Vexec_path, Vexec_directory, Vdata_directory, Vdoc_directory; |
58 Lisp_Object Vconfigure_info_directory; | 58 Lisp_Object Vconfigure_info_directory, Vsite_directory; |
59 | 59 |
60 /* The default base directory XEmacs is installed under. */ | 60 /* The default base directory XEmacs is installed under. */ |
61 Lisp_Object Vprefix_directory; | 61 Lisp_Object Vprefix_directory; |
62 | 62 |
63 Lisp_Object Vshell_file_name; | 63 Lisp_Object Vshell_file_name; |
957 */ | 957 */ |
958 #ifndef CANNOT_DUMP | 958 #ifndef CANNOT_DUMP |
959 if (!initialized) | 959 if (!initialized) |
960 { | 960 { |
961 Vdata_directory = Qnil; | 961 Vdata_directory = Qnil; |
962 Vsite_directory = Qnil; | |
962 Vdoc_directory = Qnil; | 963 Vdoc_directory = Qnil; |
963 Vexec_path = Qnil; | 964 Vexec_path = Qnil; |
964 } | 965 } |
965 else | 966 else |
966 #endif | 967 #endif |
967 { | 968 { |
968 char *data_dir = egetenv ("EMACSDATA"); | 969 char *data_dir = egetenv ("EMACSDATA"); |
970 char *site_dir = egetenv ("EMACSSITE"); | |
969 char *doc_dir = egetenv ("EMACSDOC"); | 971 char *doc_dir = egetenv ("EMACSDOC"); |
970 | 972 |
971 #ifdef PATH_DATA | 973 #ifdef PATH_DATA |
972 if (!data_dir) | 974 if (!data_dir) |
973 data_dir = (char *) PATH_DATA; | 975 data_dir = (char *) PATH_DATA; |
974 #endif | 976 #endif |
975 #ifdef PATH_DOC | 977 #ifdef PATH_DOC |
976 if (!doc_dir) | 978 if (!doc_dir) |
977 doc_dir = (char *) PATH_DOC; | 979 doc_dir = (char *) PATH_DOC; |
980 #endif | |
981 #ifdef PATH_SITE | |
982 if (!site_dir) | |
983 site_dir = (char *) PATH_SITE; | |
978 #endif | 984 #endif |
979 | 985 |
980 if (data_dir) | 986 if (data_dir) |
981 Vdata_directory = Ffile_name_as_directory | 987 Vdata_directory = Ffile_name_as_directory |
982 (build_string (data_dir)); | 988 (build_string (data_dir)); |
985 if (doc_dir) | 991 if (doc_dir) |
986 Vdoc_directory = Ffile_name_as_directory | 992 Vdoc_directory = Ffile_name_as_directory |
987 (build_string (doc_dir)); | 993 (build_string (doc_dir)); |
988 else | 994 else |
989 Vdoc_directory = Qnil; | 995 Vdoc_directory = Qnil; |
996 if (site_dir) | |
997 Vsite_directory = Ffile_name_as_directory | |
998 (build_string (site_dir)); | |
999 else | |
1000 Vsite_directory = Qnil; | |
990 | 1001 |
991 /* Check the EMACSPATH environment variable, defaulting to the | 1002 /* Check the EMACSPATH environment variable, defaulting to the |
992 PATH_EXEC path from paths.h. */ | 1003 PATH_EXEC path from paths.h. */ |
993 Vexec_path = decode_env_path ("EMACSPATH", | 1004 Vexec_path = decode_env_path ("EMACSPATH", |
994 #ifdef PATH_EXEC | 1005 #ifdef PATH_EXEC |
1039 (Qpath, Qwarning, | 1050 (Qpath, Qwarning, |
1040 "Warning: machine-independent data dir (%s) does not exist.\n", | 1051 "Warning: machine-independent data dir (%s) does not exist.\n", |
1041 XSTRING_DATA (Vdata_directory)); | 1052 XSTRING_DATA (Vdata_directory)); |
1042 #else | 1053 #else |
1043 Vdata_directory = Qnil; | 1054 Vdata_directory = Qnil; |
1055 #endif | |
1056 } | |
1057 } | |
1058 | |
1059 if (!NILP (Vsite_directory)) | |
1060 { | |
1061 tempdir = Fdirectory_file_name (Vsite_directory); | |
1062 if (access ((char *) XSTRING_DATA (tempdir), 0) < 0) | |
1063 { | |
1064 /* If the hard-coded path is bogus, fail silently. | |
1065 This will allow the normal heuristics to make an attempt. */ | |
1066 #if 0 | |
1067 warn_when_safe | |
1068 (Qpath, Qwarning, | |
1069 "Warning: machine-independent site dir (%s) does not exist.\n", | |
1070 XSTRING_DATA (Vsite_directory)); | |
1071 #else | |
1072 Vsite_directory = Qnil; | |
1044 #endif | 1073 #endif |
1045 } | 1074 } |
1046 } | 1075 } |
1047 | 1076 |
1048 #ifdef PATH_PREFIX | 1077 #ifdef PATH_PREFIX |
1131 DEFVAR_LISP ("data-directory", &Vdata_directory /* | 1160 DEFVAR_LISP ("data-directory", &Vdata_directory /* |
1132 Directory of architecture-independent files that come with XEmacs, | 1161 Directory of architecture-independent files that come with XEmacs, |
1133 intended for Emacs to use. | 1162 intended for Emacs to use. |
1134 */ ); | 1163 */ ); |
1135 | 1164 |
1165 DEFVAR_LISP ("site-directory", &Vsite_directory /* | |
1166 Directory of architecture-independent files that do not come with XEmacs, | |
1167 intended for Emacs to use. | |
1168 */ ); | |
1169 | |
1136 /* FSF puts the DOC file into data-directory. They do a bunch of | 1170 /* FSF puts the DOC file into data-directory. They do a bunch of |
1137 contortions to attempt to put everything into the DOC file | 1171 contortions to attempt to put everything into the DOC file |
1138 whether the support is there or not. */ | 1172 whether the support is there or not. */ |
1139 DEFVAR_LISP ("doc-directory", &Vdoc_directory /* | 1173 DEFVAR_LISP ("doc-directory", &Vdoc_directory /* |
1140 Directory containing the DOC file that comes with XEmacs. | 1174 Directory containing the DOC file that comes with XEmacs. |