aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc/src/erl.xml
diff options
context:
space:
mode:
authorGabor Liptak <[email protected]>2010-12-19 17:52:54 -0500
committerNiclas Axelsson <[email protected]>2011-02-25 17:51:11 +0100
commit6f9d175335350c515fca5cdb772b709939e59e5e (patch)
treef384bb149495e390e018536adfe42e53830e81df /erts/doc/src/erl.xml
parent059606a330e8e86305699f60de144102560cb57b (diff)
downloadotp-6f9d175335350c515fca5cdb772b709939e59e5e.tar.gz
otp-6f9d175335350c515fca5cdb772b709939e59e5e.tar.bz2
otp-6f9d175335350c515fca5cdb772b709939e59e5e.zip
Add back documentation on .erlang processing
Diffstat (limited to 'erts/doc/src/erl.xml')
-rw-r--r--erts/doc/src/erl.xml43
1 files changed, 43 insertions, 0 deletions
diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml
index 77bd952d41..9aebcf6111 100644
--- a/erts/doc/src/erl.xml
+++ b/erts/doc/src/erl.xml
@@ -1015,6 +1015,49 @@
</section>
<section>
+ <marker id="configuration"></marker>
+ <title>Configuration</title>
+ <p>The standard Erlang/OTP system can be re-configured to change the default
+ behavior on start-up.</p>
+ <taglist>
+ <tag>The .erlang Start-up File</tag>
+ <item>
+ <p>When Erlang/OTP is started, the system searches for a file named .erlang
+ in the directory where Erlang/OTP is started. If not found, the user's home
+ directory is searched for an .erlang file.</p>
+ <p>If an .erlang file is found, it is assumed to contain valid Erlang expressions.
+ These expressions are evaluated as if they were input to the shell.</p>
+ <p>A typical .erlang file contains a set of search paths, for example:</p>
+ <code type="none"><![CDATA[
+ io:format("executing user profile in HOME/.erlang\n",[]).
+ code:add_path("/home/calvin/test/ebin").
+ code:add_path("/home/hobbes/bigappl-1.2/ebin").
+ io:format(".erlang rc finished\n",[]).
+ ]]></code>
+ </item>
+ <tag>user_default and shell_default</tag>
+ <item>
+ <p>Functions in the shell which are not prefixed by a module name are assumed
+ to be functional objects (Funs), built-in functions (BIFs), or belong to the
+ module user_default or shell_default.</p>
+ <p>To include private shell commands, define them in a module user_default and
+ add the following argument as the first line in the .erlang file.</p>
+ <code type="none"><![CDATA[
+ code:load_abs("..../user_default").
+ ]]></code>
+ </item>
+ <tag>erl</tag>
+ <item>
+ <p>If the contents of .erlang are changed and a private version of
+ user_default is defined, it is possible to customize the Erlang/OTP environment.
+ More powerful changes can be made by supplying command line arguments in the
+ start-up script erl. Refer to erl(1) and <seealso marker="init">init(3)</seealso>
+ for further information.</p>
+ </item>
+ </taglist>
+ </section>
+
+ <section>
<title>SEE ALSO</title>
<p><seealso marker="init">init(3)</seealso>,
<seealso marker="erl_prim_loader">erl_prim_loader(3)</seealso>,