mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-08 13:19:36 +00:00
Correct descriptions of init file
These still referred to XDG as being preferred. * doc/emacs/custom.texi (Init File): Correct description of init file preference order (Bug#42388). * doc/emacs/custom.texi (Find Init): Correct description of default init-file.
This commit is contained in:
parent
e325d2638c
commit
f50d79af6b
1 changed files with 16 additions and 15 deletions
|
@ -2252,10 +2252,13 @@ as a function from Lisp programs.
|
||||||
When Emacs is started, it normally tries to load a Lisp program from
|
When Emacs is started, it normally tries to load a Lisp program from
|
||||||
an @dfn{initialization file}, or @dfn{init file} for short. This
|
an @dfn{initialization file}, or @dfn{init file} for short. This
|
||||||
file, if it exists, specifies how to initialize Emacs for you.
|
file, if it exists, specifies how to initialize Emacs for you.
|
||||||
If the file @file{~/.config/emacs/init.el} exists, it is used as the
|
Traditionally, file @file{~/.emacs} is used as the init file, although
|
||||||
init file; otherwise Emacs may look at @file{~/.emacs.el},
|
Emacs also looks at @file{~/.emacs.el}, @file{~/.emacs.d/init.el},
|
||||||
@file{~/.emacs}, @file{~/.emacs.d/init.el}, or other locations.
|
@file{~/.config/emacs/init.el}, or other locations. @xref{Find Init}.
|
||||||
@xref{Find Init}.
|
|
||||||
|
You may find it convenient to have all your Emacs configuration in one
|
||||||
|
directory, in which case you should use @file{~/.emacs.d/init.el} or
|
||||||
|
the XDG-compatible @file{~/.config/emacs/init.el}.
|
||||||
|
|
||||||
You can use the command line switch @samp{-q} to prevent loading
|
You can use the command line switch @samp{-q} to prevent loading
|
||||||
your init file, and @samp{-u} (or @samp{--user}) to specify a
|
your init file, and @samp{-u} (or @samp{--user}) to specify a
|
||||||
|
@ -2661,23 +2664,21 @@ library. @xref{Hooks}.
|
||||||
@subsection How Emacs Finds Your Init File
|
@subsection How Emacs Finds Your Init File
|
||||||
|
|
||||||
Emacs normally finds your init file in a location under your home
|
Emacs normally finds your init file in a location under your home
|
||||||
directory. @xref{Init File}. By default this location is
|
directory. @xref{Init File}.
|
||||||
@file{~/.emacs.d/init.el} where @file{~/} stands for your home directory.
|
|
||||||
This default can be overridden as described below.
|
|
||||||
|
|
||||||
Emacs looks for your init file
|
Emacs looks for your init file using the filenames @file{~/.emacs.el},
|
||||||
using the filenames @file{~/.emacs.el}, @file{~/.emacs}, or
|
@file{~/.emacs}, or @file{~/.emacs.d/init.el} in that order; you can
|
||||||
@file{~/.emacs.d/init.el}; you can choose to use any one of these
|
choose to use any one of these names. (Note that only the locations
|
||||||
names. (Note that only the locations directly in your home directory
|
directly in your home directory have a leading dot in the location's
|
||||||
have a leading dot in the location's basename.)
|
basename.)
|
||||||
|
|
||||||
Emacs can also look in an XDG-compatible location for @file{init.el},
|
Emacs can also look in an XDG-compatible location for @file{init.el},
|
||||||
the default is the directory @file{~/.config/emacs}. This can be
|
the default is the directory @file{~/.config/emacs}. This can be
|
||||||
overriden by setting @env{XDG_CONFIG_HOME} in your environment, its
|
overriden by setting @env{XDG_CONFIG_HOME} in your environment, its
|
||||||
value replaces @file{~/.config} in the name of the default XDG init
|
value replaces @file{~/.config} in the name of the default XDG init
|
||||||
file. However @file{~/.emacs.d} and @file{~/.emacs} are always
|
file. However @file{~/.emacs.d}, @file{~/.emacs}, and
|
||||||
preferred if they exist, which means that you must delete or rename
|
@file{~/.emacs.el} are always preferred if they exist, which means
|
||||||
them in order to use the XDG location.
|
that you must delete or rename them in order to use the XDG location.
|
||||||
|
|
||||||
Note also that if neither the XDG location nor @file{~/.emacs.d}
|
Note also that if neither the XDG location nor @file{~/.emacs.d}
|
||||||
exist, then Emacs will create @file{~/.emacs.d} (and therefore use it
|
exist, then Emacs will create @file{~/.emacs.d} (and therefore use it
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue