aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/emacs/erlang-skels.el
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2016-10-12 17:49:26 +0200
committerRaimo Niskanen <[email protected]>2016-10-13 11:14:35 +0200
commitf4de3f5887be010db178a178e1f20027f3e5d22b (patch)
treeb1aab07d8a54591693f241b1801c6ea5cf4c3b19 /lib/tools/emacs/erlang-skels.el
parent77e175589b0ee3c1a4c94aef3cdcdf54cd84c53c (diff)
downloadotp-f4de3f5887be010db178a178e1f20027f3e5d22b.tar.gz
otp-f4de3f5887be010db178a178e1f20027f3e5d22b.tar.bz2
otp-f4de3f5887be010db178a178e1f20027f3e5d22b.zip
Use parameterized types
Diffstat (limited to 'lib/tools/emacs/erlang-skels.el')
-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