Node:Permanent Installation, Next:let, Previous:Interactive Options, Up:Writing Defuns
When you install a function definition by evaluating it, it will stay installed until you quit Emacs. The next time you start a new session of Emacs, the function will not be installed unless you evaluate the function definition again.
At some point, you may want to have code installed automatically whenever you start a new session of Emacs. There are several ways of doing this:
.emacs
initialization file. When you
start Emacs, your .emacs
file is automatically evaluated and all
the function definitions within it are installed.
See Your .emacs
File.
load
function to cause Emacs to evaluate and thereby install each of the
functions in the files.
See Loading Files.
site-init.el
that is loaded
when Emacs is built. This makes the code available to everyone who
uses your machine. (See the INSTALL
file that is part of the
Emacs distribution.)
Finally, if you have code that everyone who uses Emacs may want, you can post it on a computer network or send a copy to the Free Software Foundation. (When you do this, please license the code and its documentation under a license that permits other people to run, copy, study, modify, and redistribute the code and which protects you from having your work taken from you.) If you send a copy of your code to the Free Software Foundation, and properly protect yourself and others, it may be included in the next release of Emacs. In large part, this is how Emacs has grown over the past years, by donations.