# HG changeset patch # User Richard M. Stallman # Date 816849537 0 # Node ID 0a091134e04735cfb69bc111206c43ade237d3cc # Parent 4c8f65a17dc954847890b905d8bebed8896ba507 (Vsource_directory): New variable. (init_lread): Initialize it. (syms_of_lread): Set up Lisp var. diff -r 4c8f65a17dc9 -r 0a091134e047 src/lread.c --- a/src/lread.c Mon Nov 20 05:39:19 1995 +0000 +++ b/src/lread.c Mon Nov 20 06:38:57 1995 +0000 @@ -71,6 +71,9 @@ /* 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 @@ 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 @@ 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);