Variable: user-init-file

user-init-file is a variable defined in lread.c.

Value

nil

Documentation

File name, including directory, of user's initialization file.

If the file loaded had extension .elc, and the corresponding source file exists, this variable contains the name of source file, suitable for use by functions like custom-save-all which edit the init file. While Emacs loads and evaluates any init file, value is the real name of the file, regardless of whether or not it has the .elc extension.

Probably introduced at or before Emacs version 21.1.

Source Code

// Defined in /usr/src/emacs/src/lread.c
  DEFVAR_LISP ("user-init-file", Vuser_init_file,
	       doc: /* File name, including directory, of user's initialization file.
If the file loaded had extension `.elc', and the corresponding source file
exists, this variable contains the name of source file, suitable for use
by functions like `custom-save-all' which edit the init file.
While Emacs loads and evaluates any init file, value is the real name
of the file, regardless of whether or not it has the `.elc' extension.  */);