diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-11-20 06:38:57 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-11-20 06:38:57 +0000 |
commit | 9a5a4a5354138897bb3b017a62c1caf96c70f085 (patch) | |
tree | 88a21198f384f9dff3f4f0fabac01bd61c67d770 /src | |
parent | 79b8cb9997ce6e4125c963cc4ebe68124359d185 (diff) | |
download | emacs-9a5a4a5354138897bb3b017a62c1caf96c70f085.tar.gz |
(Vsource_directory): New variable.
(init_lread): Initialize it.
(syms_of_lread): Set up Lisp var.
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; /* non-zero if inside `load' */ int load_in_progress; +/* Directory in which the sources were found. */ +Lisp_Object Vsource_directory; + /* Search path for files to be loaded. */ Lisp_Object Vload_path; @@ -2244,6 +2247,10 @@ init_lread () Lisp_Object dump_path; dump_path = decode_env_path (0, PATH_DUMPLOADSEARCH); + + Vsource_directory = Fexpand_file_name (build_string ("../"), + Fcar (dump_path)); + if (! NILP (Fequal (dump_path, Vload_path))) { Vload_path = decode_env_path (0, normal); @@ -2407,6 +2414,10 @@ The default is nil, which means use the function `read'."); This is useful when the file being loaded is a temporary copy."); load_force_doc_strings = 0; + DEFVAR_LISP ("source-directory", &Vsource_directory, + "Directory in which Emacs sources were found when Emacs was built.\n\ +You cannot count on them to still be there!"); + Vsource_directory = Qnil; load_descriptor_list = Qnil; staticpro (&load_descriptor_list); |