diff options
author | Raimo Niskanen <[email protected]> | 2016-09-22 17:40:47 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2016-09-30 09:51:44 +0200 |
commit | 04d40c5cd18aca449606c19608e8044f593ee99e (patch) | |
tree | 6a27617e6abb5ac2887fba60d2578410d064945f /lib/tools/emacs/erlang-skels.el | |
parent | 1778a9e0c677134a6b71975168812bcfdc70c7aa (diff) | |
download | otp-04d40c5cd18aca449606c19608e8044f593ee99e.tar.gz otp-04d40c5cd18aca449606c19608e8044f593ee99e.tar.bz2 otp-04d40c5cd18aca449606c19608e8044f593ee99e.zip |
Change state entry events into state enter calls
Diffstat (limited to 'lib/tools/emacs/erlang-skels.el')
-rw-r--r-- | lib/tools/emacs/erlang-skels.el | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/tools/emacs/erlang-skels.el b/lib/tools/emacs/erlang-skels.el index 0284c9d686..95cc989c73 100644 --- a/lib/tools/emacs/erlang-skels.el +++ b/lib/tools/emacs/erlang-skels.el @@ -904,7 +904,7 @@ Please see the function `tempo-define-template'.") "%% @doc" n "%% Define the callback_mode() for this callback module." n (erlang-skel-separator-end 2) - "-spec callback_mode() -> gen_statem:callback_mode()." n + "-spec callback_mode() -> gen_statem:callback_mode_result()." n "callback_mode() -> state_functions." n n (erlang-skel-separator-start 2) @@ -936,6 +936,10 @@ Please see the function `tempo-define-template'.") "%% instead of StateName/3 functions like this!" n (erlang-skel-separator-end 2) "-spec state_name(" n> + "'enter', OldState :: gen_statem:state_name()," n> + "Data :: term()) ->" n> + "gen_statem:state_function_enter_result();" n + " (" n> "gen_statem:event_type(), Msg :: term()," n> "Data :: term()) ->" n> "gen_statem:state_function_result()." n @@ -1015,7 +1019,7 @@ Please see the function `tempo-define-template'.") "%% @doc" n "%% Define the callback_mode() for this callback module." n (erlang-skel-separator-end 2) - "-spec callback_mode() -> gen_statem:callback_mode()." n + "-spec callback_mode() -> gen_statem:callback_mode_result()." n "callback_mode() -> handle_event_function." n n (erlang-skel-separator-start 2) @@ -1044,6 +1048,10 @@ Please see the function `tempo-define-template'.") "%% 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 |