aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tools/emacs')
-rw-r--r--lib/tools/emacs/erlang-skels.el40
1 files changed, 19 insertions, 21 deletions
diff --git a/lib/tools/emacs/erlang-skels.el b/lib/tools/emacs/erlang-skels.el
index 95cc989c73..eeba7f34e9 100644
--- a/lib/tools/emacs/erlang-skels.el
+++ b/lib/tools/emacs/erlang-skels.el
@@ -931,18 +931,16 @@ Please see the function `tempo-define-template'.")
"%% Whenever a gen_statem receives an event, the function " n
"%% with the name of the current state (StateName) " n
"%% is called to handle the event." n
- "%%" n
- "%% NOTE: If there is an exported function handle_event/4, it is called" n
- "%% instead of StateName/3 functions like this!" n
(erlang-skel-separator-end 2)
- "-spec state_name(" n>
- "'enter', OldState :: gen_statem:state_name()," n>
+ "-spec state_name('enter'," n>
+ "OldState :: atom()," n>
"Data :: term()) ->" n>
- "gen_statem:state_function_enter_result();" n
- " (" n>
- "gen_statem:event_type(), Msg :: term()," n>
+ "gen_statem:state_enter_result('state_name');" n>
+ "(gen_statem:event_type()," n>
+ "Msg :: term()," n>
"Data :: term()) ->" n>
- "gen_statem:state_function_result()." n
+ "gen_statem:event_handler_result(atom())." n
+ ;;
"state_name({call,Caller}, _Msg, Data) ->" n>
"{next_state, state_name, Data, [{reply,Caller,ok}]}." n
n
@@ -1043,18 +1041,18 @@ Please see the function `tempo-define-template'.")
"%% @private" n
"%% @doc" n
"%% This function is called for every event a gen_statem receives." n
- "%%" n
- "%% NOTE: If there is no exported function handle_event/4," n
- "%% StateName/3 functions are called instead!" n
- (erlang-skel-separator-end 2)
- "-spec handle_event(" n>
- "'enter', OldState :: term()," n>
- "State :: term(), Data :: term()) ->" n>
- "gen_statem:handle_event_enter_result();" n
- " (" n>
- "gen_statem:event_type(), Msg :: term()," n>
- "State :: term(), Data :: term()) ->" n>
- "gen_statem:handle_event_result()." n
+ (erlang-skel-separator-end 2)
+ "-spec handle_event('enter'," n>
+ "OldState :: term()," n>
+ "State :: term()," n>
+ "Data :: term()) ->" n>
+ "gen_statem:state_enter_result(term());" n>
+ "(gen_statem:event_type()," n>
+ "Msg :: term()," n>
+ "State :: term()," n>
+ "Data :: term()) ->" n>
+ "gen_statem:event_handler_result(term())." n
+ ;;
"handle_event({call,From}, _Msg, State, Data) ->" n>
"{next_state, State, Data, [{reply,From,ok}]}." n
n