comparison src/callproc.c @ 12615:d5db61e1a4ee

(init_callproc): Set Vdoc_directory based on Vinstallation_directory when that's non-nil, regardless of whether we had to set Vexec_directory.
author Richard M. Stallman <rms@gnu.org>
date Thu, 20 Jul 1995 19:28:08 +0000
parents 14792ea851f9
children b435aa964922
comparison
equal deleted inserted replaced
12614:1415c961bea6 12615:d5db61e1a4ee
993 Vexec_path = decode_env_path ("EMACSPATH", PATH_EXEC); 993 Vexec_path = decode_env_path ("EMACSPATH", PATH_EXEC);
994 Vexec_directory = Ffile_name_as_directory (Fcar (Vexec_path)); 994 Vexec_directory = Ffile_name_as_directory (Fcar (Vexec_path));
995 Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path); 995 Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path);
996 } 996 }
997 997
998 /* This is run after init_cmdargs, so that Vinvocation_directory is valid. */ 998 /* This is run after init_cmdargs, when Vinstallation_directory is valid. */
999 999
1000 init_callproc () 1000 init_callproc ()
1001 { 1001 {
1002 char *data_dir = egetenv ("EMACSDATA"); 1002 char *data_dir = egetenv ("EMACSDATA");
1003 1003
1015 #ifndef DOS_NT 1015 #ifndef DOS_NT
1016 /* MSDOS uses wrapped binaries, so don't do this. */ 1016 /* MSDOS uses wrapped binaries, so don't do this. */
1017 Vexec_path = nconc2 (Vexec_path, Fcons (tem, Qnil)); 1017 Vexec_path = nconc2 (Vexec_path, Fcons (tem, Qnil));
1018 Vexec_directory = Ffile_name_as_directory (tem); 1018 Vexec_directory = Ffile_name_as_directory (tem);
1019 #endif /* not DOS_NT */ 1019 #endif /* not DOS_NT */
1020 1020 }
1021 /* If we use ../lib-src, maybe use ../etc as well. 1021
1022 Do so if ../etc exists and has our DOC-... file in it. */ 1022 /* Maybe use ../etc as well as ../lib-src. */
1023 if (data_dir == 0) 1023 if (data_dir == 0)
1024 { 1024 {
1025 tem = Fexpand_file_name (build_string ("etc"), 1025 tem = Fexpand_file_name (build_string ("etc"),
1026 Vinstallation_directory); 1026 Vinstallation_directory);
1027 Vdoc_directory = Ffile_name_as_directory (tem); 1027 Vdoc_directory = Ffile_name_as_directory (tem);
1028 }
1029 } 1028 }
1030 } 1029 }
1031 1030
1032 /* Look for the files that should be in etc. We don't use 1031 /* Look for the files that should be in etc. We don't use
1033 Vinstallation_directory, because these files are never installed 1032 Vinstallation_directory, because these files are never installed
1034 in /bin near the executable, and they are never in the build 1033 near the executable, and they are never in the build
1035 directory when that's different from the source directory. 1034 directory when that's different from the source directory.
1036 1035
1037 Instead, if these files are not in the nominal place, we try the 1036 Instead, if these files are not in the nominal place, we try the
1038 source directory. */ 1037 source directory. */
1039 if (data_dir == 0) 1038 if (data_dir == 0)