When you start SXEmacs, it normally attempts to load the file
init.el from the directory set in
This file, if it exists, must contain Lisp code. It is called your
init file. The command line switches ‘-q’ and ‘-u’
affect the use of the init file; ‘-q’ says not to load an init
file, and ‘-u’ says to load a specified user’s init file instead of
See Entering SXEmacs in The SXEmacs User’s Manual.
This variable contains the name of the directory where a user’s init files and customisations are stored. In the past, this was hard-coded to ~/.sxemacs, but today the default is normally $XDG_CONFIG_HOME/sxemacs, or ~/.config/sxemacs if the environment variable, XDG_CONFIG_HOME is not set. If neither, $XDG_CONFIG_HOME/sxemacs, nor ~/.config/sxemacs exists, and ~/.sxemacs does exist, then ~/.sxemacs will be used.
If no candidates for
user-init-directory exist SXEmacs will
create a new directory at $XDG_CONFIG_HOME/sxemacs, or
~/.config/sxemacs if XDG_CONFIG_HOME is unset.
The location of the init directory can be overridden through one of two methods...
A site may have a default init file, which is the library named
default.el. SXEmacs finds the default.el file through the
standard search path for libraries (see How Programs Do Loading).
The SXEmacs distribution does not come with this file; sites may provide
one for local customizations. If the default init file exists, it is
loaded whenever you start SXEmacs, except in batch mode or if ‘-q’ is
specified. But your own personal init file, if any, is loaded first; if
inhibit-default-init to a non-
nil value, then
SXEmacs does not subsequently load the default.el file.
Another file for site-customization is site-start.el. SXEmacs loads this before the user’s init file. You can inhibit the loading of this file with the option ‘-no-site-file’.
If there is a great deal of code in your init.el file, you
should move it into another file named something.el,
byte-compile it (see Byte Compilation), and make your init.el
file load the other file using
load (see Loading).
See Init File Examples in The SXEmacs User’s Manual, for examples of how to make various commonly desired customizations in your init.el file.
This variable prevents SXEmacs from loading the default initialization
library file for your session of SXEmacs. If its value is non-
then the default library is not loaded. The default value is
These two normal hooks are run just before, and just after, loading of the user’s init file, default.el, and/or site-start.el.