aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1999-06-05 01:15:26 +0000
committerKarl Heuer1999-06-05 01:15:26 +0000
commit4116ab9febff1722c87e9b49c1bee3eb48afeb90 (patch)
treeed2f90001c76752cbf0edf7e723e4339f20fa19a /src
parent445ebb943f6f44e1731d59873d839633e33bb7a1 (diff)
downloademacs-4116ab9febff1722c87e9b49c1bee3eb48afeb90.tar.gz
emacs-4116ab9febff1722c87e9b49c1bee3eb48afeb90.zip
(Vuser_init_file): New variable.
(syms_of_lread): Set up Lisp variable. (Fload): Store the file name there, if var was t before.
Diffstat (limited to 'src')
-rw-r--r--src/lread.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lread.c b/src/lread.c
index 00a07cf4b70..479281c8c05 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -92,6 +92,9 @@ Lisp_Object Vsource_directory;
92/* Search path for files to be loaded. */ 92/* Search path for files to be loaded. */
93Lisp_Object Vload_path; 93Lisp_Object Vload_path;
94 94
95/* File name of user's init file. */
96Lisp_Object Vuser_init_file;
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. */
97Lisp_Object Vload_history; 100Lisp_Object Vload_history;
@@ -652,6 +655,9 @@ Return t if file exists.")
652 return Qnil; 655 return Qnil;
653 } 656 }
654 657
658 if (EQ (Qt, Vuser_init_file))
659 Vuser_init_file = found;
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 {
@@ -3211,6 +3217,10 @@ or variables, and cons cells `(provide . FEATURE)' and `(require . FEATURE)'.");
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;