From d742cc22b30a1632b9e67ca7e2ac9b15bbe9b233 Mon Sep 17 00:00:00 2001 From: Van-Huynh Le Date: Sat, 13 Apr 2019 09:49:17 +0200 Subject: [PATCH 1/2] Elixir: make hcall and hcast snippets more general --- snippets/elixir-mode/hcall | 5 ++--- snippets/elixir-mode/hcast | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/snippets/elixir-mode/hcall b/snippets/elixir-mode/hcall index 9d30b3b32..9e11b2d63 100644 --- a/snippets/elixir-mode/hcall +++ b/snippets/elixir-mode/hcall @@ -2,7 +2,6 @@ # name: hcall # key: hcall # -- -def handle_call($1, _from, state) do - reply = $0 - {:reply, reply, state} +def handle_call($1, _from, ${2:state}) do + $0 end \ No newline at end of file diff --git a/snippets/elixir-mode/hcast b/snippets/elixir-mode/hcast index 021947a84..f7cff51db 100644 --- a/snippets/elixir-mode/hcast +++ b/snippets/elixir-mode/hcast @@ -2,7 +2,6 @@ # name: hcast # key: hcast # -- -def handle_cast($1, state) do +def handle_cast($1, ${2:state}) do $0 - {:noreply, state} end \ No newline at end of file From 2f6a24dcdb3b21026b928fffb0fd7f75f384061b Mon Sep 17 00:00:00 2001 From: Van-Huynh Le Date: Sat, 13 Apr 2019 10:21:44 +0200 Subject: [PATCH 2/2] Elixir: Make hinfo more general --- snippets/elixir-mode/hinfo | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/snippets/elixir-mode/hinfo b/snippets/elixir-mode/hinfo index 6e6ce8c87..4ac5018fa 100644 --- a/snippets/elixir-mode/hinfo +++ b/snippets/elixir-mode/hinfo @@ -2,7 +2,6 @@ # name: hinfo # key: hinfo # -- -def handle_info($1, state) do +def handle_info($1, ${2:state}) do $0 - {:noreply, state} end \ No newline at end of file