diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lread.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lread.c b/src/lread.c index 67d2b7fee21..9923967c98b 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -71,6 +71,9 @@ extern Lisp_Object Qevent_symbol_element_mask; | |||
| 71 | /* non-zero if inside `load' */ | 71 | /* non-zero if inside `load' */ |
| 72 | int load_in_progress; | 72 | int load_in_progress; |
| 73 | 73 | ||
| 74 | /* Directory in which the sources were found. */ | ||
| 75 | Lisp_Object Vsource_directory; | ||
| 76 | |||
| 74 | /* Search path for files to be loaded. */ | 77 | /* Search path for files to be loaded. */ |
| 75 | Lisp_Object Vload_path; | 78 | Lisp_Object Vload_path; |
| 76 | 79 | ||
| @@ -2244,6 +2247,10 @@ init_lread () | |||
| 2244 | Lisp_Object dump_path; | 2247 | Lisp_Object dump_path; |
| 2245 | 2248 | ||
| 2246 | dump_path = decode_env_path (0, PATH_DUMPLOADSEARCH); | 2249 | dump_path = decode_env_path (0, PATH_DUMPLOADSEARCH); |
| 2250 | |||
| 2251 | Vsource_directory = Fexpand_file_name (build_string ("../"), | ||
| 2252 | Fcar (dump_path)); | ||
| 2253 | |||
| 2247 | if (! NILP (Fequal (dump_path, Vload_path))) | 2254 | if (! NILP (Fequal (dump_path, Vload_path))) |
| 2248 | { | 2255 | { |
| 2249 | Vload_path = decode_env_path (0, normal); | 2256 | Vload_path = decode_env_path (0, normal); |
| @@ -2407,6 +2414,10 @@ The default is nil, which means use the function `read'."); | |||
| 2407 | This is useful when the file being loaded is a temporary copy."); | 2414 | This is useful when the file being loaded is a temporary copy."); |
| 2408 | load_force_doc_strings = 0; | 2415 | load_force_doc_strings = 0; |
| 2409 | 2416 | ||
| 2417 | DEFVAR_LISP ("source-directory", &Vsource_directory, | ||
| 2418 | "Directory in which Emacs sources were found when Emacs was built.\n\ | ||
| 2419 | You cannot count on them to still be there!"); | ||
| 2420 | Vsource_directory = Qnil; | ||
| 2410 | load_descriptor_list = Qnil; | 2421 | load_descriptor_list = Qnil; |
| 2411 | staticpro (&load_descriptor_list); | 2422 | staticpro (&load_descriptor_list); |
| 2412 | 2423 | ||