In emacs and distel developing environment, after writing some API for one module, is there any shortcut command to insert “doc” before the API signature? like following:
%%--------------------------------------------------------------------
%% @doc
%%
%%
%% @spec
%% @end
%%--------------------------------------------------------------------
You can do this several ways… There is “Function” skeleton provided in fresh erlang-mode that inserts same header as you need. Another way – use any of template solutions, like yasnippet, or something like. And third way – use SRecode from CEDET to correctly generate header using parse information from your source code – see SRecode manual for examples…