Home / Tools / Erlware Emacs Mode / Reference Manual

Introduction

Erlware mode is an enhanced version of the official erlang mode. Much of the original documentation still applies for erlware mode.

Templates

Templates are skeletons for typical Erlang modules and sentences. Unlike the official erlang mode, erlware emacs mode uses edoc compliant documentation. The skeletons are accessible from the 'Erlang' menu and may also be inserted into the current buffer by calling any of the following functions:

Email address

The templates for complete erlang files, such as for the gen_server module, include a header with your name and email address. If your email address is not correct, you need to set the user-mail-address variable in your Emacs/XEmacs startup file:

(setq user-mail-address "myname@mydomain.com")

Horizontal separators

By default, the skeletons include horizontal separators to delimit function and section header comments. For example:

%%--------------------------------------------------------------------
%% @doc
%% Creates an event manager
%%
%% @spec start_link() -> {ok, Pid} | {error, Error}
%% @end
%%--------------------------------------------------------------------

Now some people like separators and some people don't. If you don't like them, you can turn them off with the erlang-skel-use-separators variable:

(setq erlang-skel-use-separators nil)

By setting that variable to nil, you will get:

%% @doc
%% Creates an event manager
%%
%% @spec start_link() -> {ok, Pid} | {error, Error}

instead.

Man Pages

If the erlang man pages are installed, you can view them from the Erlang menu. See the tutorial for instructions on installing them for the mode.