comparison src/lread.c @ 24817:3e8c8a06329b

(Vuser_init_file): New variable. (syms_of_lread): Set up Lisp variable. (Fload): Store the file name there, if var was t before.
author Karl Heuer <kwzh@gnu.org>
date Sat, 05 Jun 1999 01:15:26 +0000
parents d11ac02f9d6a
children 8b9110694bfa
comparison
equal deleted inserted replaced
24816:cc789d9ef186 24817:3e8c8a06329b
89 /* Directory in which the sources were found. */ 89 /* Directory in which the sources were found. */
90 Lisp_Object Vsource_directory; 90 Lisp_Object Vsource_directory;
91 91
92 /* Search path for files to be loaded. */ 92 /* Search path for files to be loaded. */
93 Lisp_Object Vload_path; 93 Lisp_Object Vload_path;
94
95 /* File name of user's init file. */
96 Lisp_Object Vuser_init_file;
94 97
95 /* This is the user-visible association list that maps features to 98 /* This is the user-visible association list that maps features to
96 lists of defs in their load files. */ 99 lists of defs in their load files. */
97 Lisp_Object Vload_history; 100 Lisp_Object Vload_history;
98 101
649 Fsignal (Qfile_error, Fcons (build_string ("Cannot open load file"), 652 Fsignal (Qfile_error, Fcons (build_string ("Cannot open load file"),
650 Fcons (file, Qnil))); 653 Fcons (file, Qnil)));
651 else 654 else
652 return Qnil; 655 return Qnil;
653 } 656 }
657
658 if (EQ (Qt, Vuser_init_file))
659 Vuser_init_file = found;
654 660
655 /* If FD is 0, that means openp found a magic file. */ 661 /* If FD is 0, that means openp found a magic file. */
656 if (fd == 0) 662 if (fd == 0)
657 { 663 {
658 if (NILP (Fequal (found, file))) 664 if (NILP (Fequal (found, file)))
3209 3215
3210 DEFVAR_LISP ("load-file-name", &Vload_file_name, 3216 DEFVAR_LISP ("load-file-name", &Vload_file_name,
3211 "Full name of file being loaded by `load'."); 3217 "Full name of file being loaded by `load'.");
3212 Vload_file_name = Qnil; 3218 Vload_file_name = Qnil;
3213 3219
3220 DEFVAR_LISP ("user-init-file", &Vuser_init_file,
3221 "File name, including directory, of user's initialization file.");
3222 Vuser_init_file = Qnil;
3223
3214 DEFVAR_LISP ("current-load-list", &Vcurrent_load_list, 3224 DEFVAR_LISP ("current-load-list", &Vcurrent_load_list,
3215 "Used for internal purposes by `load'."); 3225 "Used for internal purposes by `load'.");
3216 Vcurrent_load_list = Qnil; 3226 Vcurrent_load_list = Qnil;
3217 3227
3218 DEFVAR_LISP ("load-read-function", &Vload_read_function, 3228 DEFVAR_LISP ("load-read-function", &Vload_read_function,